xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools
shinjiyu af1982c424
fix: device MCP tools/call 避开握手占用的 JSON-RPC id 1/2 (#3462)
握手阶段写死 id=1 (initialize) / id=2 (tools/list),但 MCPClient.next_id
从 1 起算,导致前两次 tools/call 复用同一连接上的 request id。合规设备端
会拒收并触发服务端 30s 超时(表现为前两次调用失败、第三次起恢复)。

将 next_id 初始值改为 3,与官方协议序列及 #3461 复现一致;同时去掉
mcp_handler 里重复的 MCPClient 定义,改为从 mcp_client 导入。

Fixes #3461

Co-authored-by: shinjiyu <shinjiyu@users.noreply.github.com>
2026-10-26 14:05:40 +08:00
..
base update:完成mcp接入点对接 2025-06-26 16:25:39 +08:00
device_iot feat: 为多个模块添加类型注解以增强代码可读性 2026-01-25 17:47:52 +08:00
device_mcp fix: device MCP tools/call 避开握手占用的 JSON-RPC id 1/2 (#3462) 2026-10-26 14:05:40 +08:00
mcp_endpoint update:默认版本不提供设备ID敏感信息,按需开启 2025-10-28 15:02:01 +08:00
server_mcp chore(deps): 批量升级 15 个依赖,适配 mcp 2.x 2026-10-23 15:15:50 +08:00
server_plugins fix:修复与函数同名时遗漏其他函数的问题 2026-07-28 17:05:18 +08:00
__init__.py update:优化工具目录结构 2025-06-26 09:28:29 +08:00
unified_tool_handler.py update:在设备端显示工具调用信息 2026-03-16 13:11:45 +08:00
unified_tool_manager.py 优化日志级别,生产环境中INFO避免打印过多日志 2025-11-11 18:52:14 +08:00