Skip to main content
Glama

x402 debugger

x402_check
Read-onlyIdempotent

Free. Decode any x402 payment request (from a URL, a PAYMENT-REQUIRED header or a 402 body) into plain English with warnings, and optionally verify a signed payment (PAYMENT-SIGNATURE / X-PAYMENT header) the way a facilitator would: recipient, amount, time window, EIP-712 signature against the token's real domain, nonce reuse and balance. Every failed check comes with the fix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoThe paid endpoint URL (https). It is called once, without payment, to read its 402.
bodyNoJSON body for a POST url.
methodNoHTTP method for url (default GET).
paymentNoOptional signed payment header value to verify.
requirementNoInstead of url: the PAYMENT-REQUIRED header value (base64) or the 402 JSON body.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixNoHow to fix it
validNoWhether the 402 or payment is valid
decodedNoThe decoded payment request or payment
problemsNoWhat is wrong

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedOutput schema / properties / decoded
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "The decoded payment request or payment",
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / fix
      Added value: +{
      +  "description": "How to fix it",
      +  "type": "string"
      +}
    • addedOutput schema / properties / problems
      Added value: +{
      +  "description": "What is wrong",
      +  "items": {},
      +  "type": "array"
      +}
    • removedOutput schema / properties / requirement
      Removed value: -{
      -  "additionalProperties": {},
      -  "description": "Decoded payment request: options in plain English, warnings",
      -  "properties": {},
      -  "type": "object"
      -}
    • addedOutput schema / properties / valid
      Added value: +{
      +  "description": "Whether the 402 or payment is valid",
      +  "type": "boolean"
      +}
    • removedOutput schema / properties / verification
      Removed value: -{
      -  "additionalProperties": {},
      -  "description": "If a payment was given: each facilitator check, pass/fail, and the fix",
      -  "properties": {},
      -  "type": "object"
      -}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint, so safety is covered. The description adds real value beyond them: it is free, it verifies recipient, amount, time window, EIP-712 signature against the token's real domain, nonce reuse and balance, and 'every failed check comes with the fix.' This paints the verification behavior richly.

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?

Two dense sentences, front-loaded with the 'Free.' qualifier before purpose. The verify clause and the 'every failed check comes with the fix' payoff are ordered sensibly. Slightly dense but no wasted sentences.

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 return-format explanation is unnecessary, and the description still conveys the verification checks and the free/debug nature. For a 5-param debugging tool this is nearly complete; only the absence of explicit alternative routing keeps it from the top.

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 description coverage is 100%, so all five parameters are already documented, including the header formats. The description reinforces the input forms (URL, header, 402 body) but adds no syntax or format detail beyond the schema, so the 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?

States specific verbs and resources: 'Decode any x402 payment request ... into plain English' and 'verify a signed payment ... the way a facilitator would.' It even enumerates the input forms (URL, PAYMENT-REQUIRED header, 402 body). No sibling tool overlaps this x402 debugging role, so it is clearly distinguishable.

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?

Gives clear context for use: decode a payment request, and 'optionally verify a signed payment.' The 'Free' lead and the 'optionally' qualifier tell the agent when each capability applies. However, it names no explicit alternative or when-not-to-use condition, so it stops short of the top tier.

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.