Skip to main content
Glama

ZERO Payment Guard

x402 payment preflight ($0.005 USDC on Base via x402)

x402_preflight
Read-onlyIdempotent

Paid $0.005 per call (x402, USDC on Base). Before your agent pays an unknown x402 endpoint: fetch its 402 unpaid and check the asset is canonical Circle USDC for that network, price/scheme/timeout sanity, and payTo (contract or EOA, USDC balance on Base). Returns verdict ok/caution/block with per-option flags.

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
urlYeshttps URL of the x402 resource to check
methodNoHTTP method, default GET

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

The description adds behavior that the annotations do not cover, above all the $0.005 per-call price in USDC on Base and the fact that the tool fetches the 402 challenge itself rather than reading stored data. Because the tool has no output schema, the note that it returns a verdict of ok/caution/block with per-option flags is useful shape information. The annotations already cover the read-only, idempotent, non-destructive, open-world profile, and nothing contradicts them; the only real gap is what the tool reports when the endpoint is unreachable or returns a non-402 response.

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?

The description runs to two sentences that are front-loaded with the price and the trigger condition, so no sentence is wasted. The second sentence is dense, packing the asset check, the price/scheme/timeout check, the payTo details, and the verdict shape into a single line, which makes it harder to scan but not padded.

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?

The picture is complete enough for a paid network call with no output schema: the cost, the validation targets, the return shape (ok/caution/block plus per-option flags), and the read-only and idempotent profile are all stated. The remaining unknowns, such as the failure behavior for unreachable endpoints and the mechanics of paying through x402, are minor for a preflight check.

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%, so the schema already documents both the url field and the method enum, including GET as the default. The description frames the expected input as an "unknown x402 endpoint" (implicitly HTTPS, which the uri format already implies) but adds no format, network, or method semantics beyond that. With the schema doing the heavy lifting, the baseline score of 3 is appropriate.

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 gives a specific verb-and-resource pair: it fetches an unknown x402 endpoint's unpaid 402 challenge and validates the asset (canonical Circle USDC for the network), price/scheme/timeout, and payTo (contract or EOA plus Base USDC balance). That is far more concrete than a restatement of the name. It stops short of distinguishing itself from a sibling such as usdc_payment_check, so an agent working from a catalog has to infer the difference.

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?

"Before your agent pays an unknown x402 endpoint" is a clear statement of when to call this tool, and the qualifier "unknown" implicitly narrows the cases where it applies. What is missing is an explicit rule for when not to call it, or a named alternative for endpoints that are already known or trusted, so the guidance is clear on context but silent on exclusion.

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.