Skip to main content
Glama

chain_merkle_verify

Read-only

Merkle proof verifier (airdrop / allowlist claims) — Check whether a Merkle proof proves a claim against a root, the same way OpenZeppelin MerkleProof.verify does on-chain (sorted-pair keccak256). root= and proof= (comma-separated 32-byte hashes) required, plus either values= (comma list matching types=, default address,uint256, e.g. wallet,amount in wei) or leaf= (32-byte hash). encoding=standard (default: OpenZeppelin StandardMerkleTree double-hash of abi.encode) or packed (keccak256(abi.encodePacked(values)), used by older Uniswap-style airdrops, e.g. types=uint256,address,uint256 for index,account,amount). Returns valid true/false, the computed root and the leaf. Offline. Price: $0.002 USDC (Base, via x402).

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>",
      "values": "<values>"
    },
    "name": "chain_merkle_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootYes0xd4dee0beab2d53f2cc83e567171bd2820e49898130a22622b10ead383e90bd77
proofYes0xeb02c421cfa48976e66dfb29120745909ea3a0f843456c263cf8f1253483e283
valuesYes0x2222222222222222222222222222222222222222,2500000000000000000

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/destructiveHint=false, and the description adds genuinely new behavior: it is offline, it returns valid true/false plus the computed root and leaf, and it costs $0.002 USDC via x402 on Base. The one soft tension is 'Offline.' against openWorldHint=true, though this is not a direct contradiction; no auth or rate-limit detail is given beyond pricing.

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-loaded with purpose, then requirements, then encodings, then return and price — a sensible order with no filler sentences. It is dense and parenthetical-heavy in the middle (proof/values/encoding semantics crammed into one block), which slightly hurts scannability.

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 conceptually subtle cryptographic tool with no output schema, the description covers inputs, the two encoding conventions, the return shape, and cost — enough to call it correctly in the common case. The gap is the undocumented schema properties (leaf/types/encoding) and the required-vs-optional mismatch on values, which could cause a schema validation failure if an agent follows the description literally.

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?

The schema's coverage is nominally 100% but its 'descriptions' are just sample hashes, so the description does the real semantic work: proof is comma-separated 32-byte hashes, values is a comma list matching types= (default address,uint256, with amounts in wei), and the two encodings are explained with worked examples. However, it introduces leaf=, types= and encoding= that do not appear in the schema properties, and it says 'either values= or leaf=' while the schema marks values as required — a real conflict for an agent constructing the call.

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 ('Merkle proof verifier') plus the exact domain (airdrop / allowlist claims) and the on-chain analogue it mirrors (OpenZeppelin MerkleProof.verify, sorted-pair keccak256). This is clearly distinguishable from the sibling chain_merkle_build (constructing trees) 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear situational context for verification and, more usefully, decision guidance among the encoding modes: 'standard' (OpenZeppelin StandardMerkleTree) versus 'packed' (older Uniswap-style airdrops with an explicit types= ordering). It does not explicitly name when to prefer a sibling such as chain_merkle_build or chain_verify_signature, so it stops short of full alternative routing.

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