Skip to main content
Glama

Check an x402 endpoint before paying it ($0.001 via x402)

x402_preflight
Read-only

Paid ($0.001 USDC via x402 on Base or Solana): call this before your agent pays an x402 endpoint. Returns go, caution or no_go, the recommended payment option, and why: payment would fail, over your budget (max_usd), price above what is advertised, not HTTPS, unknown token, its 30-day track record. Never pays the endpoint. Same as GET /api/v1/preflight.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe x402 endpoint (public http(s) URL), e.g. https://api.example.com/paid
methodNoHTTP method of the paid route (default: GET, then POST)
max_usdNoYour budget per call in USD, e.g. 0.05
networkNoCAIP-2 network you want to pay on, e.g. eip155:8453

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses that the call costs $0.001 USDC, that it never pays the target endpoint, and the kinds of checks/returns (payment failure, budget, HTTPS, token, track record). This is valuable behavioral context. It doesn't mention failure modes of the preflight call itself, but with annotations covering read-only safety, this is sufficient. No contradiction.

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?

Front-loaded with cost and usage, and the reason list is dense but useful. Some redundancy with the title ('$0.001 via x402') and a long first sentence keep it from a 5.

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 no output schema, the description explains the possible return verdicts and the reasons behind them, and it states the fee and non-payment behavior. It doesn't spell out the exact response shape or next actions for go/caution/no_go, but for a preflight check this is largely complete.

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

Parameters4/5

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

Schema already covers all four params with descriptions (100% coverage), so baseline is 3. The description adds useful context by linking max_usd to the budget check and naming Base/Solana as supported networks, going slightly beyond the schema's CAIP-2 example.

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 description names a concrete action—preflight an x402 endpoint before payment—and the return outcome (go/caution/no_go with reasons), so an agent understands what the tool is for. It does not explicitly contrast with siblings such as x402_quick_check, so it stops short of a 5.

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?

Clear when to use: before the agent pays an endpoint. It also states the tool never pays the endpoint, which tells the agent this is a safe preflight rather than an execution. However, it does not explicitly say when to prefer x402_quick_check or x402_diagnose/fix, so no alternative routing.

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.