Skip to main content
Glama

Decode Transaction

decode_transaction
Read-only

Decode a transaction's calldata into a human-readable function name and arguments. Also returns transaction status (1=success, 0=revert), gas used, and block number. Optionally provide an ABI for precise decoding; otherwise uses 4byte.directory. Supports Ethereum mainnet and Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tx_hashYesTransaction hash (0x… 64 hex chars)
abi_jsonNoOptional ABI JSON array for decoding. If omitted, 4byte.directory is used.
chain_idNoChain ID (1=Ethereum, 8453=Base)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNodecoded_args values are raw ABI-decoded types; uint256 amounts have not been decimals-formatted — do not call read_contract or get_erc20_balance to interpret them unless the user explicitly asks. Addresses (from_address, to_address, decoded_args) are plain hex — do not call resolve_ens to label them unless the user explicitly asks.
statusNo1=success, 0=revert, None=pending
tx_hashYes
chain_idYes
gas_usedYes
value_ethYes
to_addressYes
block_numberYes
decoded_argsYes
from_addressYes
raw_calldataYes
decode_sourceYes
function_nameYes
function_selectorYes

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the description need not restate safety. It adds value by revealing the default fallback to 4byte.directory when no ABI is given, the specific return fields (status, gas used, block number), and chain support. This exceeds the annotation's minimal safety signal without contradicting it.

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?

Three sentences, front-loaded with the core action, and every sentence earns its place. No redundant phrasing or filler. The structure is ideal: purpose, return values, then parameter guidance.

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?

Given there is an output schema (return shape is documented), the description need not enumerate every field. It covers purpose, parameter behavior, fallback logic, and chain support, which is sufficient for a read-only tool with high schema coverage. No critical gaps remain.

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 schema already documents all three parameters. The description adds little beyond restating that abi_json is optional and that 4byte.directory is the fallback, which aligns with the schema. This is baseline for high coverage; no additional semantic depth is offered.

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 starts with a specific verb and resource: 'Decode a transaction's calldata into a human-readable function name and arguments.' It clearly distinguishes from sibling tools like get_transaction (raw transaction retrieval) and read_contract (state reads) by specifying the calldata decoding purpose. It also lists supplementary outputs (status, gas used, block number), further clarifying scope.

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?

The description provides clear context on when to use the optional ABI parameter (for precise decoding) versus relying on the default 4byte.directory. It also states supported chains (Ethereum mainnet and Base). However, it does not explicitly contrast with alternative tools (e.g., when to use get_transaction instead), so it stops short of full exclusions.

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

A3.9/5.0
Disambiguation4/5

Most tools target distinct blockchain/DeFi resources and actions. A few pairs like get_lending_rates vs get_yield_rates and get_defi_positions vs get_liquidation_risk have overlapping boundaries, but detailed descriptions and explicit redundancy notes (e.g., get_eth_balance vs get_wallet_portfolio) reduce confusion.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern (e.g., get_block, convert_currency, decode_transaction). The only minor deviations are noun-first names like http_fetch and web_search, but the style is uniform and predictable.

Tool Count2/5

At 27 tools, the server exceeds the 25-tool threshold for 'too many' and feels heavy. While the breadth of DeFi and crypto features justifies some size, the number is unwieldy for an agent to scan efficiently and could be consolidated (e.g., merging balance-related tools).

Completeness4/5

The tool surface covers a wide range of blockchain data: balances, prices, TVL, yields, DEX quotes, gas, block/transaction details, approvals, and DeFi positions. Gaps include lack of wallet transaction history and NFT support, but these are beyond the server's clear focus on read-only DeFi analytics.

Resources