Skip to main content
Glama

Verify purchase receipt

verify_receipt
Read-onlyIdempotent

Recompute a receipt's hash chain and HMAC signature to check the stored record. Returns valid true when it matches; valid false when a row was altered.

Instructions

Recompute the receipt hash chain and HMAC signature. valid is true when the stored receipt matches the chain and the server signature. valid is false when a row was altered. Same as GET /v1/receipts/:id/verify.

Input Schema

NameRequiredDescriptionDefault
receipt_idYesPublic receipt id (rcpt_…).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral content: it explains the mechanism (hash chain plus HMAC recomputation) and the exact semantics of the valid flag in both the success and tampering cases — valuable since no output schema exists.

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?

Three short sentences, front-loaded with the operation before the result semantics. No filler, no restating of the name or title.

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 no output schema, the description correctly documents the meaning of the returned valid flag in both branches, which is the key missing structured information. It omits error behavior (e.g., unknown receipt id) and authentication requirements, which is a minor gap for a read-only verification tool.

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% and there is a single parameter whose format (rcpt_…) is documented in the schema. The description adds no further parameter detail, so the baseline 3 applies.

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?

States a specific verb and resource: 'Recompute the receipt hash chain and HMAC signature.' This clearly describes an integrity-verification operation rather than a retrieval, so an agent can distinguish it from get_receipt. It does not explicitly contrast itself with the sibling, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is the tool for checking whether a receipt has been tampered with. There is no explicit when-to-use-vs-get_receipt guidance, nor any statement of prerequisites such as the receipt needing to exist. The 'same as GET /v1/receipts/:id/verify' mapping is the only routing hint.

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