Skip to main content
Glama

payment_receipt

Signed receipt for one verdict-governed payment: endpoint, network, asset, max amount, payer, facilitator verdict, settlement id, denial reason, and retry state. retry_state is read from the token's authorizationState, so retrying with the same nonce cannot double-pay. Pass the signed review event and the payment args it bound; optional tx_hash. Refuses unsigned when the verdict does not verify or does not bind those args. The receipt itself checks with verify_proof. Free, no sign-in. Does not move funds. Docs: https://github.com/babyblueviper1/invinoveritas/tree/main/examples/qbtlabs-x402-verdict-gate#payment-receipt-safe-to-retry

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": {
      "event": "<event>",
      "args": "<args>"
    },
    "name": "payment_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsYesThe payment args that verdict bound. Their hash must match the verdict's action_binding_args_hash.
eventYesThe signed /review verdict (Nostr event) that governed the payment.
tx_hashNoOptional 0x + 64 hex settlement transaction. settlement_id is set only when this tx is the payment the verdict bound.
terms_hashNoOptional sha256 (64 hex, optionally sha256:) of the terms the payment was for. A terms hash bound in the verdict's args takes precedence; a supplied one is labelled not bound.
output_hashNoOptional sha256 of the delivered result. With it, a settled payment reads paid_output_recorded; without it, paid_no_output_recorded (a possible ghost result: do not pay again for the same job).
resource_urlNoOptional https URL of the resource the payment was for, when the verdict bound no endpoint. Recorded and passed to the payment checker as data; this server never fetches it.
authorization_signatureNoOptional: the payer's 65-byte EIP-3009 signature (hex). The receipt verifies it recovers to the payer over the bound amount, payee, validity window and the verdict's nonce, under the token's on-chain EIP-712 domain.
max_verdict_age_secondsNoOptional max age of the verdict in seconds (1..86400). Default 120.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / resource_url / description
      Previous value: -"Optional https URL of the resource the payment was for, when the verdict bound no endpoint."New value: +"Optional https URL of the resource the payment was for, when the verdict bound no endpoint. Recorded and passed to the payment checker as data; this server never fetches it."
    • addedInput schema / properties / resource_url / format
      Added value: +"uri"
    • addedInput schema / properties / resource_url / maxLength
      Added value: +2048
    • addedInput schema / properties / resource_url / pattern
      Added value: +"^https://"
  2. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations it discloses the refusal condition (unsigned verdict that fails verification or binding), that it is free with no sign-in, that it does not move funds, and that retry_state derives from the token's authorizationState so a same-nonce retry cannot double-pay. These are exactly the behavioral facts an agent needs and none are in the annotations.

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?

Front-loaded with the resource and its contents, then the calling contract, then safety properties. Dense but nearly every clause carries information; the field enumeration is long but functional since there is no output schema.

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 8-parameter tool with nested objects and no output schema, the description effectively doubles as a return-value spec by listing the receipt fields, and it covers auth, cost, refusal and retry semantics. It does not describe the shape of a refusal response or error payload, which is the remaining gap.

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 the schema already explains event, args, tx_hash, terms_hash, output_hash, resource_url, authorization_signature and max_verdict_age_seconds in detail. The description only restates the required pair and the optional tx_hash, adding the binding requirement but little else beyond the schema.

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 specific verb+resource ('Signed receipt for one verdict-governed payment') and enumerates exactly what the receipt contains (endpoint, network, asset, max amount, payer, verdict, settlement id, denial reason, retry state). It also points to verify_proof as the checker, which helps separate it from siblings, though the relationship to review/ledger is left implicit.

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 states the calling contract clearly: pass the signed review event plus the args it bound, tx_hash optional, and it refuses unsigned when the verdict does not verify or bind those args. It also signals the retry case ('safe to retry', retry_state from authorizationState). It does not explicitly say when to prefer this over ledger or verify_proof, so it stops short of full routing guidance.

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.