Skip to main content
Glama

chain_merkle_build

Read-only

Merkle tree builder for airdrops and allowlists (OpenZeppelin format) — Build an OpenZeppelin StandardMerkleTree from up to 2000 rows (e.g. address,amount) and get the root, every row's leaf and proof, and (for up to 500 rows) the full ozDump that StandardMerkleTree.load() accepts. Leaves are keccak256(bytes.concat(keccak256(abi.encode(values)))) with sorted-pair hashing, exactly what OpenZeppelin MerkleProof.verify expects on-chain; output matches @openzeppelin/merkle-tree byte for byte. entries= rows separated by ; and values by , (uint values in base units, e.g. wei). Optional: types= (default address,uint256; supports address, bool, bytes32, uint8..uint256), for= (return only the proof for rows whose first value matches, e.g. one wallet). Offline and deterministic; 400 on malformed or duplicate rows. Price: $0.004 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": {
      "entries": "<entries>"
    },
    "name": "chain_merkle_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesYes0x1111111111111111111111111111111111111111,5000000000000000000;0x2222222222222222222222222222222222222222,2500000000000000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the annotations: size caps (2000 rows, 500 for ozDump), error behavior (400 on malformed or duplicate rows), determinism, an exact compatibility guarantee ('byte for byte' with @openzeppelin/merkle-tree), and a payment cost ($0.004 USDC via x402). Those are the operational facts an agent needs before committing a large, paid request.

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?

Dense but front-loaded: purpose first, then format, then limits, then price. It is long for one paragraph and leans on parentheses and semicolons, though nearly every clause (hash construction, size caps, cost) carries decision-relevant information.

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?

There is no output schema, and the description compensates by enumerating the returned fields and the ozDump format. The remaining gap is the mismatch between the optional `types`/`for` parameters it advertises and the schema that does not declare them.

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 documents only `entries`, so the description carries the real load: row/value delimiters, the base-unit rule for uints, and the types/for options. However, `types` and `for` are described as usable parameters yet are absent from the input schema, which could lead an agent to pass arguments the schema will reject.

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 artifact: 'Build an OpenZeppelin StandardMerkleTree from up to 2000 rows' and enumerate exactly what comes back (root, leaf, proof, ozDump). The 'builder' framing paired with the hash-construction detail makes it unmistakably distinct from a verify-style sibling.

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 use case is explicit ('airdrops and allowlists', output verified by MerkleProof.verify on-chain), and the 'for=' filter is explained as the path for a single wallet. It lacks an explicit when-not clause or a named alternative, so the agent must infer that verification/checking belongs elsewhere.

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