Skip to main content
Glama

Decode a Bitcoin transaction

bitcoin_decode_transaction
Read-onlyIdempotent

Decode a raw Bitcoin transaction (hex): txid, wtxid, size, vsize, weight, inputs, outputs with addresses and values, SegWit and RBF flags. Nothing is broadcast. Paid per call. Price: 3 sats or US$0.003 (USDC) 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": {
      "hex": "<hex>"
    },
    "name": "bitcoin_decode_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
hexYesRaw transaction as hex
l402NoOptional. After paying the Lightning invoice: '<token>:<preimage>'.
passNoOptional. A Diamond budget token (dp_...) that your user approved once (from US$0.89; USDC or other Base tokens, or Lightning) or that you funded with the free diamond_budget tool. Each call deducts its price; no wallet needed in the agent.
pay_withNoOptional. 'lightning' requests a BOLT11 invoice and a token when Diamond can receive Lightning payments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pay_with / description
      Previous value: -"Optional. 'lightning' returns a BOLT11 invoice and a token instead of the x402 payment request."New value: +"Optional. 'lightning' requests a BOLT11 invoice and a token when Diamond can receive Lightning payments."
  2. Changed1 schema field changed
    • changedInput schema / properties / pass / description
      Previous value: -"Optional. A Diamond pass (dp_...) that your user funded in a browser (USDC on Base or Lightning, from US$1). Each call deducts its price; no wallet needed in the agent."New value: +"Optional. A Diamond budget token (dp_...) that your user approved once (from US$0.89; USDC or other Base tokens, or Lightning) or that you funded with the free diamond_budget tool. Each call deducts its price; no wallet needed in the agent."
  3. Changed1 schema field changed
    • addedInput schema / properties / pass
      Added value: +{
      +  "description": "Optional. A Diamond pass (dp_...) that your user funded in a browser (USDC on Base or Lightning, from US$1). Each call deducts its price; no wallet needed in the agent.",
      +  "type": "string"
      +}
  4. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description reinforces this with 'Nothing is broadcast,' which is meaningful for a Bitcoin tool where broadcast risk matters. It also discloses the commercial model — paid per call at 3 sats or US$0.003 — which no annotation covers. The gap is that it never explains the payment handshake itself (what a call without l402/pass returns, e.g. an invoice or 402 response).

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?

Three short sentences, front-loaded with the operation and its outputs, then the safety note, then the price. Every sentence carries distinct information and there is no filler.

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?

With no output schema, the description compensates by listing the returned fields, and the non-broadcast and pricing notes cover the main behavioral questions for a read-only decoder. The remaining gap is the payment flow mechanics, which are only hinted at by the l402/pass/pay_with parameters.

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%, so the schema already documents hex, l402, pass, and pay_with. The description adds no detail on the payment parameters — nothing about how l402 tokens, Diamond budget tokens, or the pay_with enum interact — so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Decode a raw Bitcoin transaction (hex)') and enumerates the decoded fields — txid, wtxid, size, vsize, weight, inputs, outputs, SegWit and RBF flags — so an agent knows exactly what it gets back. It does not explicitly contrast itself with the sibling decoders (bitcoin_decode_psbt, bitcoin_decode_script), leaving that differentiation to the name alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the '(hex)' qualifier tells the agent this takes raw hex, and 'Nothing is broadcast' signals a pure inspection operation. There is no explicit when-to-use or when-not guidance, and no pointer to the PSBT or script decoders for those input types.

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