Skip to main content
Glama

Verify an x402 settlement on-chain

x402.verify-receipt
Read-only

Decodes an x402 PAYMENT-RESPONSE receipt and checks Base / Base Sepolia: settlement_confirmed is true only if the tx succeeded and its logs contain a USDC Transfer to the expected payTo (pay_to, else this server's) for the expected amount (amount, else this server's price) from the stated payer. RPC unavailable, unknown network or a receipt without a tx fails (not charged). Price: $0.02 USDC per call on Base mainnet ($0.002 on Base Sepolia), paid with x402 or 6 credits with a spend key; failed calls are not charged. The result carries a signed attestation (naxytra-attestation/1, in result._meta["naxytra.com/attestation"]) of what was observed on-chain — verified true or false — that you can hand to a third party; keys at /.well-known/delivery-receipt-keys.

Input Schema

NameRequiredDescriptionDefault
payerNoExpected payer (default: the receipt's payer).
amountNoExpected amount in USDC base units (default: this server's price when pay_to is this server).
pay_toNoExpected merchant address (default: this server's payTo).
confirmNofalse = decode only, no on-chain check (default true).
receiptYesBase64 PAYMENT-RESPONSE value, settlement JSON text, or the object.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / amount
      Added value: +{
      +  "description": "Expected amount in USDC base units (default: this server's price when pay_to is this server).",
      +  "type": [
      +    "string",
      +    "integer"
      +  ]
      +}
    • changedInput schema / properties / confirm / description
      Previous value: -"Confirm the transaction on-chain (default true)."New value: +"false = decode only, no on-chain check (default true)."
    • addedInput schema / properties / pay_to
      Added value: +{
      +  "description": "Expected merchant address (default: this server's payTo).",
      +  "type": "string"
      +}
    • addedInput schema / properties / payer
      Added value: +{
      +  "description": "Expected payer (default: the receipt's payer).",
      +  "type": "string"
      +}
    • changedInput schema / properties / receipt / description
      Previous value: -"Base64-encoded PAYMENT-RESPONSE header value or the settlement JSON."New value: +"Base64 PAYMENT-RESPONSE value, settlement JSON text, or the object."
    • changedInput schema / properties / receipt / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "object"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, openWorld, non-destructive), while the description adds substantial behavior: exact pricing ($0.02 mainnet / $0.002 Sepolia), payment paths (x402 or 6 credits), the 'failed calls are not charged' rule, and a signed attestation emitted into result._meta with a well-known key URL. This is exactly the context annotations cannot carry.

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?

Purpose is front-loaded in the first clause, and the sentences are information-dense without filler. The pricing/attestation detail makes it longer than strictly necessary for selection, but each element (cost, failure rule, attestation, key URL) carries real decision value.

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?

With no output schema, the description still tells the agent the key result field (settlement_confirmed) and its truth condition, describes the attestation payload location and verification keys, and covers cost and failure modes. An agent has everything needed to call this correctly and interpret the response.

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; the description goes slightly further by restating the default-resolution rules ('pay_to, else this server's'; 'amount, else this server's price') and clarifying that confirm=false skips the on-chain check entirely. It adds some semantic nuance but mostly mirrors what the schema already documents.

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?

The description names a specific verb ('decodes ... and checks') plus the exact resource and chains (Base / Base Sepolia), and states precisely what is being verified: a successful tx whose logs contain a USDC Transfer to the expected payTo for the expected amount from the stated payer. It also implicitly distinguishes itself from the decode-only sibling by noting 'confirm: false = decode only, no on-chain check'.

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?

Clear context for when the tool applies (verifying an x402 settlement receipt you can hand to a third party) and explicit failure conditions: RPC unavailable, unknown network, or a receipt without a tx fails and is not charged. It does not explicitly name x402.decode as the cheaper alternative for plain decoding, so the routing guidance is implied rather than stated.

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