Skip to main content
Glama

Pay Safe: check before paying an x402 service (free)

preflight_x402_payment
Read-only

FREE. Run this before paying any x402 (HTTP 402) service. Pass the service URL and the PAYMENT-REQUIRED value it sent you (or price_usd and pay_to). Returns GO / CAUTION / STOP with reasons: is the service working, is the price fair (vs its public listing, what our monitor saw, and similar services), is the wallet it asks you to pay safe and the one it normally uses?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoThe service you're about to pay (optional when payment_required names it)
methodNoHTTP method the service usesGET
pay_toNoWallet you're asked to pay, if you don't pass payment_required
price_usdNoPrice asked, if you don't pass payment_required
max_price_usdNoOptional: STOP when the price is above this
payment_requiredNoThe PAYMENT-REQUIRED header value the service sent (base64), or its decoded JSON / 402 body

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely new context: the tool is free, it evaluates live service health, price fairness versus public listings/monitor data/similar services, and wallet safety versus the wallet the service normally uses. It also discloses the verdict vocabulary returned. It does not mention latency, failure modes, or behavior when data is unavailable.

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-loads the two most decision-relevant facts (FREE, run before paying) and then enumerates the return semantics. The long parenthetical question in the final sentence is slightly run-on but every clause carries information rather than filler.

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?

There is no output schema, so the description compensates by describing the GO/CAUTION/STOP result and the dimensions evaluated. Combined with a fully documented 6-parameter schema, an agent has enough to invoke and interpret the tool, though details of each verdict's reasons remain unspecified.

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 coverage is 100%, so the baseline is 3, but the description adds relational semantics: url and payment_required are alternatives, and price_usd/pay_to are the fallback when the header is not available. It also frames max_price_usd's behavioral effect as an optional STOP threshold.

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?

States a specific verb (preflight/check) on a specific resource (an x402 service before payment) and explains the output (GO / CAUTION / STOP). An agent can immediately tell this is a pre-payment safety gate rather than a discovery tool like find_cheapest_x402_service.

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?

"Run this before paying any x402 (HTTP 402) service" gives an explicit trigger condition, and the description of what to pass (URL + PAYMENT-REQUIRED, or price_usd/pay_to) clarifies the input path. It does not explicitly name when to prefer the sibling check_x402_service instead, so it stops short of full 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.

Resources