Skip to main content
Glama

verify_receipt_log

Read-onlyIdempotent

Validate whole-file cryptographic integrity of an on-disk JSONL receipt log, returning aggregate chain and Merkle root status for CI gates or post-session audits.

Instructions

Validate whole-file cryptographic integrity of an on-disk JSONL receipt log written by epistemic-guard mcp-proxy, returning aggregate chain and Merkle root status rather than individual entries (use inspect_receipt to fetch entries). Call in CI gates or post-session audits; do not use to check assistant prose (use verify_narration) or mint receipts (signing is confined to the isolated mcp-proxy parent process). Passing both pubkey_file and expected_pubkey_hex requires them to encode the identical 32-byte key (omitting both checks self-consistency against entry 0), and any missing file, key conflict, sequence gap, or tampered digest returns isError=true naming the failing seq.

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": {
      "log_path": "<log_path>"
    },
    "name": "verify_receipt_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
log_pathYesFilesystem path to the JSONL receipt log file.
pubkey_fileNoOptional path to a pinned public key JSON or hex file.
expected_pubkey_hexNoOptional pinned 64-character hex Ed25519 public key.

Output Schema

NameRequiredDescriptionDefault
log_validYesTrue when all signatures, chain links, and Merkle roots hold.
key_pinnedYesTrue when verified against an explicit caller-pinned key.
entry_countYesTotal verified receipt records in the JSONL file.
merkle_rootYesHex-encoded 64-char RFC 6962 SHA-256 Merkle root.
public_key_hexYesHex-encoded 32-byte Ed25519 public key verified across entries.
head_chain_hashYesHex-encoded cumulative sequential SHA-256 chain tip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "entry_count": {
      +      "description": "Total verified receipt records in the JSONL file.",
      +      "type": "integer"
      +    },
      +    "head_chain_hash": {
      +      "description": "Hex-encoded cumulative sequential SHA-256 chain tip.",
      +      "type": "string"
      +    },
      +    "key_pinned": {
      +      "description": "True when verified against an explicit caller-pinned key.",
      +      "type": "boolean"
      +    },
      +    "log_valid": {
      +      "description": "True when all signatures, chain links, and Merkle roots hold.",
      +      "type": "boolean"
      +    },
      +    "merkle_root": {
      +      "description": "Hex-encoded 64-char RFC 6962 SHA-256 Merkle root.",
      +      "type": "string"
      +    },
      +    "public_key_hex": {
      +      "description": "Hex-encoded 32-byte Ed25519 public key verified across entries.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "log_valid",
      +    "entry_count",
      +    "merkle_root",
      +    "head_chain_hash",
      +    "public_key_hex",
      +    "key_pinned"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.1.1
    • removedInput schema / properties / narration
      Removed value: -{
      -  "description": "Optional assistant reply to verify against the log receipts.",
      -  "type": "string"
      -}
    • removedInput schema / properties / user_prompt
      Removed value: -{
      -  "description": "Optional user prompt when `narration` is supplied.",
      -  "type": "string"
      -}
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the read-only, idempotent, closed-world safety profile, yet the description adds real context beyond them: it explains that output is aggregate rather than per-entry, that passing both key parameters requires an identical 32-byte key, that omitting both falls back to self-consistency against entry 0, and that failure surfaces as isError=true naming the failing seq. Those are non-obvious behavioral traits an agent cannot get from the annotations.

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?

The purpose is front-loaded and every clause carries distinct information — exclusions, key interaction rules, error semantics. It is dense and the parenthetical key-constraint sentence is long enough to slow parsing, but nothing is redundant.

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?

For a three-parameter verification tool with an output schema present, the description covers purpose, exclusions, key-conflict rules, fallback behavior, and error signaling. Nothing an agent needs in order to invoke it correctly or interpret a failure is missing.

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 per-parameter baseline is 3; the description earns more by documenting the cross-parameter constraint between pubkey_file and expected_pubkey_hex and the default behavior when both are omitted. What it does not add is path format or encoding detail for log_path, so it stops short of a 5.

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 first clause states a specific verb and resource: validate whole-file cryptographic integrity of an on-disk JSONL receipt log. It immediately narrows scope ('whole-file ... aggregate chain and Merkle root status rather than individual entries') and names the sibling to use for entries, so an agent can distinguish it from inspect_receipt without opening either schema.

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?

It gives explicit when-to-use ('CI gates or post-session audits') and explicit when-not-to-use with the correct alternatives ('do not use to check assistant prose (use verify_narration) or mint receipts'). The boundary against inspect_receipt is also stated in the first sentence, so no alternative is left to inference.

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