Exam CCAR-F Topic 1 Question 134 Discussion

Actual exam question for Anthropic's CCAR-F exam
Question #: 134
Topic #: 1
When implementing your lookup_order MCP tool, the backend sometimes returns errors-for example,
"Order not found" or temporary database failures. What is the correct pattern for communicating these errors back to the agent?

Suggested Answer: A Vote an answer

Option A follows the MCP error contract. An error originating during execution of a valid tool call-such as an API failure, input-validation problem, or business-logic failure-should be returned inside the tool result with isError: true. The content should explain what happened and, where possible, provide actionable recovery guidance.
The official MCP tools specification distinguishes tool-execution errors from protocol-level errors and specifies that execution failures are reported through tool results using isError: true. Anthropic's tool-using agent tutorial provides the equivalent Claude API pattern using is_error: true, allowing Claude to retry with corrected input, request clarification, or explain the limitation.
Option B falsely represents a failed operation as successful, weakening reliable failure detection. Option C deprives the agent of the information required to determine an appropriate recovery action. Option D may be converted into a tool error by some SDK runners, but uncaught exceptions are not the MCP-level response contract. The strongest implementation returns a concise, sanitized, actionable error result and separately records detailed diagnostics in server logs.

by Rosemary at Sep 10, 2026, 03:03 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10