PRODUCTION SCENARIO
A client tool tries to book a reservation and the API returns a validation error naming a bad date format. The developer wants Claude to correct the arguments and try the call again.
What should the application send back on the next request?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: A `tool_result` with the matching id, `is_error` true, and what exactly went wrong.
A failed client tool comes back as a tool_result whose tool_use_id matches the original call, with is_error true and an instructive message saying what went wrong and what to try next, which is what lets Claude fix the date and retry. A plain user message leaves the tool_use unanswered and the request is rejected for it. Leaving is_error unset presents the failure text as a successful result. And an empty error result tells Claude that something failed but not what, so it retries the same bad arguments.