Skip to main content
Glama

Decode calldata, an event or a revert

zenith_decode
Read-only

Decode raw hex calldata, event logs, or revert data using a verified contract ABI, a supplied signature, or ERC-20 rules to see what a Canton EVM transaction or error did.

Instructions

Decodes raw hex using the contract's verified ABI, a signature you give, ERC-20, or the Gateway's events and errors (including the inbox's NotWholeQuanta error).

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": {
      "kind": "<kind>",
      "data": "<data>"
    },
    "name": "zenith_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesCalldata, event data or revert data
kindYes
topicsNoEvent topics (for kind=event)
addressNoContract address, to use its verified ABI
signatureNoFunction or event signature to decode with

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds the useful detail that decoding falls back across verified ABI, a supplied signature, ERC-20, and Gateway events/errors, but it never says what happens when none of those resolve or how failures surface.

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?

A single front-loaded sentence with the verb first and no filler; the enumeration of decode sources earns its length. The trailing parenthetical about the inbox's NotWholeQuanta error is narrowly specific but still relevant to the revert path.

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 read-only tool with no output schema, the description covers what the tool resolves against across all three kinds, which is the main ambiguity. The notable remaining gap is that with no output schema, nothing indicates the shape of the decoded result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80% and both address ('to use its verified ABI') and signature ('to decode with') are already documented in the schema. The description restates that relationship in prose but adds no new meaning about kinds, topics, or the required data format, so it lands at the baseline.

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 uses a specific verb ('Decodes') on a specific resource ('raw hex') and enumerates the ABI sources it can resolve against, so an agent knows exactly what comes back in decoded form. It stops short of naming a sibling or stating when to prefer this over zenith_read_contract, leaving the differentiator implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied: the wording suggests you call it when you have raw hex to interpret and that address or signature drives resolution, but there is no explicit when-to-use, when-not-to-use, or alternative routing. An agent must infer the choice between supplying address, signature, or relying on ERC-20/Gateway fallbacks.

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