Skip to main content
Glama

Decode calldata

decode_calldata
Read-only

Decode EVM calldata by looking up 4-byte selectors via Openchain/4byte, or pass a signature to resolve function calls.

Instructions

Decode EVM calldata; looks up the 4-byte selector in openchain/4byte unless a signature is given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
signatureNo

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 safety and external-dependency profile are partly covered. The description usefully confirms the external lookup against openchain/4byte and the signature override, but says nothing about behavior when the selector is unknown, error modes, or network requirements.

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 tight sentence, front-loaded with the action and followed by the resolution rule. No filler.

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?

For a two-parameter tool with no output schema and no parameter descriptions in the schema, the description covers the core mechanism but omits input format for 'data', the expected return shape, and failure behavior for unrecognized selectors.

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 0%, so the description carries the burden for both parameters. It explains the role of 'signature' (bypasses the 4byte lookup) but says nothing about 'data' format (e.g., 0x-prefixed hex) or whether a signature must be a full ABI function signature.

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?

States a specific verb (Decode) and resource (EVM calldata), plus the resolution mechanism (4-byte selector lookup). It does not, however, distinguish itself from siblings like decode_transaction or abi_utils, which an agent could easily confuse it with.

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?

The clause 'unless a signature is given' implies the invocation choice: pass a known signature to skip the lookup. But there is no explicit when-to-use guidance or exclusion relative to decode_transaction/abi_utils, so the agent must infer the boundary itself.

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