Skip to main content
Glama

Decode event logs to typed JSON (paid $0.003)

decode_log

PAID $0.003 (x402, USDC on Base). FLAGSHIP: decode EVM event LOGS to human-readable JSON. Give {chain, tx_hash} to decode every log in a transaction, OR {chain, address, topics[], data} for a single log; optional {abi}. Returns each event's name, canonical signature and named/typed args — correctly handling tuple/array/nested params, anonymous events, and indexed vs non-indexed. Resolves the ABI via Sourcify/Blockscout + 4byte event signatures when none is supplied. Without payment returns the x402 challenge; pass x_payment to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiNoOptional contract ABI (JSON array or JSON string). If omitted, the ABI is resolved from the verified source (Sourcify/Blockscout) or 4byte.directory.
dataNoLog data field (0x hex) holding the non-indexed args.
chainYesEVM chain: ethereum | base | arbitrum | optimism | polygon | bsc.
topicsNoLog topics array (topic0 is the event signature hash for non-anonymous events).
addressNoContract address of a single log (used with topics + data).
tx_hashNoTransaction hash (0x + 64 hex) — decodes every event log in the tx.
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.8/5.0
Behavior5/5

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

With no annotations provided, the description carries full responsibility and does an excellent job. It discloses the paid nature ($0.003, x402, USDC on Base), the 402 challenge flow without payment, the use of x_payment to settle, the handling of complex parameter types (tuple/array/nested, anonymous events, indexed vs non-indexed), and the ABI resolution via Sourcify/Blockscout/4byte. This is far beyond minimal disclosure.

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?

The description is dense but every sentence earns its place. It front-loads the payment warning, then covers both usage modes, output details, ABI resolution, and the nondisclosure behavior. No filler, no redundancy, and structure follows a logical flow from payment to usage to behavior.

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?

For a tool with no output schema, the description impressively covers return values (event name, canonical signature, named/typed args), the two invocation patterns, payment settlement, and ABI resolution. It is complete enough for an agent to invoke the tool correctly and interpret results, given the complexity of EVM log decoding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the schema covers all 7 parameters at 100%, the description adds critical combinatoric semantics: it explicitly explains that chain is required and then either tx_hash OR address+topics+data must be provided, and that abi is optional. It also clarifies the x_payment flow and backward behavior, giving meaning far beyond the schema's individual field definitions.

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 clearly states the tool decodes EVM event logs to human-readable JSON, with a specific verb and resource. It distinguishes itself from sibling tools like decode_calldata (which handles calldata) and selector_lookup (which looks up function selectors) by focusing on logs and even calling itself 'FLAGSHIP' for that purpose.

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 clear context on when to use: two input modes are explained (tx_hash for all logs in a transaction, or address+topics+data for a single log). It also notes that ABI resolution is automatic, implying abi_fetch is not needed. However, it does not explicitly name sibling tools or provide 'when not to use' guidance, so it stops short of a perfect score.

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.