mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-25 04:29:51 +01:00
fix(server_mcp): read Tool.input_schema for mcp 2.3.0
mcp==2.3.0 Tool stores the JSON Schema on input_schema (alias inputSchema). Accessing tool.inputSchema raises AttributeError and aborts server_mcp init after a successful tools/list. Use getattr fallback so function-calling conversion works. Closes #3521
This commit is contained in:
parent
4dbed0ab1d
commit
1bd6dcf455
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ class ServerMCPClient:
|
|||
"function": {
|
||||
"name": name,
|
||||
"description": tool.description,
|
||||
"parameters": tool.inputSchema,
|
||||
"parameters": getattr(tool, "input_schema", None) or getattr(tool, "inputSchema", {}),
|
||||
},
|
||||
}
|
||||
for name, tool in self.tools_dict.items()
|
||||
|
|
|
|||
Loading…
Reference in a new issue