{"slug":"tool-error-http-200","verifiedAt":"2026-11-10T01:50:18.691Z","environment":{"sdk":"1.30.0","zod":"4.5.4","node":"v24.22.0","platform":"darwin/arm64","transport":"Streamable HTTP (stateless JSON response, 127.0.0.1)"},"evidenceUrl":"https://www.niubiagent.com/lab/tool-error-http-200.json","scriptUrl":"https://www.niubiagent.com/lab/reproduce.mjs","reproduction":"mkdir -p niubiagent-mcp-lab && cd niubiagent-mcp-lab\nnpm install --prefix . --ignore-scripts --no-audit --no-fund @modelcontextprotocol/sdk@1.30.0 zod@4.5.4\ncurl -fsSLo reproduce.mjs https://www.niubiagent.com/lab/reproduce.mjs\nnode reproduce.mjs tool-error-http-200","title":{"en":"MCP tool error with HTTP 200","zh":"MCP 工具报错，HTTP 仍返回 200"},"question":{"en":"Can I count an HTTP 200 from tools/call as a successful lookup?","zh":"如何判断返回 HTTP 200 的 tools/call 是否真的查到了数据？"},"summary":{"en":"Two lookups returned HTTP 200. The missing key returned isError: true, while the known key returned isError: false.","zh":"两次查询都收到 HTTP 200。查询已有键得到 isError: false，查询缺失键得到 isError: true。"},"interpretation":{"en":"Inspect the MCP result before using the returned content. Record tool errors separately so a successful HTTP exchange cannot inflate your task success rate.","zh":"使用结果前检查 MCP 响应里的 isError。单独记录工具错误，才能计算查到有效内容的比例。"},"limitations":{"en":"One SDK client called a local fixture that explicitly marks missing keys as errors. Other tools may return an empty successful result. Confirm the result contract for the tool you use.","zh":"本次使用一个 SDK 客户端和本机测试服务。测试工具将缺失键明确标为错误；其他工具也可能返回成功且内容为空的结果，需要按该工具的约定判断。"},"tags":["MCP","TypeScript SDK","tools/call","HTTP 200","isError","tool error","工具报错"],"observations":[{"label":{"en":"HTTP response for known / missing key","zh":"已有键 / 缺失键的 HTTP 状态"},"value":"200 / 200"},{"label":{"en":"Known key · isError","zh":"已有键 · isError"},"value":"false"},{"label":{"en":"Missing key · isError","zh":"缺失键 · isError"},"value":"true"}],"sources":[{"label":"MCP specification · Tools","url":"https://modelcontextprotocol.io/specification/2025-11-25/server/tools"}],"url":"https://www.niubiagent.com/lab/tool-error-http-200","zhUrl":"https://www.niubiagent.com/zh/lab/tool-error-http-200","jsonUrl":"https://www.niubiagent.com/api/lab/tool-error-http-200.json","markdownUrl":"https://www.niubiagent.com/lab/tool-error-http-200.md","requestCoverageUrl":"https://www.niubiagent.com/pilot?case=tool-error-http-200"}