Tools · troubleshooting record
Tool returns an error result or unexpected content
The protocol call succeeded but the tool reported a failure or returned content the client cannot use. Structured tool errors are part of the protocol; the client and agent should surface them, not pretend the operation succeeded.
Symptoms
- Tool result has isError: true or an error message in its content.
- The model claims success although the output says it failed.
- The result includes an unexpected content type or empty content.
Confirmed causes
These causes have a documented basis. They may not be the cause of your specific failure.
The tool correctly reported a downstream failure
MCP tool results can mark errors and include explanatory content; isError does not mean the JSON-RPC call failed.
The tool returns content in a format the client does not render
Content blocks may be text, image, audio, resource links, or structured content depending on client support.
The server returns a success-shaped result for a failed operation
Poorly designed tools sometimes return text like "failed" without setting the error flag, which misleads the model.
Possible causes
- The upstream API failed but the server did not map the error.
- The result is too large and was truncated.
- The client does not support a result content type.
What still needs verification
- The raw tool result JSON and the isError flag.
- The client's supported content types.
- Whether the underlying operation actually changed state.
Affected environments
Fixes
Make failures explicit
- Set isError and return a concise explanation when the operation fails.
- Include the upstream status code or error identifier without secrets.
- Do not return fabricated success content.
Handle the result in the client workflow
- Inspect the raw result rather than the model's summary.
- Verify the external system state after an ambiguous result.
- Retry only idempotent operations.
Verify the fix
- Failures are visibly marked and explained.
- The client displays the error to the user or agent.
- The external system state matches the reported outcome.
Paste the configuration into the Config Doctor. It runs in your browser, never uploads the file, and can show structural issues and safe fixes.
Why we believe this
- modelcontextprotocol.io/specification/2026-07-28/server/toolsOfficial documentation · checked Oct 23, 2026 · documented
The specification defines tool results, content blocks, and the isError flag.