The MCP server surfaces three distinct kinds of failures, each with a different shape. This page explains how to recognize and react to each one.Documentation Index
Fetch the complete documentation index at: https://docs.particle.pro/llms.txt
Use this file to discover all available pages before exploring further.
1. Authentication / authorization failures (HTTP)
If the bearer token is missing, malformed, expired, or revoked, the MCP endpoint returns an HTTP401 Unauthorized before the request reaches the tool layer. The response carries an RFC 9728 WWW-Authenticate challenge:
realm, error, optional scope, resource_metadata).
Reactions:
- Re-run the OAuth flow. The
resource_metadataURL is the authoritative pointer to the AS — do not hard-code the token endpoint. - For revoked grants, the user must reconnect from
https://platform.particle.pro→ Connected Applications.
2. Subscription / rate-limit failures (HTTP)
Requests that pass authentication but hit a subscription block or per-org rate limit return RFC 9457application/problem+json bodies — the same shape as the REST API. The response is HTTP, not an MCP tool result, because the request never reached a tool.
spend_limit_exceeded,credits_depleted,rate_limit_exceededsubscription_suspended,payment_past_due,subscription_inactivepro_required,not_a_member
error_code; surface resolve.message and resolve.url to the user. Agents that can take action programmatically should use resolve.action, resolve.method, and resolve.endpoint.
3. Tool-level failures (MCP isError: true)
When a request reaches a tool but the tool itself fails (missing required parameter, slug not found, invalid date, downstream handler error), the MCP server returns a 200 OK HTTP response carrying an MCP CallToolResult with isError: true and a single text content block:
huma.StatusError (validation, 404 not found, conflict) translated by asActionableError into a tool-friendly message. The original REST error_code and resolve are not surfaced here; the message text is the only signal.
Reactions:
- For
MissingParameterError-style messages, the text includes a usage hint (e.g.query="sam altman") — fix the call and retry. - For “not found” or “no rows” messages on a slug, the agent should call the corresponding
resolve_*tool first to get a canonical slug, then retry. - For unexpected tool errors, surface the message to the user and avoid retry loops — the resource server logs the underlying error with full structure for support follow-up.
Why three layers?
- HTTP 401 is the only path that’s defined by RFC 6750 / RFC 9728 — MCP clients that follow the OAuth spec already handle it. Putting auth errors anywhere else would break the discovery loop.
- HTTP 402/403/429 with RFC 9457 bodies stays consistent with the REST API: the same billing or rate-limit middleware runs in front of both surfaces, so the same problem-details shape comes out.
isError: trueMCP results are how the spec recommends per-tool failures be returned — a200 OKJSON-RPC response with the structured error in the result envelope, so the agent can keep the session open and fix the call.
See also
- REST → Errors — the canonical catalog of
error_codevalues and resolution actions. - Authentication — how 401s arise and what
WWW-Authenticatecarries. - Tool reference — every tool documents its required parameters and the failure modes it can raise.