PRODUCTION SCENARIO
An MCP weather tool calls an upstream API that returns a rate-limit failure. The server author is choosing between raising a JSON-RPC error and returning a result.
How should the server report that failure?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: As a tool result with isError set true and the failure text in content
Protocol errors are for unknown tools, malformed requests and server errors; a working tool whose upstream API rate-limits it is a tool execution error, reported in the result with isError true so clients can hand it to the model to self-correct. Leaving isError false hides the failure from the client, which cannot tell success from failure. A JSON-RPC error takes the failure off the path the model can recover from. And an error field in structured content is invisible to any client that has not been taught that server's private convention.