Skip to main content
Glama

Issue signed receipt

issue_receipt

Issue a signed receipt for an already-settled payment, and counter-sign it into a hash chain when a ledger is configured. Returns the receipt artifact and digest for verifiable proof.

Instructions

Issue an x402 offer-receipt (EIP-712) plus a Tersign action record for a payment that has ALREADY settled, and counter-sign both into your hash chain when a ledger is configured. Use this for money that moved; use record_disclosure for a non-payment agent action. Side effects: signs with TERSIGN_SELLER_KEY, and performs ONE network write to the ledger when TERSIGN_LEDGER_URL/_API_KEY/_SELLER_ID are set (without them it signs locally and returns an unchained artifact). Returns the signed receipt artifact, its keccak256 canonical digest, and — when chained — the ledger counter-signature and sequence number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payerYes0x address that paid — the party who can later open a dispute against this receipt
txHashNoon-chain settlement transaction hash, when one exists; omit for off-chain or fiat settlement
networkYessettlement network as CAIP-2, e.g. "eip155:8453" for Base mainnet
currencyNosettlement currency code, e.g. "USDC" or "USD"
principalNothe party on whose authority the paying agent acted (x402 sense: the buyer who delegated). Omit when a human paid directly
settledAtNounix seconds when settlement occurred; defaults to now. Set it explicitly when back-filling
taxSchemeNotax regime the seller is accounting under; recorded, never computed — Tersign does not calculate tax
resourceUrlYesabsolute URL of the resource that was paid for; appears verbatim in the receipt
supplyDescriptionYeswhat was supplied, in the seller's own words; the human-readable line an auditor or venue reads

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.4.7
    • addedInput schema / properties / currency / description
      Added value: +"settlement currency code, e.g. \"USDC\" or \"USD\""
    • changedInput schema / properties / network / description
      Previous value: -"CAIP-2, e.g. eip155:8453"New value: +"settlement network as CAIP-2, e.g. \"eip155:8453\" for Base mainnet"
    • addedInput schema / properties / payer / description
      Added value: +"0x address that paid — the party who can later open a dispute against this receipt"
    • changedInput schema / properties / principal / description
      Previous value: -"signed principal behind the paying agent"New value: +"the party on whose authority the paying agent acted (x402 sense: the buyer who delegated). Omit when a human paid directly"
    • addedInput schema / properties / resourceUrl / description
      Added value: +"absolute URL of the resource that was paid for; appears verbatim in the receipt"
    • addedInput schema / properties / settledAt / description
      Added value: +"unix seconds when settlement occurred; defaults to now. Set it explicitly when back-filling"
    • addedInput schema / properties / supplyDescription / description
      Added value: +"what was supplied, in the seller's own words; the human-readable line an auditor or venue reads"
    • addedInput schema / properties / taxScheme / description
      Added value: +"tax regime the seller is accounting under; recorded, never computed — Tersign does not calculate tax"
    • addedInput schema / properties / txHash / description
      Added value: +"on-chain settlement transaction hash, when one exists; omit for off-chain or fiat settlement"
  2. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations at all, the description carries full responsibility. It clearly discloses signing side effects (TERSIGN_SELLER_KEY), conditional network writes, local-signing fallback, and the returned artifact's unchained state. It does not disclose whether the 'ONE network write' is idempotent or reversible, but it covers the major side effects well for a signing/ledger tool.

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 description is dense but well-structured: purpose, usage rule, side effects, and return value are presented in a logical order. Every sentence contributes value, though the first sentence is long and packs several distinct facts. It is appropriately sized for a complex tool with nine parameters and no annotations.

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 a nine-parameter tool with no output schema and no annotations, the description covers the core distinction, side effects, and return values. It lacks explicit return value structure or error cases, but the description does list the returned digest and ledger signature. Minor gaps remain around error behavior and exact configuration requirements, but it is stronger than typical tool descriptions.

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 every parameter already has a schema description. The tool description adds marginal semantics by explaining why settledAt should be set explicitly for back-filling and by clarifying that taxScheme is recorded but never computed. These are useful but not extensive, so a baseline 3 is appropriate.

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 opens with a specific verb ('Issue') and a precise resource ('an x402 offer-receipt (EIP-712) plus a Tersign action record'), then immediately scopes it to already-settled payments. It distinguishes itself from record_disclosure by naming it and stating the alternative use case, so an agent can disambiguate without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Use this for money that moved') and explicitly names the alternative ('use record_disclosure for a non-payment agent action'). It also describes configuration-dependent behavior for ledger wiring, which tells the agent under what conditions chaining occurs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.