Skip to main content
Glama

Verify an agent payment receipt

verify_receipt
Read-only

Validate a signed proof-of-spend receipt offline: check schema, Ed25519 signature, mandate expiry, amount math, and refund limits to confirm an agent's charge was authorized.

Instructions

Check a signed proof-of-spend receipt offline: schema, Ed25519 signature, mandate expiry, positive amount, quantity*unit_price == amount, refund not above payment. Use when an agent or provider returns a receipt and you need to know whether it actually proves the charge was allowed. Do NOT use to move funds or to confirm a transaction on-chain - nothing here reads a chain.

Input Schema

NameRequiredDescriptionDefault
receiptYesThe receipt document as JSON.
public_keyYesEd25519 public key, base64url (from keygen) or 64 hex chars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish readOnly/non-destructive/closed-world, and the description adds real value on top: verification is done offline and 'nothing here reads a chain'. It does not say what a failed verification surfaces (throw vs. structured error list) or whether partial failures are distinguishable, which is a meaningful omission for a validator.

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 sentences, front-loaded with the enumerated checks, then the usage condition and the exclusion. No filler, and the most decision-relevant content (what is verified, and what this is not) arrives first.

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?

With a nested, otherwise-undocumented receipt object and no output schema, the description does the heavy lifting by listing the invariants checked. The remaining gap is the return shape: an agent can't tell from the definition whether it gets a boolean, a verdict object, or a list of failure reasons.

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 100%, so the two parameters are already documented, including the base64url-or-hex key format. The description still adds meaning by naming the receipt fields the verifier actually inspects (mandate expiry, amount, quantity*unit_price, refund), which the schema only calls an opaque 'receipt document as JSON'.

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?

Names a specific verb (verify/check) and resource (signed proof-of-spend receipt), then enumerates the exact validations performed: schema, Ed25519 signature, mandate expiry, positive amount, quantity*unit_price equality, refund ceiling. That level of specificity clearly separates it from the reporting siblings (reserve_report, reconcile_books, audit_spend).

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?

Gives an explicit trigger ('when an agent or provider returns a receipt and you need to know whether it actually proves the charge was allowed') plus explicit exclusions ('Do NOT use to move funds or to confirm a transaction on-chain'). Both the when and the when-not are stated, so the agent isn't left to infer.

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