{"name":"explain_tx","oldName":"explain_transaction","title":"What did this transaction do?","category":"transactions","useWhen":"Run after a transaction lands (or fails) to report what really happened, instead of guessing from logs. For failures it names the program that failed and the fix.","benefit":{"kind":"accuracy","text":"Reports the real balance changes from chain data, not a model's guess from raw logs. For failures it names the program and the reason."},"description":"Reads a confirmed transaction and returns whether it worked, the fee, every SOL and token balance change by wallet, the programs used, and why it failed.","price":"$0.01","priceText":"25 free calls a day, then $0.01 USDC per call (x402)","http":{"method":"POST","path":"/api/tools/explain_tx","body":"JSON object with the inputs below"},"mcp":{"method":"tools/call","name":"explain_tx"},"inputs":[{"name":"tx_id","type":"string (base58)","required":true,"lookingFor":"The transaction's ID (its signature).","whereToGet":"You get it back when you send a transaction, or from history. Never make one up."},{"name":"network","type":"\"mainnet-beta\" | \"devnet\"","required":false,"lookingFor":"Which Solana network to read. Default \"mainnet-beta\" (real money).","whereToGet":"Leave it out for mainnet. Use \"devnet\" only for test wallets."}],"outputs":[{"field":"result","type":"\"success\" | \"failed\"","is":"Whether it worked. Failed transactions still pay fees.","howWorkedOut":"meta.err is empty for success."},{"field":"summary","type":"string","is":"What happened, in a few plain sentences.","howWorkedOut":"Built from the result, the fee and the biggest balance changes."},{"field":"time / slot","type":"string | number","is":"When and where it landed.","howWorkedOut":"Block time in ISO 8601, and the slot."},{"field":"fee_payer / signers","type":"string / string[]","is":"Who paid the fee and who signed.","howWorkedOut":"The first account, and the accounts marked as signers."},{"field":"fee.lamports / fee.sol","type":"string","is":"The fee charged.","howWorkedOut":"meta.fee."},{"field":"programs[]","type":"{ address, name }[]","is":"The programs the transaction called.","howWorkedOut":"Each top-level step's program, with its name when we know it."},{"field":"sol_changes[]","type":"{ account, before, after, change, raw_change }[]","is":"Every account whose SOL changed, fee included.","howWorkedOut":"Balances before vs after, exact decimals."},{"field":"token_changes[]","type":"{ owner, token, symbol, before, after, change, raw_change }[]","is":"Every token balance that changed, by owner wallet and token.","howWorkedOut":"Token balances before vs after, with each token's decimals. Tickers from Jupiter."},{"field":"compute_used","type":"number | null","is":"Compute units used.","howWorkedOut":"meta.computeUnitsConsumed."},{"field":"failure","type":"object | null","is":"For failed transactions: the raw error, the step and program that failed, what it means, and the last log lines.","howWorkedOut":"meta.err decoded. The failing program is the program of the failing step. The meaning comes from why_failed."}],"notes":[],"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tx_id":{"type":"string","minLength":64,"maxLength":100},"network":{"default":"mainnet-beta","type":"string","enum":["mainnet-beta","devnet"]}},"required":["tx_id"]}}