Structured Tool Errors
Definition
A convention for returning tool failures as machine-readable, categorized results so Claude can decide whether to retry, correct inputs, or escalate — rather than a vague failure string.
Key points
- Fields:
isError(bool),errorCategory(transient|validation|permission),isRetryable(transient →true; validation/permission →false). - Retry only makes sense for
transienterrors; validation errors need corrected inputs, permission errors need escalation. - MCP tool results carry
is_erroron themcp_tool_resultblock. - Return enough structured context for the model (or a subagent) to act — see Subagent Error Handling.
Why it matters for the exam
- Domain 2 explicitly flags that a generic "operation failed" is always the wrong answer.
- Tests mapping each
errorCategoryto the correct next action (retry vs fix vs escalate).
Common gotchas
- "operation failed" / opaque messages are always wrong — the exam rewards structured, categorized errors.
- Marking a
validationorpermissionerror as retryable is incorrect; onlytransientis retryable.
See also
Sources
Referenced by
- Agentic Tool Evaluation Loop
- Architect's Playbook Patterns
- Context Management & Reliability
- Effective Tool Descriptions
- Error Propagation In Multi-Agent Systems
- Graceful Tool Failure
- Limits of automated retry
- MCP Connector
- Poka-Yoke Tool Design
- Prompt Engineering & Structured Output
- Stratified Sampling And Confidence Scores
- Structured Outputs
- Subagent Error Handling
- Token-Efficient Tool Responses
- Tool Design & MCP Integration
- tools-mcp-01
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.