Skip to main content
Glama

EVM transaction decoder: method, decoded events, swaps, token flows, revert reason (8 chains)

tx_decode
Read-onlyIdempotent

Typed decode of any tx on base, ethereum, bsc, arbitrum, optimism, polygon, gnosis or celo (chain optional: all 8 are searched): success/reverted, method signature from a known-selector table (args for transfer/approve/transferFrom), every log decoded where known (ERC-20/721/1155 transfers with symbols and decimal amounts, approvals with an unlimited flag, WETH deposit/withdraw, Uniswap V2/V3/V4 swaps, ownership/upgrade, EIP-3009), the sender's net token flows, fee incl. L1 fee, and for reverted txs a decoded revert reason (approximate replay at the previous block). Price: $0.003 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: GET /api/tx-decode.

Input Schema

NameRequiredDescriptionDefault
txYes0x transaction hash
chainNooptional; omit to search all 8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent/open-world; the description adds substantial context beyond them: the $0.003 USDC price, the x402 402-response-and-retry dance, and the important limitation that revert reasons are an 'approximate replay at the previous block'. That last caveat is the kind of behavioral detail annotations cannot express.

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?

Front-loaded with the purpose and chain scope, then outputs, then pricing. It is dense but nearly every clause carries information. It is however one long run-on sentence, and the log-type enumeration is listy enough to be skimmable-fragile.

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?

No output schema exists, so the description must describe return values — and it does thoroughly: success/revert status, method signature, decoded logs, net token flows, fees including L1. Combined with payment mechanics, an agent has everything needed to call it and interpret the result.

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% and the enum already lists all eight chains, so the schema carries the semantics. The description restates the omit-to-search-all behavior and the chain list but adds no syntax or format detail beyond it; baseline 3 applies.

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?

States a specific verb and resource ('Typed decode of any tx') and enumerates the eight supported chains plus the exact decoded outputs (method sig, logs, token flows, fee, revert reason). This clearly separates it from siblings like tx_find or token_transfers, which locate data rather than decode a transaction.

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?

Gives concrete operational guidance: 'chain optional: all 8 are searched', the x402 payment flow including what an unpaid call returns and how to retry, and that the same capability exists at GET /api/tx-decode. It does not name a sibling alternative or state when not to use it, so it falls short of a 5.

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