Skip to main content
Glama

cast_abi_decode

Decode ABI-encoded hex data into human-readable values using a function signature or output types, with optional input-mode handling for 4-byte selectors.

Instructions

Decode ABI-encoded hex data back into human-readable values (cast abi-decode).

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": {
      "signature": "<signature>",
      "data": "<data>"
    },
    "name": "cast_abi_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesHex-encoded data to decode
inputNoDecode as input data (with 4-byte selector) instead of output
signatureYesFunction signature or output types, e.g. "balanceOf(address)(uint256)"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the core transformation into human-readable values, but does not mention read-only nature, error behavior for malformed hex, or how the signature drives decoding, leaving some gaps for a decode operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no redundant wording. It efficiently states the action and result.

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 relatively simple decode tool with complete parameter descriptions in the schema and no output schema, the definition is largely complete. It could mention read-only safety and error expectations, but the core transformation is clear.

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 description coverage is 100%, so all three parameters are already documented in the schema. The description adds no parameter-specific meaning beyond the general statement that hex data is decoded into human-readable values.

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 gives a specific verb ('Decode') and resource ('ABI-encoded hex data') and states the output ('human-readable values'). It is clearly distinct from cast_abi_encode by inversion, though it does not explicitly name the sibling.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives such as cast_abi_encode or cast_calldata_decode. The parenthetical '(cast abi-decode)' only echoes the CLI command and does not establish selection criteria.

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