You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP is using inputSchema, while Claude Python API is expecting input_schema, intended? #74
But in short, the Tool object obtained from MCP is using camelCase inputSchema, while the Claude Python API is expecting input_schema. As a result, we can't directly assign the MCP output to Claude message API input:
The MCP tool output:
[Tool(name='brave_web_search', description='Performs a web search... ', inputSchema={'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'Search query (max 400 chars, 50 words)'}, 'count': {'type': 'number', 'description': 'Number of results (1-20, default 10)', 'default': 10}, 'offset': {'type': 'number', 'description': 'Pagination offset (max 9, default 0)', 'default': 0}}, 'required': ['query']}), Tool(name='brave_local_search', description="Searches for local businesses...", inputSchema={'type': 'object', 'properties': {'query': {'type': 'string', 'description': "Local search query (e.g. 'pizza near Central Park')"}, 'count': {'type': 'number', 'description': 'Number of results (1-20, default 5)', 'default': 5}}, 'required': ['query']})]
# During initializationasyncwithstdio_client(server_params) as (read, write):
asyncwithClientSession(read, write) assession:
# Initialize the connection with MCP serverawaitsession.initialize()
tools_list=awaitsession.list_tools()
tool=tools_list.tools
Although we've been heavily inspired by the Anthropic API in the design of MCP, it's not meant to be 1:1 or coupled to it. There are indeed a few things like this that will require translation—it won't be a passthrough.
Activity
jspahrsummers commentedon Nov 27, 2024
Although we've been heavily inspired by the Anthropic API in the design of MCP, it's not meant to be 1:1 or coupled to it. There are indeed a few things like this that will require translation—it won't be a passthrough.