Skip to main content
Glama

zFinia Intelligence

x402 Endpoint Preflight

x402_endpoint_preflight

Find out what an x402 endpoint will charge before you pay it. Probes the endpoint, reads the challenge from the header or the body, and returns the decoded price, network, asset and payTo plus the declared input and output schemas. Never sends a payment. Only reviewed origins are reachable, and a redirect is refused rather than followed. Pay 4000 atomic USDC on Base via exact x402. MCP does not pay; it provides a challenge handoff.

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_endpoint_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesHTTPS URL of an x402 endpoint on a reviewed origin. Credentials, ports and fragments are refused.
bodyNoOptional JSON body to send with a POST probe.
methodNoMethod to probe with. Defaults to GET.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: no payment is ever sent, only reviewed origins are reachable, and redirects are refused rather than followed — genuine safety context an agent cannot infer from the schema. It still leaves error behavior (e.g. what happens on a non-x402 or unreachable endpoint) and any rate/timeout limits unstated.

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 core purpose and safety constraints are front-loaded and earn their place, but the sentence 'Pay 4000 atomic USDC on Base via exact x402' is ambiguous — it reads as either the tool's own price or the target endpoint's, sitting mid-paragraph with no framing. That structural ambiguity costs it a point against an otherwise tight description.

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 correctly spells out the return payload (decoded price, network, asset, payTo, plus declared input/output schemas) and the handoff model. It is nearly complete for an agent deciding whether to call it; only failure-mode reporting is absent.

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 each parameter is already documented, giving a baseline of 3. The description adds only indirect meaning by saying the challenge may come from the body and that the tool probes with a method, without explaining format or defaults beyond the schema.

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?

The first sentence names a specific verb and resource: 'Find out what an x402 endpoint will charge before you pay it', then concretely describes the mechanism (probe, read challenge from header or body). This clearly separates it from siblings such as x402_endpoint_health (liveness) and x402_merchant_readiness_audit (merchant-side readiness).

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?

It states the trigger clearly ('before you pay it') and closes off the misreading that this tool itself completes payment ('MCP does not pay; it provides a challenge handoff'). It never names an explicit alternative sibling or the condition for choosing one, so it stops short of a 5.

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.

Resources