From 38f38b573fb826e6f10eb98106cc0236f600f3a8 Mon Sep 17 00:00:00 2001 From: Chutong Ren Date: Tue, 8 Jul 2025 17:34:27 +0200 Subject: [PATCH] fix: rename input_schema to inputSchema to match expected key --- mcp-client-typescript/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mcp-client-typescript/index.ts b/mcp-client-typescript/index.ts index be89f65..9bd11b7 100644 --- a/mcp-client-typescript/index.ts +++ b/mcp-client-typescript/index.ts @@ -63,12 +63,12 @@ class MCPClient { return { name: tool.name, description: tool.description, - input_schema: tool.inputSchema, + inputSchema: tool.inputSchema, }; }); console.log( "Connected to server with tools:", - this.tools.map(({ name }) => name), + this.tools.map(({ name }) => name) ); } catch (e) { console.log("Failed to connect to MCP server: ", e); @@ -116,7 +116,7 @@ class MCPClient { }); toolResults.push(result); finalText.push( - `[Calling tool ${toolName} with args ${JSON.stringify(toolArgs)}]`, + `[Calling tool ${toolName} with args ${JSON.stringify(toolArgs)}]` ); // Continue conversation with tool results @@ -133,7 +133,7 @@ class MCPClient { }); finalText.push( - response.content[0].type === "text" ? response.content[0].text : "", + response.content[0].type === "text" ? response.content[0].text : "" ); } }