Learn · Tool design & MCP · CCAR-F task 2.2

Structured error responses

When a tool fails, say so in a way Claude can act on: isError, a category, isRetryable and a useful message. Never an empty result.

Key ideas

Worked example: A not-found error that guides the next step

The message tells Claude why the call failed, that retrying the same input won't help, and which tool to try instead.

Exam traps

Official docs

Practise CCAR-F questions · Next lesson: Distributing tools and tool_choice