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. Anchoring: each attestation carries a chronology-protocol binding tag inside its signed bytes, and naxytra submits its digest (only the digest) to the next anchoring epoch. Once that epoch is published, anyone can check, with no account and no trust in naxytra, that the attestation existed no later than the public Bitcoin blocks holding its OpenTimestamps proofs: the bundle verifies offline, and the Bitcoin step needs only a public block explorer or your own node. Epochs run about monthly; there is no anchoring SLA. No extra charge. Status: GET https://api.naxytra.com/v1/anchoring/<attestation_id>.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "receipt": "<receipt>"
    },
    "name": "x402.verify-receipt"
  }
}

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.3/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/non-destructive; the description adds substantial behavior beyond them: the precise confirmation rule, the failure modes that are not charged (RPC unavailable, unknown network, receipt without tx), the price per network, the credit option, and the signed attestation payload location. It even discloses the anchoring limitation ('no anchoring SLA') so the agent does not over-promise third-party verifiability.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The verification semantics are front-loaded and earn their place, but the anchoring paragraph is long and tangential to the call itself; it spends six lines on chronology-protocol, Bitcoin blocks, and OpenTimestamps proofs before mentioning the status URL. Pricing appears twice in spirit (per-call price and 'no extra charge'), so the text could be materially tightened.

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?

No output schema exists, and the description compensates by telling the agent what the result carries — a signed attestation at result._meta["naxytra.com/attestation"] with key-discovery URL — plus the payment/failure semantics. For a read-only verification tool with 5 well-documented params, an agent has everything needed to invoke it and interpret the response.

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 100%, so every parameter already has a description, and the description largely restates the defaults already encoded there (pay_to else this server's, amount else this server's price). It adds marginal meaning — e.g. that confirm=false skips the on-chain check entirely — but nothing about the expected format of payer or the receipt beyond what the schema says.

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 a resource: decodes a PAYMENT-RESPONSE receipt and checks Base/Base Sepolia settlement. It goes further to define the exact success predicate (tx succeeded AND logs contain a USDC Transfer to the expected payTo for the expected amount from the stated payer), which is precise enough to distinguish it from a plain decoder like x402.decode.

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 use — verifying an x402 settlement on-chain — and it explains the escape hatch ('confirm: false = decode only, no on-chain check') plus that failures aren't charged, which tells the agent a failed verification is cheap. It never explicitly names the sibling x402.decode as the cheaper alternative when no on-chain check is wanted, so the routing guidance is implicit rather than spelled out.

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