Skip to main content
Glama

Check up to 10 x402 endpoints before paying ($0.005 via x402)

x402_preflight_batch
Read-only

Paid ($0.005 via x402 in USDC on Base, Solana, Monad, Polygon, Arbitrum, Avalanche, Algorand, Stellar or NEAR, or in RLUSD on the XRP Ledger): the pre-payment check for up to 10 x402 endpoints at once. Per endpoint go, caution or no_go, the recommended payment option and why, plus totals. For marketplaces and agents that weigh several services. Never pays the endpoints. Same as GET /api/v1/preflight/batch. 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": {
      "urls": "<urls>"
    },
    "name": "x402_preflight_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesThe x402 endpoints to check (public http(s) URLs), at most 10
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.05
networkNoCAIP-2 network you want to pay on, e.g. eip155:8453

Output Schema

NameRequiredDescriptionDefault
countNo
countsNoHow many go, caution, no_go and unknown
acceptsNoOnly on an unpaid call: the x402 payment options
receiptNoSigned receipt (EIP-191) binding the answer to your arguments
resultsNoOne preflight per endpoint

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. Changed6 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/results/anyOf/0"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / counts / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {
      -      "type": "number"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {
      +      "type": "number"
      +    },
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / receipt / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / results / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  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/results/anyOf/0"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Only on an unpaid call: the x402 payment options"
      +    },
      +    "count": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "counts": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "How many go, caution, no_go and unknown"
      +    },
      +    "receipt": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Signed receipt (EIP-191) binding the answer to your arguments"
      +    },
      +    "results": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "One preflight per endpoint"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already state readOnlyHint and openWorldHint, but the description adds genuinely useful behavioral facts beyond them: the fixed $0.005 cost, the settlement chains/tokens, and the explicit "Never pays the endpoints" assurance that the call cannot spend the upstream services' money. It also discloses the signed EIP-191 receipt bound to arguments, which matters for later proof. Missing: what happens if an endpoint is unreachable, and whether the fee is charged on failure.

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 purpose is front-loaded, but the description is a single dense run-on with a nine-chain enumeration plus pricing repeated from the title, which dilutes the core signal. The verdict vocabulary and the "never pays the endpoints" guarantee are buried mid-sentence rather than isolated.

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

Completeness4/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 explained, yet the description still previews per-endpoint verdicts and totals, and annotations cover the read-only safety profile. For a bounded, 4-parameter read tool this is close to sufficient; the only real gap is failure-mode behavior for invalid or unreachable URLs.

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 coverage is 100% and every parameter already has a description, so the schema carries the semantics and a 3 baseline applies. The description adds no parameter-level detail — the rich list of payment chains does not map onto the `network` CAIP-2 parameter, and `max_usd`, `client`, and `urls` are left entirely to the schema.

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?

"The pre-payment check for up to 10 x402 endpoints at once" names a specific verb (pre-payment check) and a bounded resource (10 endpoints), and the verdict vocabulary (go / caution / no_go) makes the output shape concrete. It implicitly contrasts with single-endpoint checking via "at once" and "weigh several services," but never names x402_preflight or x402_preflight_deep, so sibling routing is left to inference.

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

Usage Guidelines3/5

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

"For marketplaces and agents that weigh several services" gives an implied audience/context for choosing this batch tool over a single check. However, there is no explicit "use this instead of X when..." statement and no stated exclusion, so the agent must infer the batch-vs-single split from the 10-item cap alone.

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.