Skip to main content
Glama
franckyo
by franckyo

Decode raw calldata

decode_calldata
Read-only

Split EVM calldata into a 4-byte selector and 32-byte words, flag potential addresses, and identify well-known function names.

Instructions

Split calldata into a 4-byte selector and 32-byte words, flag word values that look like addresses, and name the function when the selector is a well-known one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesCalldata hex.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

The description discloses meaningful behavioral detail beyond the readOnlyHint annotation: it explains that the output consists of a selector, 32-byte words, address-like flags, and possibly a function name. This gives the agent a clear mental model of what the tool computes, though edge-case behavior is not covered.

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?

A single, well-structured sentence that front-loads the core action and uses no filler. Every clause contributes specific operational detail, making it compact and immediately useful.

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 simple one-parameter, read-only tool, the description covers the main output behavior well. It omits guidance on malformed or non-word-aligned calldata, but given the low complexity and the readOnlyHint annotation, the definition is largely sufficient.

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?

Schema coverage is 100% and the schema already describes 'data' as 'Calldata hex.' The description adds value by explaining how the data is interpreted—split into a 4-byte selector and 32-byte words—which clarifies what kind of input is expected beyond a generic hex string.

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?

The description names a specific verb ('Split'), a precise resource ('calldata'), and detailed behaviors: extracting the 4-byte selector, splitting into 32-byte words, flagging address-like words, and naming known functions. This clearly differentiates it from siblings like function_selector and disassemble.

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 about when to use this tool versus siblings such as function_selector or eth_call. The intended use is only implied by the operational description, and no alternatives or exclusions are mentioned.

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