Invalid Value: 'tools.tool_search.description'. Server-executed tool_search does...

2026年09月30日 22:59 6.80 秒 success

错误信息

Invalid Value: 'tools.tool_search.description'. Server-executed tool_search does not accept a description. (request id: 20260930224859985074478SPXZs3K4)

AI 解决方案

原文:Invalid Value: 'tools.tool_search.description'. Server-executed tool_search does not accept a description. (request id: 20260930224859985074478SPXZs3K4)
译文:无效值:'tools.tool_search.description'。服务器端执行的tool_search不接受description参数。

🎯 原因分析


该错误表明在调用tool_search工具时,向其传递了description参数,但服务端执行的tool_search工具不接受此参数,属于参数传递不匹配导致的配置错误。

💡 解决方案


移除tool_search调用中的description参数,示例修复代码:
// 修复前:使用了不被接受的description参数
// const result = await tool_search({ description: "搜索工具" });

// 修复后:移除description参数
const result = await tool_search({ query: "搜索工具" });

🛡️ 预防措施


  • 调用工具前仔细查看工具的参数规范文档,确保仅传递允许的参数。

  • 使用类型检查工具(如TypeScript的接口约束)对工具调用的参数进行校验,提前发现参数不匹配问题。