Skip to content

Function: extractMcpCallTarget()

Makaio Framework


Makaio Framework / ai-adapters-core / extractMcpCallTarget

extractMcpCallTarget(args): string | undefined

Defined in: ../../../adapters/core/src/agent/mcp-call-extractor.ts:22

Extract the target MCP tool name from parsed mcp_call arguments.

Conforms to the mcp_call input schema which defines { tool: z.string() }. Returns undefined for any non-conformant argument shape so callers can skip processing without throwing.

Record<string, unknown>

Parsed JSON arguments object from the tool call

string | undefined

The namespaced target tool name, or undefined if not conformant