Skip to main content
Glama

Agent Data Tools: Compliance and checks

Payment receipt for an x402 or USDC payment from its transaction hash

x402_receipt
Read-only

Turn a settled x402 or USDC payment into a receipt to file: from the transaction hash, the payer, payee, amount, time, block, status and whether it was an EIP-3009 authorization (the x402 exact scheme), on Base, Ethereum, Arbitrum, Optimism or Polygon, with a stable receipt id and a SHA-256 of a canonical text for bookkeeping. Optionally name what was bought. Never signs. Use to keep proof of a purchase after an agent pays. Example: hash=0x778c8c1b1fd1b320bf045eae0af7274e74a9e2e1f83c34ec96d9f825aea3b933. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "hash": "<hash>"
    },
    "name": "x402_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashYesTransaction hash of the payment (0x, 64 hex characters)
chainNoNetwork: base (default), eth, arb, op or polygon
payToNoOptional: the payee, when the transaction holds several USDC transfers
resourceNoOptional: the URL or item the payment bought, written into the receipt

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnly, non-idempotent, open-world, non-destructive), it discloses that the tool never signs, reads or computes only and changes nothing, and — crucially — that each call is charged $0.01 via x402 USDC or a card key, first 10 free and failed calls free. The per-call charge also explains why the operation is not idempotent in cost terms, adding real value the annotations cannot convey.

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?

The useful part (what the receipt contains, what chains, what it never does, the price) is front-loaded, and the example hash plus pricing tail are well-placed. It is a single dense run-on paragraph with some filler ('to file', 'for bookkeeping') and could be split for scannability, but little is genuinely wasted.

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 carries the return-value burden and does so by enumerating every receipt field including the stable receipt id and canonical-text hash. Pricing, payment method, and the read-only guarantee are all covered, so an agent has everything needed to call it correctly and understand the cost.

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 hash, chain, payTo and resource are already fully documented in the schema, including the payTo caveat about transactions with several USDC transfers. The description restates the chain list and the 'optionally name what was bought' framing but adds no format or syntax detail beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb+resource: turn a settled x402 or USDC payment into a receipt using the transaction hash, and it enumerates exactly what the receipt contains (payer, payee, amount, block, EIP-3009 flag, receipt id, SHA-256). It also scopes the supported chains. It stops short of explicitly differentiating itself from the chain-specific siblings (base_receipt, eth_receipt, arb_receipt, polygon_receipt), so an agent must infer which multi-chain vs single-chain tool to pick.

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?

It gives an explicit use case — 'Use to keep proof of a purchase after an agent pays' — plus a concrete example hash, which is enough context to select it. It does not state when NOT to use it or name the chain-specific receipt alternatives, so the selection boundary remains implicit.

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