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, Stellar or NEAR, 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. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "x402_preflight_deep"
  }
}

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.
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
next_stepNo
safe_to_payNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / method
      Removed value: -{
      -  "description": "HTTP method of the paid route (default: GET, then POST)",
      -  "enum": [
      -    "GET",
      -    "POST"
      -  ],
      -  "type": "string"
      -}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "pay, ask_user (a caution: tell your user why and pay only if they accept) or do_not_pay",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / verdict / anyOf
      Previous value: -[
      -  {
      -    "description": "go: pay; caution: ask first; no_go: do not pay",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "go: pay; caution: stop and ask your user first, saying why; no_go: do not pay",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. 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"
      -]
  4. 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"
      +}
  5. 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"
      +}
  6. 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"
      +}
  7. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered; the description contributes real additional context: the $0.01 x402 cost, the accepted chains/currencies, the guarantee that the endpoint is never paid, and the EIP-191 signed receipt bound to the caller's arguments. However, it does not address latency, rate limits, or failure modes (e.g., what verdict is returned when the endpoint is unreachable), which matters for a paid call.

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

Conciseness3/5

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

The price is front-loaded, which is good, but the opening sentence is a bloated parenthetical enumerating nine chains and two currencies that pushes the actual purpose into the back half. Several clauses ('Same as GET /api/v1/preflight/deep', the receipt sentence) could be tightened or merged without losing information.

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?

With an output schema present, return values need not be spelled out, yet the description still names the verdict shape, the history, seller reliability, and domain-move signals, plus the receipt artifact. For a paid, read-only diagnostic with five parameters, nothing an agent needs in order to call it correctly appears to be missing.

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 url, body, client, max_usd, and network are all documented in the schema. The description adds no parameter-level meaning beyond a loose reference to the receipt being 'bound to your arguments', so the baseline 3 applies.

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

Purpose4/5

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

States a concrete verb and resource: a deep pre-payment check of an x402 endpoint that returns a go/caution/no_go verdict plus diagnosis, 30-day per-day history, seller-wide reliability, and domain-move detection. It functionally separates itself from a lighter-weight check via the cost trigger ('for expensive calls', 'worth it before a payment above about $1') without naming the shallow sibling outright.

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

Usage Guidelines4/5

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

Gives a usable decision threshold ('for expensive calls', 'worth it before a payment above about $1') and a strong exclusion ('Never pays the endpoint'), so an agent knows this is diagnostic rather than transactional. It does not name a specific alternative tool for cheap calls, so routing to the lighter sibling is inferred from cost rather than stated.

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.