# tool_refused

The agent program tried something its run may not do (a tool on a text-only run, a step
the sandbox denied), so the run was stopped. What it said until then is in the result.

**In short:** Over MCP the tool result is an error with the text `tool_refused: <message>`, and a second line `details: …` when there are details. Over HTTP the answer is `{"error": {"code": "tool_refused", "message": "…"}}`.

## What to do

Act on the code, not the message: tell the owner what failed and include the message.
