Tool execution errors are completed MCP Tool results with isError true, not a separate description-only error catalogue. Check the error result’s content and avoid presenting successful structured output as the error payload.
Requirement
Section titled “Requirement”A Tool execution-error example result sets isError to true and does not contain structuredContent.
Details
Section titled “Details”Rule ID: mcpdesc.tool.example.error-result
Owner: mcpdesc
Surface: Tool example · Path: result
Kind: mcpdesc-semantic
Requirement level: must
Protocol versions: independent of the MCP protocol version
Status: internal · Enforcement: internal
Required by
Section titled “Required by”- MCP Description 0.9.0, Section 9.3 (an execution-error result MUST NOT contain structuredContent; outputSchema does not validate error content)
- 9. Tools: req-tool-example-error-result
-
- Tools: req-tool-example-success
MCP does not forbid structuredContent on error results; MCP Description requires its absence so that example structuredContent always conforms to outputSchema.
Examples
Section titled “Examples”Invalid example
Section titled “Invalid example”Source: expected-invalid/invalid-tool-example-result-semantics.json · Selected: /tools/1/examples/business-error/result
{ "resultType": "complete", "content": [ { "type": "text", "text": "Rejected" } ], "structuredContent": { "code": "rejected" }, "isError": true}Rule Source Code
Section titled “Rule Source Code”tool.yaml at immutable tag v0.9.0-rc.3.