Skip to main content
Glama

Merkle proof verify

merkle_verify
Read-only

Check a Merkle proof against a root, the way OpenZeppelin's MerkleProof.verify does on chain (sorted-pair keccak256): give the leaf hash, or the entry's values and their Solidity types (double-keccak OpenZeppelin leaf). Returns valid true or false and the root the proof leads to. Use before submitting an airdrop claim or to debug an allowlist mint. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "root": "<root>",
      "proof": "<proof>",
      "leaf": "<leaf>"
    },
    "name": "merkle_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
leafYesThe leaf hash, or the entry's fields (comma-separated or a JSON array) to hash with types
rootYesThe Merkle root (32-byte hex)
proofYesThe proof: JSON array or comma-separated 32-byte hashes
typesNoSolidity types of value's fields (default address,uint256)
valueNoThe entry's fields, instead of leaf (comma-separated or a JSON array)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description goes further by disclosing cost ($0.01/call via x402 USDC or card key), the first-10-free and failed-calls-free terms, and the non-obvious reason repeats are not free, which explains idempotentHint=false. It also states the return contents (valid flag plus the resulting root), though it doesn't cover error behavior or limits.

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-loads the core semantics and hashing convention, then layers usage, then billing; each sentence carries distinct information. It is dense but not padded, with only minor cost in packing pricing detail into the same paragraph as behavior.

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?

For a five-parameter verification tool with no output schema, the description covers the hashing convention, the two input modes, the return values, and the billing model. What remains thin is failure/edge-case behavior when the proof is malformed versus merely invalid.

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 a 3 is the baseline, but the description adds genuine meaning: it explains that 'leaf' may be either a hash or the entry's field values, that supplying 'value' plus 'types' triggers the double-keccak OpenZeppelin leaf, and it gives the default types (address,uint256). That disambiguates the leaf/value/types interaction the terse schema only hints at.

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 ('Check a Merkle proof against a root') and pins the exact semantics (OpenZeppelin sorted-pair keccak256), which distinguishes it from the sibling 'hash' and 'merkle_tree' tools. An agent can tell what this does without opening the schema.

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 concrete use cases ('before submitting an airdrop claim or to debug an allowlist mint'), which is real when-to-use guidance. It stops short of naming an alternative tool or stating when not to use it, so it falls short of a 5.

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.

Resources