Skip to main content
Glama

iafri x402 APIs

x402_preflight

Read-only

Pre-payment x402 endpoint preflight check: probes HTTP 402, decodes v1/v2 PAYMENT-REQUIRED header or body, validates payTo format, measures TTFB ms, and returns pay/caution/avoid verdict (?url=https://...). Price $0.005 per call via x402, USDC on Base.

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

Input Schema

NameRequiredDescriptionDefault
urlYesPublic HTTPS URL of an x402 endpoint to probe unpaid before paying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description is consistent with that: it explicitly says the probe is unpaid and only decodes the PAYMENT-REQUIRED header/body. It adds valuable context beyond the annotations — per-call pricing ($0.005 via x402, USDC on Base) and what the verdict outputs are. It does not cover failure modes such as non-402 responses or timeouts.

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

Conciseness5/5

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

A single dense sentence front-loads the purpose and enumerates only operational facts: probe, decode, validate, measure, verdict, then the parameter example and the price. No filler clauses; every element earns its place.

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 takes on the burden of describing returns (pay/caution/avoid plus TTFB ms) and does so at a high level. It does not describe the full response shape or verdict thresholds, which is the main remaining gap for a tool with one parameter.

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?

There is a single parameter with 100% schema coverage; the schema already documents the URL as a public HTTPS x402 endpoint probed unpaid. The description repeats that intent and gives a query-string example (?url=https://...) but adds no syntax or validation rules beyond the schema. Baseline 3 is appropriate.

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 description pairs concrete verbs (probes, decodes, validates, measures) with a precise resource: an x402 HTTP 402 endpoint checked before payment. It also states the output artifact (pay/caution/avoid verdict), so an agent can distinguish it from the csv_preflight/json_preflight siblings, which target payload formats rather than live HTTP 402 endpoints.

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?

The usage context is explicit: run it on an endpoint unpaid, before paying. That is a clear when-to-use signal with no ambiguity about ordering. It stops short of exclusions or named alternatives (e.g., what to do if the endpoint isn't x402), which keeps it below 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