Skip to main content
Glama

Verify a receipt

verify_receipt
Read-only

Check that a purchase receipt is genuine. Use it when you or your principal need proof of what was bought and paid. Pass the receipt object exactly as purchase or order_status returned it. Returns whether the receipt's signature is valid and whether it matches its entry in the store's hash-chained ledger. Read-only; nothing is changed or charged.

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
receiptYesThe receipt object exactly as purchase or order_status returned it
agent_idNoYour agent id (or X-Agent-Id header)
agent_keyNoSecret returned by register_agent (or X-Agent-Key header)
principal_idNoThe principal you act for (or X-Principal-Id header)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / receipt / description
      Added value: +"The receipt object exactly as purchase or order_status returned it"
  2. Changed4 schema fields changed
    • addedInput schema / properties / agent_id / pattern
      Added value: +"^[A-Za-z0-9._:-]{3,128}$"
    • addedInput schema / properties / agent_key / maxLength
      Added value: +256
    • addedInput schema / properties / principal_id / pattern
      Added value: +"^[A-Za-z0-9._:@-]{3,128}$"
    • addedInput schema / properties / receipt / propertyNames / maxLength
      Added value: +64
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The readOnlyHint annotation already declares the safety profile, and the description adds useful behavior beyond that: it says the tool checks the receipt signature and whether it matches the store's hash-chained ledger. It also reinforces that nothing is changed or charged, though it does not detail failure modes or authentication handling.

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?

The description is four short sentences and is front-loaded with the core action. The read-only statement is slightly redundant with the annotation, but it is brief and reinforces an important safety property without wasting space.

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 tool with a nested receipt object and no output schema, the description explains both what the tool returns at a high level and where the receipt object must come from. Authentication details are covered by the schema, but the description could say more about error cases such as a bad signature versus a ledger mismatch.

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 baseline is 3. The description repeats the key constraint that the receipt must be passed exactly as returned by purchase or order_status, which is already present in the schema, and it adds no new meaning for agent_id, agent_key, or principal_id beyond what their schema descriptions provide.

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 states a specific verb and resource: checking that a purchase receipt is genuine. It also distinguishes the tool's role by naming purchase and order_status as the producers of the receipt object rather than as alternative verification tools.

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 clearly says to use the tool when the agent or principal needs proof of what was bought and paid, and it specifies that the receipt must be passed exactly as returned by purchase or order_status. It does not give explicit when-not conditions, but there is no obvious sibling alternative for receipt verification.

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.