Skip to main content
Glama

Check an x402 payment before paying (free)

x402_pay_guard
Read-onlyIdempotent

Free. Use right before paying an x402 seller: screens the payTo wallet against the OFAC list, checks that payTo is a wallet this seller lists in the x402 Bazaar or Circle catalogue (catches a swapped or injected payTo), looks up the seller's payer history, age and uptime, and checks the amount against the seller's listed price and your budget. Returns allow, review or deny with reasons and a signed verdict. Input: url of the resource, pay_to from its 402, optional amount_usd, max_usd, network, mode (strict: deny instead of review on a wallet mismatch or missing pay_to).

Input Schema

NameRequiredDescriptionDefault
urlYesThe x402 resource URL you are about to pay
modeNostrict: deny on a payTo the seller does not list or a missing pay_to
pay_toNopayTo address from the 402 challenge
max_usdNoYour budget per call in USD
networkNoNetwork from the 402, e.g. eip155:8453
amount_usdNoAmount you are about to pay in USD, e.g. 0.05

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "strict: deny on a payTo the seller does not list or a missing pay_to",
      +  "enum": [
      +    "standard",
      +    "strict"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description adds substantial context on top: it is free, it produces allow/review/deny with reasons plus a signed verdict, and strict mode converts a wallet mismatch or missing pay_to into a deny rather than a review. That is exactly the pre-payment behavioral detail an agent needs.

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 key facts ('Free. Use right before paying') then the checks and inputs, with no filler. The body is a long dense sentence, but every clause contributes distinct information, so it remains efficient rather than bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 6 params and no output schema, the description covers purpose, when to call, the exact checks, the input list, and the return shape (allow/review/deny with reasons and a signed verdict). An agent has everything needed to call and interpret it.

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?

With 100% schema coverage the baseline is 3, but the description adds meaning beyond the schema: it explains that pay_to comes from the 402 challenge, which fields are optional, and precisely what strict mode does ('deny instead of review on a wallet mismatch or missing pay_to'). That semantic gloss raises it above baseline.

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?

States a specific verb and resource ('screens the payTo wallet', 'checks that payTo is a wallet this seller lists') and enumerates the exact checks performed. However, it never names or differentiates from the very similar sibling x402_payee_check, so an agent must infer the distinction rather than being told.

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?

'Use right before paying an x402 seller' gives a clear placement in the workflow, and the mode description implies a stricter usage variant. It stops short of naming alternatives (x402_payee_check) or when not to call it, so it is clear context without exclusions.

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