Skip to main content
Glama

Check x402 Payment Readiness

check_x402_payment_readiness

Call immediately before paying an x402 resource. Given a resource URL, wallet, and optional max spend, checks payment requirements, network, wallet balance/readiness, and budget; returns PAY/BLOCKED with reason codes. Does not move funds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYes
resource_urlYes
max_spend_usdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so reasonably: it states it 'does not move funds' (a key negative guarantee) and discloses the return contract (PAY/BLOCKED with reason codes). It stops short of stating whether this mutates any state or incurs cost, but the facts given are the ones that matter for a pre-flight check.

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?

Three sentences, front-loaded with the trigger condition, then inputs, then output, then the negative guarantee. Every clause 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?

An output schema exists, so the description need not explain return values, and it correctly just names them. The tool is short and self-contained, but with zero schema description coverage it could have said more about the wallet and max_spend_usd formats.

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 0%, so the description must compensate. It does name the three parameters (resource URL, wallet, optional max spend) in prose, which gives some meaning, but it adds no format, syntax, or constraint details. That is enough to identify the params but not to use them precisely.

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 (check) plus resource (x402 payment readiness) and enumerates exactly what is inspected: payment requirements, network, balance, budget. No siblings exist to differentiate from, and the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to call it ('immediately before paying an x402 resource'), which is an actionable pre-condition rather than implied usage. No alternatives exist, so no exclusions are needed.

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