- MCP Tools
- x402 Facilitator
Tool calls never throw raw exceptions back to the MCP client. Every failure is returned as a structured tool result with
isError: true, so the calling agent can reason about it and decide what to do next.Tool-level error shape
Policy denials
xentfi_create_payment is checked against the agent’s Policy server-side on every call. A denied payment comes back as a tool error (not a crash), with code: "POLICY_DENIED" and a hint pointing at xentfi_get_policy.Authentication failures
A401/403 from any tool comes back with a hint to check the agent API key. Common causes:Missing XENTFI_API_KEY
Missing XENTFI_API_KEY
The stdio server logs
Missing XentFi agent API key to stderr and every tool call fails identically. Fix the env block in your MCP client’s config — see essentials/agent for every client’s exact config.Revoked or suspended agent
Revoked or suspended agent
xentfi_get_agent_info shows status: "SUSPENDED" or "REVOKED". Re-enable the agent or issue a new key from the dashboard.Missing organization ID
Missing organization ID
Market-data tools (
xentfi_list_blockchains, xentfi_list_tokens, price lookups) require orgId in addition to the API key — set XENTFI_ORG_ID.Programmatic use (outside of tool handlers)
UsingXentfiClient directly raises real exceptions instead of a JSON tool result:
