Skip to main content
Glama

Function signatures for a 4-byte selector, and for calldata

evm_decode
Read-only

Function signatures for a 4-byte selector, and for calldata the decoded arguments. Signatures come from the openchain.xyz database, with 4byte.directory as fallback. Calldata is decoded against each candidate until one fits the selector and the arguments; bigints are returned as strings. Read-only. Related tools on this server, for a different need: evm_call when you need to read the result of a read-only EVM contract function; evm_address when you need native balance, nonce and account type of an EVM address. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "evm_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoCalldata, 0x followed by hex (at least 4 bytes)
selectorNoOr only the selector: 0x followed by 8 hex characters

Output Schema

NameRequiredDescriptionDefault
sourceNo
decodedNo
selectorNo
checkedAtNo
signaturesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, but the description adds substantial operational detail: signature sources (openchain.xyz with 4byte.directory fallback), the candidate-matching strategy used to disambiguate calldata, bigint-as-string output, and x402 pricing with the note that failed calls are not charged. The 'Read-only' claim is consistent with the annotations rather than contradicting them.

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?

The core capability is front-loaded and the pricing and routing sentences are short and useful. The opening sentence is grammatically awkward ('and for calldata the decoded arguments'), which slightly slows parsing, but there is no filler content.

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

Completeness5/5

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

With an output schema present, the description need not explain return shapes, and it still covers the things structure cannot: data provenance, fallback behavior, how ambiguous candidates are resolved, and the payment model. Nothing an agent needs to decide to call or how to interpret a successful call is missing.

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 both 'data' and 'selector' are already documented with formats and length constraints. The description confirms the two modes exist but adds no syntax or precedence detail beyond the schema — for example, whether neither, one, or both may be supplied. Baseline 3 applies when the schema does the heavy lifting.

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 both operations precisely: resolving a 4-byte selector to candidate function signatures, and decoding calldata into arguments. The verb/resource pair is unambiguous and clearly different from the sibling read tools (evm_call, evm_address) that it explicitly routes away from.

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?

It states what the tool is for (selector or calldata resolution) and explicitly names two siblings with the conditions that select them: evm_call for reading a contract function result, evm_address for balance/nonce/type. It does not spell out a when-not condition for this tool itself or clarify choosing between supplying 'data' vs 'selector', but the context is otherwise clear.

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.

Resources