diff --git a/helpers.md b/helpers.md index f24792ad..5e5e5dcd 100644 --- a/helpers.md +++ b/helpers.md @@ -162,7 +162,7 @@ async with stdio_client(StdioServerParameters(command="mcp-server")) as (read, w await mcp_client.initialize() tools_result = await mcp_client.list_tools() - runner = await client.beta.messages.tool_runner( + runner = client.beta.messages.tool_runner( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": "Use the available tools"}], diff --git a/src/anthropic/lib/tools/mcp.py b/src/anthropic/lib/tools/mcp.py index faf2023d..408020cb 100644 --- a/src/anthropic/lib/tools/mcp.py +++ b/src/anthropic/lib/tools/mcp.py @@ -409,7 +409,7 @@ def async_mcp_tool( from anthropic.lib.tools.mcp import async_mcp_tool tools_result = await mcp_client.list_tools() - runner = await client.beta.messages.tool_runner( + runner = client.beta.messages.tool_runner( model="claude-sonnet-4-20250514", max_tokens=1024, tools=[async_mcp_tool(t, mcp_client) for t in tools_result.tools],