Question 70
A malformed API response causes a tool parser to crash and the model receives no error object. Which development or architectural response BEST addresses the primary requirement?
Explanation
Correct Answer
Return structured tool errors with enough context to recover safely while bounding retries and avoiding replay of irreversible actions. Tool error handling is part of the agent loop; pretending an unavailable tool succeeded creates incorrect conclusions. Verify the prerequisites with: Inspect exception type, timeout phase, tool idempotency, retry backoff and execution records. Situation: A malformed API response causes a tool parser to crash and the model receives no error object.
Incorrect Answers
Separate read-only analysis tools from state-changing actions and require explicit user or policy approval when tool effects are sensitive. This response is designed for Tool approval and side-effect gating; it is not the controlling fix in the situation. A tool's mere availability does not prove every call is authorized or safe. Here the targeted response is: Return structured tool errors with enough context to recover safely while bounding retries and avoiding replay of irreversible actions. Situation: A malformed API response causes a tool parser to crash and the model receives no error object.
Run application-controlled tools in the appropriate trusted service and send their results back into the Claude tool-use loop rather than assuming the model executes them directly. This response is designed for Client-side and server-side tool execution; it is not the controlling fix in the situation. Claude can request a tool but an application must implement and authorize its actual side effects. Here the targeted response is: Return structured tool errors with enough context to recover safely while bounding retries and avoiding replay of irreversible actions. Situation: A malformed API response causes a tool parser to crash and the model receives no error object.
Select supported MCP transport according to locality and deployment, and protect remote connections with identity, access control and secret handling. This response is designed for MCP stdio versus network transport and authentication; it is not the controlling fix in the situation. Transport choice affects authentication and operational risk; connecting successfully is not evidence of tenant isolation. Here the targeted response is: Return structured tool errors with enough context to recover safely while bounding retries and avoiding replay of irreversible actions. Situation: A malformed API response causes a tool parser to crash and the model receives no error object.

