Skip to main content
Glama

tx_decode_explain

Read-only

Fetch a Bitcoin transaction by txid and return a structured, agent-ready summary: type (P2WPKH/P2TR/P2SH/etc.), input/output counts, fees, fee rate in sat/vB, confirmation status, RBF flag, SegWit/Taproot flags, and a one-line agent_summary string ready for LLM context injection. Saves 500-2000 tokens vs parsing raw TX JSON. Price: 25 sats per call.

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": {
      "txid": "<txid>"
    },
    "name": "tx_decode_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
txidYesBitcoin transaction ID (64 hex characters).
l402_proofNoL402 payment proof "<macaroon>:<preimage>". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  2. Changed1 schema field changed
    • changedInput schema / properties / l402_proof / description
      Previous value: -"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."New value: +"L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 0 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set."
  3. Changed1 schema field changed
    • addedInput schema / properties / l402_proof
      Added value: +{
      +  "description": "L402 payment proof \"<macaroon>:<preimage>\". Omit on the first call; an unpaid call returns a 25 sat Lightning invoice and the macaroon. Pay the invoice, then repeat the call with this argument set.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld safety, and the description adds two things they don't: the per-call price of 25 sats and the full shape of the returned summary. With no output schema, enumerating return fields is the description's job and it does so. The two-step L402 paywall flow is only in the schema, so it is not credited here.

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?

A single front-loaded sentence with the verb and resource first, followed by the return inventory and the cost. The middle list is long and slightly run-on, but each clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with no output schema, the description covers purpose, likely return contents, cost, and token-saving rationale. The only real gap is that the payment retry flow lives entirely in the schema rather than being reinforced in prose.

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 both parameters (txid, l402_proof) are documented in the schema, including the invoice-then-retry flow. The description contributes nothing beyond 'by txid', 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+resource ('Fetch a Bitcoin transaction by txid') and enumerates exactly what comes back: type, input/output counts, fees, fee rate, confirmation status, RBF, SegWit/Taproot flags, and agent_summary. No sibling tool touches Bitcoin transactions, so the distinction is unambiguous.

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 a clear rationale for choosing this over the raw alternative ('Saves 500-2000 tokens vs parsing raw TX JSON'), which is a genuine selection signal. It does not state any exclusion or when-not-to-use condition, but no sibling offers an overlapping capability to route away to.

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