Skip to main content
When a tool fails, the model gets "ok": false and an error code. It never gets a stack trace. The Test button and POST /v1/tools/{id}/test show the same codes.
status is your endpoint’s HTTP status, or null if nothing came back. message is the tool’s response.error_message. detail is a short, cleaned extract of your response; see The response. These are tool results, not API errors. API errors (a bad request to /v1/tools) use the normal error format.

Before anything is sent

Nothing reached your endpoint. On a once_per_call tool, these don’t use up the one run.

Credentials

Network

Your response

A 2xx response never fails on its content type, and a non-2xx response is upstream_rejected (needs_auth for 401), whatever its type.

MCP tools

A server that needs sign-in, is unreachable, has not been discovered or needs review is left out of the call. The agent doesn’t see its tools.

In webhooks and invocations

The tool.called event and the invocation list group errors into five error_code values: