Home / Claude Certified Architect – Foundations / Objective 2.2

Domain 2: Tool Design & MCP Integration · 18% of the exam · Full exam outline

2.2 Implement structured error responses for MCP tools

What this objective covers

The MCP isError flag pattern for communicating tool failures back to the agent. The distinction between transient errors (timeouts, service unavailability), validation errors (invalid input), business errors (policy violations), and permission errors. Why uniform error responses (generic "Operation failed") prevent the agent from making appropriate recovery decisions. The difference between retryable and non-retryable errors, and how returning structured metadata prevents wasted retry attempts. Returning structured error metadata including errorCategory (transient/validation/permission), isRetryable boolean, and human-readable descriptions. Including retriable: false flags and customer-friendly explanations for business rule violations so the agent can communicate appropriately. Implementing local error recovery within subagents for transient failures, propagating to the coordinator only errors that cannot be resolved locally along with partial results and what was attempted. Distinguishing between access failures (needing retry decisions) and valid empty results (representing successful queries with no matches).

Practice questions

Question 1easy

Why does the course recommend that tool functions validate their inputs and raise errors with clear messages, such as 'start_date is required'?

Included in Sample: sample every domain.See plans

Choose an answer to check it. Afterward, select any option to review its explanation.

A tool error does not end the conversation. It is reported back so Claude can continue, often by retrying.

The point of the recommendation is the opposite: Claude sees the error and learns from it.

Error messages from a tool reach Claude. A clear one tells it what was wrong, so it can call the tool again with a fixed value instead of guessing.

A failed call still gets a result block; validation improves what that block says, it does not remove it.

Question 2easy

Claude's web search server tool runs a query that completes without problems but finds no matching pages. What does the web_search_tool_result contain?

Included in Master: master every domain.See plans