Skip to main content
Glama

cast_calldata_decode

Decode raw transaction calldata into function arguments by providing a function signature and hex calldata.

Instructions

Decode raw transaction calldata into function arguments (cast calldata-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>",
      "calldata": "<calldata>"
    },
    "name": "cast_calldata_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
calldataYesRaw calldata hex string (with 4-byte selector)
signatureYesFunction signature, e.g. "transfer(address,uint256)"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description must carry behavioral disclosure, but it only restates the operation. It does not state that decoding is local/read-only, how malformed calldata or a signature mismatch is handled, or what the decoded output looks like.

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 unnecessary elaboration. The parenthetical CLI alias is brief and does not obscure the operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and both parameters are fully described in the schema, so the core call can be made. However, with no annotations and no output schema, the definition should say more about return format and failure behavior; as written it is adequate but incomplete.

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 100%: the schema already documents calldata as a hex string with a 4-byte selector and signature with an example. The description adds only the high-level phrase 'raw transaction calldata' and does not add format or constraint detail beyond the schema.

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 states a specific verb ('Decode') and resource ('raw transaction calldata into function arguments'), so the core operation is clear. It does not explicitly contrast with the sibling cast_abi_decode, so it stops short of full sibling differentiation.

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 when-to-use guidance, no prerequisites, and no exclusion versus cast_abi_decode or other decode/encode siblings. The agent must infer usage from the tool name and parameter schema.

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