Skip to main content
Glama

explain_tx

Read-onlyIdempotent

Decode and explain any confirmed blockchain transaction: top-level calls, token transfers, balance changes, fees, and flagged anomalies. Get a plain-English narrative for debugging, learning, or forensics across EVM, TRON, and Solana.

Instructions

Narrative analysis of a single confirmed transaction. AGENT BEHAVIOR: when the user pastes a tx hash (or an Etherscan / Arbiscan / Polygonscan / Basescan / Optimistic-Etherscan / Tronscan / Solscan URL containing one) and asks 'why did this fail / what does this do / what happened', call THIS tool — do NOT WebFetch the explorer or a Tenderly/Phalcon dashboard URL. Those pages are JS SPAs that render an empty shell when fetched server-side; this tool decodes the same data structurally and returns a verbatim-relayable narrative. Walks what actually happened: top-level method/instruction call, decoded ERC-20/TRC-20 Transfer + Approval events (or Solana SPL balance deltas), per-token balance changes for the wallet, fee paid, and a heuristics block flagging surprises (failed status, unlimited approval, dust outflow, transfer-to-zero burn, high-gas vs. moved value, unexpected no-state-change). Returns BOTH a structured envelope and a pre-rendered narrative string for verbatim relay (control via format). Distinct from get_transaction_status (just confirmation status) and the prepare→preview→send pipeline (forward-looking). Useful for debugging ("why did this swap return less than the quote?"), learning ("what does this contract call actually do?"), forensics ("what addresses did this tx touch?"), and address-poisoning triage. v1 covers EVM (Ethereum/Arbitrum/Polygon/Base/Optimism), TRON, and Solana — Bitcoin is deferred. v1 reads top-level execution only; internal calls / CPI / DeFi compositions surface via balance & event effects rather than as separate step rows. Pricing is current spot via DefiLlama (not historical at tx time). Optional wallet arg recomputes balance/approval changes from THAT wallet's perspective — defaults to tx sender. Read-only — no signing, no broadcast.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesTransaction identifier. EVM: 32-byte hex (with or without `0x`). TRON: 32-byte bare hex. Solana: 64-byte signature as base58 (86–88 chars).
chainYesWhich chain the tx lives on. Required because EVM / TRON / Solana post-mortems use different RPC paths and payload shapes.
walletNoOptional. When supplied, balance + approval changes are computed FROM THIS WALLET'S PERSPECTIVE — outflows are negative, inflows positive. When omitted, defaults to the tx sender (the canonical perspective). Pass an explicit wallet for recipient-side narratives.
formatNo"structured" returns the JSON envelope only. "narrative" returns only the pre-rendered string. "both" (default) returns both — agents typically use the narrative for verbatim relay and the structured for follow-up questions.both
Behavior5/5

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

Adds extensive behavioral context beyond annotations, including chain support, limitation to top-level execution, spot pricing, optional wallet perspective, and return format options. No contradiction with annotations.

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 description is thorough but somewhat lengthy; however, it is well-structured with clear sections and front-loaded purpose. Every sentence adds value given the tool's complexity.

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 complex tool covering multiple chains, return types, and limitations, the description is remarkably complete. It addresses edge cases (address poisoning), version notes, and pricing source, leaving no major gaps.

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?

Input schema has 100% coverage with descriptions; the description enriches each parameter with usage context (e.g., hash format variants, why chain is required, wallet perspective, format options).

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's purpose: 'Narrative analysis of a single confirmed transaction.' It provides specific verb-resource mapping and distinguishes from sibling tools like get_transaction_status and the prepare-preview-send pipeline.

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

Usage Guidelines5/5

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

Explicitly states when to use (user asks 'why did this fail' etc.) and when not to (do not WebFetch explorer pages). Also contrasts with sibling tools such as get_transaction_status and the prepare pipeline.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/vaultpilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server