Errors

Tool refusals use one stable JSON shape:

{
  "code": "conflict",
  "message": "idempotency key was already used with a different body",
  "details": {"tool": "start_case"},
  "retryable": false
}

details is optional. retryable says whether repeating the exact same request can succeed without a human or state change.

HTTP and JSON-RPC mapping

REST tool calls return the refusal as the HTTP response body, using the status in the table below. JSON-RPC returns an error object whose data field carries the same refusal shape. Its transport-level mapping is:

The status mapping below is generated from Docket's live MCP error registry.

CodeHTTP status
conflict409
forbidden403
illegal_transition409
internal500
invalid_request400
needs_approval409
not_available501
not_found404
stale_token409
timer_not_due409
unauthorized401

What to do

Always include the request id or JSON-RPC response id in an incident report, never the bearer token.