Skip to main content
Glama

recompute_merkle_root

Read-onlyIdempotent

Recompute a dokimo-merkle-v1 root locally — no network call, no anchor check.

Hash ``leaf`` in the leaf domain (H(0x00 ‖ leaf)) and replay ``proof_path`` —
a list of ``[sibling_hash, side]`` where side is "L" or "R" — hashing internal
nodes as H(0x01 ‖ left ‖ right). Compare the returned root to the ``root`` in an
evidence package yourself; if it differs, the package was tampered with.

Returns ``{recomputed_root, merkle_scheme, steps}``.

Input Schema

NameRequiredDescriptionDefault
leafYesThe raw leaf value (e.g. a JSON string like '{"k":"total_assets","v":"..."}'). Hashed in the leaf domain as H(0x00 ‖ leaf).
proof_pathYesOrdered Merkle proof path: a list of [sibling_hash_hex, side] pairs, where side is "L" if the sibling is on the left or "R" if on the right. Empty list for a single-leaf tree.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is covered. The description adds valuable context: it is purely local, performs no network or anchor check, and specifies the exact return shape {recomputed_root, merkle_scheme, steps}.

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 local-only constraint is front-loaded, then the algorithm, then the verification instruction. It is somewhat dense but every sentence carries functional information and nothing 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?

Although there is no output schema, the description names the return fields, and it fully specifies the hashing scheme and verification procedure. An agent has everything needed to invoke and interpret the result.

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 baseline is 3, but the description adds real meaning: it explains the leaf is hashed in the leaf domain (H(0x00 ‖ leaf)) and that proof_path is replayed with internal nodes hashed as H(0x01 ‖ left ‖ right), with side semantics restated. This algorithmic context goes beyond the schema's field-level definitions.

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+resource (recompute Merkle root) and immediately scopes it as local-only, explicitly contrasting with network and anchor-check behavior. The distinction from verify_evidence_package is clear from the 'no network call, no anchor check' framing.

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?

Tells the agent what to do with the result ('compare the returned root to the root in an evidence package yourself; if it differs, the package was tampered with'), giving clear usage context. It stops short of naming verify_evidence_package as the alternative for full package verification, leaving that inference to the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.