Skip to main content
Glama

x402 Pay — USDC API Payment Helper

Check Payment

check_payment
Read-onlyIdempotent

Inspect a public HTTPS URL for a fresh x402 v2 HTTP 402 challenge using an unsigned GET with a 10-second network timeout and no redirect following. Returns validated payTo, asset, network, atomic amount, resource and maxTimeoutSeconds; incomplete or non-x402 responses return challenge=null and a reason. Does not sign, settle or verify receipts. Fresh requirements override documented receiver hints; inspect canonical_receiver_match before choosing to pay.

Input Schema

NameRequiredDescriptionDefault
urlYesFull public HTTPS URL to inspect with an unsigned GET. No payment headers; redirects, credentials and private network targets are rejected.

Output Schema

NameRequiredDescriptionDefault
reasonNo
is_x402YesTrue only for HTTP 402 with complete validated x402 v2 requirements.
challengeYesFresh validated requirements, or null. No synthetic defaults are inserted.
http_statusYesObserved HTTP status; zero means no HTTP response was received.
raw_headersNoAllowlisted response headers only; never cookies or authentication headers.
payment_sentYes
missing_fieldsNo
canonical_receiver_matchNoComparison with documented SML receiver; a mismatch never rewrites upstream requirements.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / url / description
      Added value: +"Full public HTTPS URL to inspect with an unsigned GET. No payment headers; redirects, credentials and private network targets are rejected."
    • addedInput schema / properties / url / format
      Added value: +"uri"
    • addedInput schema / properties / url / pattern
      Added value: +"^https://"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "allOf": [
      +    {
      +      "else": {
      +        "properties": {
      +          "challenge": {
      +            "type": "null"
      +          }
      +        }
      +      },
      +      "if": {
      +        "properties": {
      +          "is_x402": {
      +            "const": true
      +          }
      +        }
      +      },
      +      "then": {
      +        "properties": {
      +          "challenge": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "amount": {
      +                "pattern": "^[0-9]+$",
      +                "type": "string"
      +              },
      +              "asset": {
      +                "description": "Asset identifier from the fresh requirements; never replaced with a cached symbol.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "maxTimeoutSeconds": {
      +                "maximum": 3600,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "network": {
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "payTo": {
      +                "pattern": "^0x[a-fA-F0-9]{40}$",
      +                "type": "string"
      +              },
      +              "resource": {
      +                "description": "Exact resource URL or identifier advertised by the endpoint.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "scheme": {
      +                "description": "Payment scheme advertised by the fresh requirement.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "x402Version": {
      +                "const": 2
      +              }
      +            },
      +            "required": [
      +              "x402Version",
      +              "scheme",
      +              "payTo",
      +              "asset",
      +              "network",
      +              "amount",
      +              "resource",
      +              "maxTimeoutSeconds"
      +            ],
      +            "type": "object"
      +          },
      +          "http_status": {
      +            "const": 402
      +          }
      +        }
      +      }
      +    }
      +  ],
      +  "properties": {
      +    "canonical_receiver_match": {
      +      "description": "Comparison with documented SML receiver; a mismatch never rewrites upstream requirements.",
      +      "type": "boolean"
      +    },
      +    "challenge": {
      +      "description": "Fresh validated requirements, or null. No synthetic defaults are inserted.",
      +      "oneOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "pattern": "^[0-9]+$",
      +              "type": "string"
      +            },
      +            "asset": {
      +              "description": "Asset identifier from the fresh requirements; never replaced with a cached symbol.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "maxTimeoutSeconds": {
      +              "maximum": 3600,
      +              "minimum": 1,
      +              "type": "integer"
      +            },
      +            "network": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "payTo": {
      +              "pattern": "^0x[a-fA-F0-9]{40}$",
      +              "type": "string"
      +            },
      +            "resource": {
      +              "description": "Exact resource URL or identifier advertised by the endpoint.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "scheme": {
      +              "description": "Payment scheme advertised by the fresh requirement.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "x402Version": {
      +              "const": 2
      +            }
      +          },
      +          "required": [
      +            "x402Version",
      +            "scheme",
      +            "payTo",
      +            "asset",
      +            "network",
      +            "amount",
      +            "resource",
      +            "maxTimeoutSeconds"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "http_status": {
      +      "description": "Observed HTTP status; zero means no HTTP response was received.",
      +      "maximum": 599,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "is_x402": {
      +      "description": "True only for HTTP 402 with complete validated x402 v2 requirements.",
      +      "type": "boolean"
      +    },
      +    "missing_fields": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "payment_sent": {
      +      "const": false
      +    },
      +    "raw_headers": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "Allowlisted response headers only; never cookies or authentication headers.",
      +      "type": "object"
      +    },
      +    "reason": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "is_x402",
      +    "http_status",
      +    "challenge",
      +    "payment_sent"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare the read-only, idempotent, non-destructive profile, yet the description still adds substantial operational context: unsigned GET, 10-second network timeout, no redirect following, and the failure contract (challenge=null plus a reason). That is exactly the beyond-annotations 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the action and target, then the return contract, then the boundary and decision hint. No filler; every clause carries information.

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?

An output schema exists, yet the description still summarizes what comes back (payTo, asset, network, amount, resource, maxTimeoutSeconds) and the null-challenge failure mode, plus explicitly states the non-mutating scope. Nothing needed to call it correctly is missing.

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% on the single parameter, so the baseline is 3. The description's 'unsigned GET / no payment headers' framing largely restates what the schema already documents about rejected redirects and credentials, adding little new meaning.

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?

Names a precise verb and resource: 'Inspect a public HTTPS URL for a fresh x402 v2 HTTP 402 challenge', with the specific transport behavior (unsigned GET). The closing sentence ('Does not sign, settle or verify receipts') draws a sharp boundary that separates it from the payment/verification siblings.

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 real selection guidance: 'Fresh requirements override documented receiver hints; inspect canonical_receiver_match before choosing to pay.' This tells the agent what to do with the result before acting. It does not name a sibling alternative (e.g. x402_inspect_challenge) or state an explicit when-not-to-use condition, so it falls short of a 5.

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