Skip to main content
Glama

Deep check of an x402 endpoint before an expensive payment ($0.01 via x402)

x402_preflight_deep
Read-only

Paid ($0.01 via x402 in USDC on Base, Solana, Monad, Polygon, Arbitrum, Avalanche, Algorand or Stellar, or in RLUSD on the XRP Ledger): for expensive calls. The pre-payment verdict (go, caution or no_go) plus the full diagnosis, the 30-day history per day, how reliable the seller's other endpoints are and whether the endpoint moved domains. Never pays the endpoint. Worth it before a payment above about $1; for an ordinary call x402_preflight is enough. Same as GET /api/v1/preflight/deep. The answer carries a signed receipt (EIP-191, bound to your arguments) that proves later which verdict you got.

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 endpoint (public http(s) URL), e.g. https://api.example.com/paid
bodyNoExample JSON request body, for a POST route that checks its input before the 402 (implies POST). Without it, {} is sent and the requestBody example in the endpoint's /openapi.json is tried.
clientNoSet to gateway when your agent pays with Circle's Gateway client (@circle-fin/x402-batching) from a Gateway balance: Gateway-only endpoints are then not a caution, and Gateway options are recommended first.
methodNoHTTP method of the paid route (default: GET, then POST)
max_usdNoYour budget per call in USD, e.g. 0.5
networkNoCAIP-2 network you want to pay on, e.g. eip155:8453

Output Schema

NameRequiredDescriptionDefault
urlNo
acceptsNoOnly on an unpaid call: the x402 payment options
optionsNo
reasonsNo
receiptNoSigned receipt (EIP-191) binding the answer to your arguments
summaryNo
verdictNo
safe_to_payNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / accepts / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/options/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / options / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / reasons / anyOf
      Previous value: -[
      -  {
      -    "$ref": "#/properties/options/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / receipt / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / verdict / anyOf
      Added value: +[
      +  {
      +    "description": "go: pay; caution: ask first; no_go: do not pay",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / verdict / description
      Removed value: -"go: pay; caution: ask first; no_go: do not pay"
    • removedOutput schema / properties / verdict / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
  2. Changed1 schema field changed
    • addedInput schema / properties / body
      Added value: +{
      +  "description": "Example JSON request body, for a POST route that checks its input before the 402 (implies POST). Without it, {} is sent and the requestBody example in the endpoint's /openapi.json is tried.",
      +  "maxLength": 16384,
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "Set to gateway when your agent pays with Circle's Gateway client (@circle-fin/x402-batching) from a Gateway balance: Gateway-only endpoints are then not a caution, and Gateway options are recommended first.",
      +  "enum": [
      +    "gateway"
      +  ],
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "accepts": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/properties/options/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Only on an unpaid call: the x402 payment options"
      +    },
      +    "options": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "reasons": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/properties/options/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "receipt": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Signed receipt (EIP-191) binding the answer to your arguments"
      +    },
      +    "safe_to_pay": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "summary": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "verdict": {
      +      "description": "go: pay; caution: ask first; no_go: do not pay",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds real value on top: the $0.01 x402 fee, the accepted currencies/chains, the explicit 'never pays the endpoint' guarantee, and that the reply carries an EIP-191 receipt bound to the caller's arguments. The only shortfall is that rate limits or latency/failure behavior on unreachable endpoints are not mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information is front-loaded with the price and use case, then the payoff, then the sibling alternative and the receipt guarantee. The eight-chain enumeration is long but materially useful for deciding whether the caller can pay. A slightly tighter opening sentence would make it a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the description still summarizes what the verdict payload contains. Combined with full schema coverage, safety annotations, cost, payment rails and alternative routing, an agent has everything needed to decide and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including body, client, method, max_usd and network is already documented in the schema. The description only indirectly touches parameters by listing supported payment chains, which loosely maps to `network` but adds no syntax or selection guidance beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific action (pre-payment deep verdict) on a specific resource (x402 endpoint) and enumerates the returned content: verdict (go/caution/no_go), full diagnosis, 30-day per-day history, seller's other-endpoint reliability, and domain-move detection. It also states the underlying route (GET /api/v1/preflight/deep) and explicitly separates itself from the cheaper sibling x402_preflight.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit decision threshold (worth it before a payment above about $1, for expensive calls) and names the alternative for ordinary calls (x402_preflight is enough). It also rules out an assumption the agent might make by stating it never pays the endpoint, so the cost of invoking it is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.