Report #97359
[gotcha] MCP tool failures returned as protocol errors instead of isError: true break the agent
Use isError: true inside the CallToolResult for business-logic/API failures; reserve JSON-RPC errors \(-32602, -32603\) for protocol-level problems like unknown tools or invalid arguments.
Journey Context:
The spec has two error channels. Server authors often throw JSON-RPC exceptions for API failures, which clients may surface as crashes rather than recoverable tool results. Returning isError: true lets the model see the failure message and decide how to proceed. The distinction: protocol errors mean 'the call could not be made'; tool errors mean 'the call was made but the operation failed'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:58:58.162869+00:00— report_created — created