Skip to main content
Glama

Why did my Solana transaction fail?

tx_explain
Read-only

A Solana transaction explained by its signature: for a failure, which instruction failed, the program that actually failed (even deep inside a call to another program), its error by name and message (from the program's own log, its on-chain IDL, Anchor's framework codes or the SPL Token and System programs' codes), compute used against the limit, the priority fee paid, the likely cause and what fixes it (the compute limit to set, slippage, missing funds or accounts, a wrong or uninitialized account, an expired blockhash). For a transaction that never landed, why that usually happens. For a success, a one-line summary and tips (an oversized compute limit, no priority fee). Use for 'why did this fail?', 'what does custom error 0x1771 mean?', 'my transaction didn't land'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "signature": "<signature>"
    },
    "name": "tx_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
signatureYesThe transaction signature (base58)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior: it reports the failing instruction, the innermost failing program, error names sourced from the program log, on-chain IDL, Anchor codes or SPL/System codes, compute used vs limit, and priority fee. It also distinguishes three outcome paths (failure, never-landed, success) so the agent knows what output shape to expect.

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 lead clause is front-loaded with the core purpose, and the dense parenthetical enumerating error sources is information-dense rather than padded. It is long but nearly every clause earns its place by describing a distinct diagnostic output.

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?

With no output schema, the description carries the return-value burden and does so thoroughly across failure, non-landed and success cases. For a one-parameter read-only tool, nothing an agent needs to call it correctly is missing.

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?

There is a single required parameter at 100% schema coverage, and the schema already documents it as a base58 transaction signature. The description only restates 'by its signature' without adding format caveats such as requiring a confirmed/finalized signature, so 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: 'A Solana transaction explained by its signature', then enumerates exactly what gets explained for failures, non-landed transactions and successes. It is clearly distinguishable from sibling tx_decode because it diagnoses cause and fixes rather than merely decoding.

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 explicit trigger phrases ('why did this fail?', 'what does custom error 0x1771 mean?', 'my transaction didn't land') that set clear context for invocation. It stops short of naming alternatives or exclusions (e.g. when to prefer tx_decode or simulate), so it is strong but not fully routing.

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.