Skip to content

Commit 2d4799b

Browse files
Merge pull request #93 from hideya/fix-client-node-example
Update the node client example for anthropic-ai/sdk 0.33
2 parents 83a1e38 + b0fe2cd commit 2d4799b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tutorials/building-a-client-node.mdx

+2-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
8585
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
8686
import Anthropic from "@anthropic-ai/sdk";
8787
import dotenv from "dotenv";
88-
import { Tool } from "@anthropic-ai/sdk/resources/messages.js";
8988
import {
9089
CallToolResultSchema,
9190
ListToolsResultSchema,
@@ -181,7 +180,7 @@ Now add the core functionality for processing queries and handling tool calls:
181180
ListToolsResultSchema
182181
);
183182

184-
const availableTools: Tool[] = toolsResponse.tools.map((tool: any) => ({
183+
const availableTools = toolsResponse.tools.map((tool: any) => ({
185184
name: tool.name,
186185
description: tool.description,
187186
input_schema: tool.inputSchema,
@@ -211,7 +210,7 @@ Now add the core functionality for processing queries and handling tool calls:
211210
method: "tools/call",
212211
params: {
213212
name: toolName,
214-
args: toolArgs,
213+
arguments: toolArgs,
215214
},
216215
},
217216
CallToolResultSchema

0 commit comments

Comments
 (0)