Tool Errors the Model Can See
Return errors the AI can read and recover from.
Errors Are Just More Context
When a tool fails, the AI does not crash. It simply reads your error as context and decides what to do next, just like any result.
A Good Error Is Actionable
Write the error for a reader who can act on it. City not found beats Exception, because the model can ask the user to fix the city.
All lessons in this course
- Tool Errors the Model Can See
- Protocol Errors vs Tool Failures
- Validate Inputs Before Acting
- Fail Safely, Never Hang