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 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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.2/5.0
Behavior5/5

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

With readOnlyHint/destructiveHint already supplied, the description adds genuinely non-obvious behavior: cost per call ($0.01 via x402 USDC or card key), first 25 free, failed calls free, and 'each call is charged, so repeats are not free' — which explains the otherwise puzzling idempotentHint=false for a pure computation. It also states 'Reads or computes only and changes nothing,' consistent with the annotations, and discloses return shape ('valid true or false and the root the proof leads to') since no output schema exists.

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?

Purpose and algorithm come first, followed by parameter form, returns, use cases, and pricing — a sensible front-loaded order with no filler sentences. The payment sentence is long and merges several facts (price, two payment rails, free tier, failed-call policy), which makes it slightly dense but still load-bearing for a paid tool.

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 5-parameter, annotation-covered, no-output-schema tool, the description covers what it does, how leaves are hashed, what comes back, when to call it, and its cost/safety profile — nearly everything an agent needs. The residual gap is not pointing at merkle_tree for proof construction and not disambiguating the leaf-vs-value path with types.

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%, but the description still adds meaning the schema doesn't: the leaf may be supplied either as a raw hash or as entry values plus Solidity types, and that the value path uses double-keccak OpenZeppelin leaf hashing under sorted-pair keccak256. It leaves one ambiguity unresolved — whether 'types' is only meaningful together with 'value' — but overall it clarifies the leaf/value duality beyond the field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource — 'Check a Merkle proof against a root' — and pins the exact semantics ('the way OpenZeppelin's MerkleProof.verify does on chain (sorted-pair keccak256)'), so it cannot be confused with generic siblings like eth_call or keccak. It stops short of naming its nearest sibling merkle_tree (which builds trees/proofs) as the contrasting tool, so sibling differentiation is implied by the algorithm detail rather than stated.

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?

It gives two concrete trigger scenarios — 'Use before submitting an airdrop claim or to debug an allowlist mint' — which is real when-to-use guidance. It does not say when NOT to use it, nor route the agent to merkle_tree when a proof needs to be generated first, which is the obvious adjacent need.

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