Skip to main content
Glama

Report a payment you made

receipts.record
Idempotent

Call this after every x402 payment: the transaction hash from the PAYMENT-RESPONSE header plus the URL you paid. 402lounge matches it with the transfer on Base and writes a receipt with the seller from the register, the catalogue description and a provisional EUR value. 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": {
      "tx_hash": "<tx_hash>"
    },
    "name": "receipts.record"
  }
}

Input Schema

NameRequiredDescriptionDefault
proofNoAn EIP-4361 message you got from a challenge, signed by your wallet
amountNoWhat you paid, in USDC, e.g. "0.002"
clientNoYour client name, e.g. "claude-code 2.1"
pay_toNoThe payTo address from the payment requirements
supplyNoWhat you bought: gift_card for a gift card or other voucher (a Bitrefill order of a gift card, for example), service for everything else, an eSIM included. Leave it out when unsure, the seller's routes decide then
networkNobase or base-sepolia. Default: the network 402lounge runs on, base
tx_hashYesThe settlement transaction, 0x plus 64 hex characters
descriptionNoWhat you bought, in your words. The seller's catalogue wins when it knows the URL.
resource_urlNoThe URL you paid for (the 402 resource)
session_tokenNoA lounge session token (lg_...) if you have one
payment_responseNoThe raw PAYMENT-RESPONSE header, if you still have it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / supply
      Added value: +{
      +  "description": "What you bought: gift_card for a gift card or other voucher (a Bitrefill order of a gift card, for example), service for everything else, an eSIM included. Leave it out when unsure, the seller's routes decide then",
      +  "enum": [
      +    "service",
      +    "gift_card"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / network / description
      Added value: +"base or base-sepolia. Default: the network 402lounge runs on, base"
  3. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnly=false, idempotent=true, destructive=false, openWorld=true), and the description adds real value on top: on-chain matching against the Base transfer, the fields it derives (seller from register, catalogue description, provisional EUR value), and that the call is free. It says nothing about what happens when the transfer cannot be matched or whether an unmatched call still returns success, which is the main behavioral unknown for a write tool.

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?

Two dense sentences with the invocation trigger front-loaded and the downstream effects following. Nothing is redundant and there is no filler.

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?

For an 11-parameter tool with nested objects and no output schema, the description still sketches the receipt contents the call produces, which covers the return-value gap. The remaining omission is behavior on verification failure or duplicate submission (idempotency is only implied via annotations).

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 the baseline is 3, and the description does map its two named inputs onto tx_hash (from the PAYMENT-RESPONSE header) and resource_url. With 11 parameters present and only tx_hash required, it never clarifies the role of the remaining optional ones (proof, session_token, payment_response), so the added meaning stays marginal.

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 states a specific verb and resource: record an x402 payment by sending the tx hash and the paid URL, after which 402lounge matches the Base transfer and writes a receipt. An agent can tell this is the write-side counterpart to receipts.get/list without opening a schema, though siblings are never named explicitly.

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?

"Call this after every x402 payment" gives an unambiguous trigger condition and frequency (every payment). It lacks any when-not guidance or pointer to the read siblings (receipts.get, receipts.list) for verifying or correcting a receipt later.

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