Skip to main content
Glama

verify_receipt

Checks a seller’s signed x402 receipt for signature validity and, when provided, verifies signer, request, response hash, and on-chain settlement without signing or paying.

Instructions

Read only. Check a seller's signed x402 receipt (the X-Agent402-Receipt header value) for anyone holding one: the signature always; and, when given, the signer (expectedSigner, or the key the seller publishes at sellerUrl GET /), the request (method, url, requestBody), the response body (responseBody or responseBodySha256), and the settlement transaction on chain (when an RPC is configured). Says what was not checked. Never signs or pays.

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": "verify_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoURL of the paid request, to check it is the one the receipt covers.
methodNoHTTP method of the paid request, to check it is the one the receipt covers.
receiptYesThe X-Agent402-Receipt header value, as received.
sellerUrlNohttps URL of the seller; its published receipt key is read from GET / on that origin.
requestBodyNoBody of the paid request, to check its hash.
responseBodyNoBody of the paid response, to check its hash.
expectedSignerNoSeller receipt signing key (base58) you expect.
responseBodySha256NoSHA-256 (hex) of the paid response body, instead of responseBody.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.1
    • addedInput schema / properties / expectedSigner / description
      Added value: +"Seller receipt signing key (base58) you expect."
    • addedInput schema / properties / method / description
      Added value: +"HTTP method of the paid request, to check it is the one the receipt covers."
    • addedInput schema / properties / receipt / description
      Added value: +"The X-Agent402-Receipt header value, as received."
    • addedInput schema / properties / requestBody / description
      Added value: +"Body of the paid request, to check its hash."
    • addedInput schema / properties / responseBody / description
      Added value: +"Body of the paid response, to check its hash."
    • addedInput schema / properties / responseBodySha256 / description
      Added value: +"SHA-256 (hex) of the paid response body, instead of responseBody."
    • addedInput schema / properties / sellerUrl / description
      Added value: +"https URL of the seller; its published receipt key is read from GET / on that origin."
    • addedInput schema / properties / url / description
      Added value: +"URL of the paid request, to check it is the one the receipt covers."
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does well on the safety profile: read-only, never signs or pays, and it reports what was not checked. It also hints at an outbound fetch (receipt key read via GET / on sellerUrl) and the RPC dependency for settlement, but says nothing about error behavior, failure modes, or result shape beyond 'says what was not checked'.

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 'Read only.' and then a compact enumeration of checks, with no filler sentences. The single long semicolon-heavy sentence is dense enough that it takes a second pass to parse, which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 no annotations and no output schema, the description covers inputs and side-effect conditions well but leaves the return format unexplained — an agent cannot tell whether it gets a boolean, a list of failures, or a structured report. Adequate, but there is a real gap given the missing output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description earns above that by explaining the relationships between inputs — expectedSigner versus the key published at sellerUrl GET /, responseBody versus responseBodySha256, and that method/url are used to confirm the receipt covers that request. That is genuine meaning beyond the per-field schema text.

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 a specific verb and resource (check a seller's signed x402 receipt / X-Agent402-Receipt header) and enumerates exactly what is verified: signature always, plus optional signer, request, response body, and on-chain settlement. 'Never signs or pays' separates it from the payment siblings in the catalog.

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?

'for anyone holding one' tells the agent no wallet or ownership is required, and each 'when given' clause signals which optional inputs unlock which checks. It stops short of naming alternatives or stating when not to use it, so it is clear context without explicit routing.

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