Skip to main content
Glama

verify_peer_ledger

Verify an external ledger's integrity by recomputing its hash chain from JSONL text, identifying the first tampered line and whether all rows check out.

Instructions

Another agent handed you its exported ledger as JSONL text — decide whether to trust it. Recomputes the hash chain over the text alone (no access to their machine, no writes on yours) and returns {ok, rows, first_break, declared_breaks}. first_break is the INTEGER LINE NUMBER of the first bad row (or null if none), so you can point at exactly where their history stops adding up. ok is three-valued: true = every row verified; null = nothing undeclared broke but the scan was bounded (unchained rows, an empty export, or breaks the peer DECLARED) — read verified_scope, and do not treat null as a pass; false = tampered. declared_breaks counts breaks the peer named and pinned itself, which is a mark of honesty, not of integrity: they are still breaks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strictNoTreat ANY unchained row as a break, and ignore the peer's own declarations. Use when the peer claims a log chained from genesis.
jsonl_textYesThe peer's whole exported ledger, one JSON object per line, verbatim. Do not reformat it — re-serializing changes the bytes the chain covers.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.7.1

TDQS

A4/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 largely succeeds: it discloses zero side effects, no access to the peer's machine, and a three-valued ok result with an explicit warning not to treat null as a pass. It also explains first_break as a line number and nuances declared_breaks. The one flaw is referencing `verified_scope` without defining it, leaving a gap in an otherwise thorough behavioral disclosure.

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 description is long (~180 words) but dense and front-loaded with the trigger scenario and core operation. Every sentence earns its place given there is no output schema to offload return-value semantics. The dangling reference to `verified_scope` is a minor structural wart, and the 'mark of honesty, not integrity' phrasing is slightly elaborate, but overall the length is justified by the complexity.

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

Completeness3/5

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

For a tool with no annotations and no output schema, the description explains most of the return semantics (ok, first_break, declared_breaks) and side effects. However, `rows` is never described, and the description explicitly instructs the agent to read `verified_scope` without defining it — a real gap for an agent trying to interpret the result. Error behavior for malformed JSONL is also unaddressed, leaving the description mildly incomplete for a complex trust-decision 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 coverage is 100%, so the baseline is 3. The description adds contextual reinforcement (verification operates 'over the text alone') but does not materially enrich the parameters beyond what the schema already says, particularly for strict, which the schema documents fully. No deduction, but no credit beyond baseline.

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, resource, and scenario: decide whether to trust another agent's exported ledger as JSONL text by recomputing its hash chain. The framing ('no access to their machine, no writes on yours') implicitly but clearly distinguishes it from sibling tools like ledger_verify, which operate on one's own ledger, and ledger_append/declare_break, which mutate or annotate it.

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?

The opening line gives a clear, concrete trigger condition: use this when another agent hands you its exported ledger and you must decide whether to trust it. It does not explicitly name alternatives or state when not to use it (e.g., 'use ledger_verify for your own ledger'), so it stops short of a 5, but the context is unambiguous.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dan8433-user/ledger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server