Skip to main content
Glama

Decode a function call's calldata (paid $0.002)

decode_calldata

PAID $0.002 (x402, USDC on Base). Decode a contract function call. Give {chain, to?, data, abi?}; get the 4-byte selector resolved to a function signature (via provided ABI, the verified contract source, or 4byte.directory) plus fully decoded, typed arguments (tuples/arrays/nested included). Without payment returns the x402 challenge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoContract address the call targets (optional; enables verified-ABI resolution).
abiNoOptional contract ABI (JSON array or JSON string). If omitted, the ABI is resolved from the verified source (Sourcify/Blockscout) or 4byte.directory.
dataYesCalldata (0x hex, at least the 4-byte selector).
chainYesEVM chain: ethereum | base | arbitrum | optimism | polygon | bsc.
x_paymentNox402 payment payload (base64) for this PAID decode. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses the paid nature ($0.002 via x402), the challenge returned without payment, and the resolution sources. It doesn't mention error handling but covers key behaviors.

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?

Two sentences with front-loaded payment info, clear and compact. The shorthand input/output notation is efficient and adds no redundancy.

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?

No output schema, but the description explains the return value (resolved signature plus typed arguments) and the non-payment challenge. It covers the key aspects given the tool's complexity.

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 the description adds marginal value. It summarizes the input format but does not explain x_payment beyond what the schema already provides. Baseline 3 is appropriate.

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?

Description clearly states it decodes a contract function call's calldata, resolving the 4-byte selector to a signature and decoding arguments. This distinguishes it from siblings like decode_log (logs) and selector_lookup (selectors only).

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

Usage Guidelines4/5

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

Provides explicit input format 'Give {chain, to?, data, abi?}' and explains the resolution priority. It does not explicitly exclude alternative tools, but the specialization is clear from the description and title.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: fetching ABIs, decoding function calldata, decoding event logs, and resolving selectors/topics. There is no overlap in what they do, and their scopes are mutually exclusive.

Naming Consistency4/5

All names are lowercase snake_case and concise, but they mix verb-first (decode_calldata, decode_log) with noun-first (abi_fetch, selector_lookup) patterns. This is a minor deviation from a uniform verb_noun convention, but still predictable and readable.

Tool Count5/5

Four tools is a well-scoped size for a specialized decoding server. Each tool covers a necessary step in the decoding workflow without redundancy or bloat.

Completeness5/5

The tool set covers ABI retrieval, calldata decoding, event log decoding, and signature lookup, providing a complete lifecycle for decoding EVM data with no obvious dead ends. Optional ABI inputs allow flexible fallback to public sources.