actionable error
An error message written for the model that says what failed and how to fix the call, so its retry can succeed.
In more detail
"Invalid input" teaches nothing; "no task has id 41; call list_tasks to find valid ids" lets the model recover on the next turn. Mark tool failures with is_error and put the message in the content.
Related terms
- tool result — The message your code sends back after running a tool call, matched to it by id, which the model reads before continuing.
- tool execution error — An MCP tool failure reported as a normal result with isError set to true, as opposed to a protocol error with a JSON-RPC error code.
Taught in
- Function Calling — AI Engineering: LLM Apps, RAG & Agents
- Designing Tools A Model Can Use — AI Engineering: LLM Apps, RAG & Agents
- Agent SDKs And Human Approval — AI Engineering: LLM Apps, RAG & Agents
- What MCP Is — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents
References
- Anthropic: Writing effective tools for AI agents
- Anthropic: Handle tool calls (tool_result and is_error)