Errors
The MCP tool-error envelope and the shared error-code reference.
The MCP server surfaces the same coded errors as the
REST API. A failure inside a tool produces the same code,
message, and HTTP status on both. Arguments that don't match a tool's input
schema are refused before the tool runs, with a
plain-text error.
Tool errors
A tool failure comes back as an MCP CallToolResult with isError: true and a
JSON error payload:
{
"error": {
"code": "API_KEY_NOT_AUTHORIZED_FOR_LIBRARY",
"message": "Not authorized for this library.",
"status": 404
}
}code: the stable, machine-readable failure mode. Dispatch on this.message: a human-readable string safe to show to end users.status: the HTTP status the same error returns over REST, so clients can reuse REST-oriented error handling.
Invalid arguments
Arguments that don't match a tool's input schema (a required argument missing
or empty, or a list or string over its limit) are
refused before the tool runs, and nothing changes. The result has
isError: true and one plain-text block, with no code or status:
MCP error -32602: Input validation error: Invalid arguments for tool delete_assets: Maximum of 100 assets can be deleted at once. at idsEach failing argument adds one <message> at <argument> line.
Resource errors
A failed resource read surfaces as a JSON-RPC error whose
message carries the same text as the equivalent tool error. The JSON-RPC error
envelope carries the message only; for machine-readable code and status,
use the equivalent tool, whose error payload always includes
both.
Error-code reference
The codes, their messages, and the HTTP status each maps to are the same across transports. The full table lives in the REST reference:
The codes you'll most often see from MCP tools:
| Code | Status | When |
|---|---|---|
UNAUTHENTICATED | 401 | Missing or malformed Authorization header. |
INVALID_API_KEY | 401 | The bearer token doesn't match a key in the target organization, or the key's organization no longer exists. |
API_KEY_NOT_AUTHORIZED_FOR_LIBRARY | 404 | The credential can't reach the target library, or no such library exists in the organization. |
API_KEY_READ_ONLY | 403 | A read-only key tried to create a library (needs write access). |
FORBIDDEN | 403 | An account that is not an organization Owner tried to create a library over an OAuth connection. |
APPROVAL_REQUIRES_USER | 403 | An API key tried to set approval (needs an OAuth connection). |
PAID_PLAN_REQUIRED | 403 | The organization has no paid plan (setting approval needs one). |
ORGANIZATION_NOT_FOUND | 404 | The organizationId doesn't resolve to a known org. |
RESOURCE_NOT_FOUND | 404 | A referenced asset doesn't exist. |
BAD_USER_INPUT | 400 | An argument the tool refuses, such as a reserved tag or a variant id passed on its own. |
PAYLOAD_TOO_LARGE | 413 | A request body over 32 MB, or a variant upload (parentId) over the per-file size limit. |
EPHEMERAL_STORAGE_LIMIT_EXCEEDED | 403 | An unclaimed temporary library has hit its storage cap. |
EPHEMERAL_LIBRARY_LIMIT_EXCEEDED | 400 | A temporary (unclaimed) library can't create more libraries. |
PRO_PLAN_CANCELED | 403 | The Pro plan ended and the org still has more than one member. |
INTERNAL_SERVER_ERROR | 500 | An unexpected server fault. Safe to retry with backoff. |