让 LLM 通过你的服务器执行操作
tools/list
端点列出可用工具tools/call
端点调用,服务器执行请求的操作并返回结果notifications/tools/list_changed
通知客户端工具变化isError
设置为 true
content
数组中包含错误详情注解 | 类型 | 默认值 | 描述 |
---|---|---|---|
title | string | - | 工具的人类可读标题,适用于 UI 显示 |
readOnlyHint | boolean | false | 如果为 true,表示工具不会修改其环境 |
destructiveHint | boolean | true | 如果为 true,工具可能执行破坏性更新(仅当 readOnlyHint 为 false 时有意义) |
idempotentHint | boolean | false | 如果为 true,使用相同参数重复调用工具没有额外效果(仅当 readOnlyHint 为 false 时有意义) |
openWorldHint | boolean | true | 如果为 true,工具可能与外部实体的”开放世界”交互 |