Skip to main content
Glama

writ_verify_receipts

Verify the tenant audit-log hash chain and report whether it is intact.

Instructions

Verify the tenant audit-log hash chain and report whether it is intact.

Walks the tenant's receipt chain from its head, recomputing every visited receipt's HMAC. This is the endpoint behind ./writ verify-chain: use it to prove the audit log has not been tampered with.

Args: limit: Max receipts to verify, newest first. Default 200, clamped to the range 1..1000.

Returns the gate payload verbatim: ok (chain intact), checked (receipts verified), tip and tipReceipt (chain head), chainedFrom, legacyCount, and complete. Verification stops at legacy (pre-chain) receipts and reports them as legacyCount.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "writ_verify_receipts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.20

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses the traversal from chain head with HMAC recomputation, the termination condition at legacy receipts, and the clamp on limit. It omits auth/permission requirements and cost or runtime characteristics for a 1000-receipt walk.

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 purpose, then Args and Returns sections, so an agent can stop early. Slightly verbose in places (the CLI reference and the redundant restatement of what 'Returns' already implies), but no sentence is wasted.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still enumerates the returned fields (ok, checked, tip, chainedFrom, legacyCount, complete) and the legacy-stop semantics. For a zero-required-parameter read tool, nothing needed to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully compensates for the single parameter: newest-first ordering, default of 200, and hard clamp to 1..1000. That is more meaning than the bare integer schema conveys.

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 ('Verify the tenant audit-log hash chain') plus the outcome ('report whether it is intact'), which clearly separates it from receipt-listing and token-verification siblings. The CLI mapping ('the endpoint behind ./writ verify-chain') further pins down what it is.

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?

Gives an explicit use case - 'use it to prove the audit log has not been tampered with' - which is enough context to select it over writ_receipts or writ_explain_receipt. It stops short of naming when-not to use it or naming an alternative explicitly.

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