Surface docs

Tool errors

How a tool reports a failure, and what each reason means.

A tool that fails still returns HTTP 200. The result carries isError: true, a message for the model, and a machine-readable reason:

result
{
  "content": [{ "type": "text", "text": "No surface with id 9999" }],
  "structuredContent": { "reason": "SURFACE_NOT_FOUND", "message": "No surface with id 9999" },
  "isError": true
}
ReasonMeaning
SURFACE_NOT_FOUNDNo such surface in your organization — including another org's surface.
INVALID_ARGUMENTSA missing, mistyped or invalid argument; the message names it.
PLAN_LIMIT_REACHEDNo room for another active surface on the plan; archived surfaces don't count. Carries plan, limit, used, usage_url and upgrade_url.
MULTI_SURFACE_SOURCEThe surface shares a content source; manage its variants in the dashboard.
VARIANT_NOT_FOUNDNo such variant on that surface — including another surface's variant.
SETUP_FAILEDsurface_setup failed at the step it names (structuredContent.step); nothing was created.