feat(M1): 补 de_wake/de_press_key 工具(Agent 熄屏可自唤醒);修复 MCP SDK v2 input_schema 字段警告
This commit is contained in:
+2
-1
@@ -48,7 +48,8 @@ class Agent:
|
||||
tools = await self._mcp.list_tools()
|
||||
self.tools_schema = []
|
||||
for t in tools:
|
||||
schema = t.inputSchema if hasattr(t, "inputSchema") else {}
|
||||
# MCP SDK v2 改名 input_schema,兼容新旧字段
|
||||
schema = getattr(t, "input_schema", None) or getattr(t, "inputSchema", {})
|
||||
# fastmcp Tool 属性兼容:name/description/inputSchema
|
||||
name = getattr(t, "name", "")
|
||||
desc = getattr(t, "description", "") or ""
|
||||
|
||||
Reference in New Issue
Block a user