MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / callTool

Method callTool

src/mcp/client.ts:152–162  ·  view source on GitHub ↗
(toolName: string, args: Record<string, unknown>, signal?: AbortSignal)

Source from the content-addressed store, hash-verified

150 }
151
152 async callTool(toolName: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<MCPToolResult> {
153 if (this.state !== 'ready') {
154 throw new Error(`MCP server ${this.name} is ${this.state}, cannot call tool`);
155 }
156 return this.requestWithTimeout<MCPToolResult>(
157 'tools/call',
158 { name: toolName, arguments: args },
159 120_000,
160 signal,
161 );
162 }
163
164 // ---------- internals ----------
165

Callers 1

executeMethod · 0.45

Calls 1

requestWithTimeoutMethod · 0.95

Tested by

no test coverage detected