Skip to main content
Glama

crypto_btc_tx_decode

Read-only

Bitcoin raw transaction decoder — Decode a raw Bitcoin transaction offline before you sign, relay or trust it. tx= raw hex (signed or unsigned; legacy, segwit v0 or taproot); optional network= mainnet (default), testnet, signet or regtest. Returns txid and wtxid (double SHA-256), version, size, weight and vsize, locktime with its meaning (block height or date, and whether it is enforced), RBF signaling, every input (previous outpoint, sequence, BIP68 relative lock, detected spend type p2pkh/p2sh/p2wpkh/p2wsh/p2sh-p2wpkh/p2tr key or script path/coinbase with block height, signature kind and sighash, recovered address where the input reveals it, multisig/HTLC/timelock analysis of redeem and witness scripts) and every output (value in sats and BTC, script type, address incl. bech32m taproot and pay-to-anchor, OP_RETURN data as hex and text with runes/omni detection). Flags duplicate inputs, dust, burns, nonstandard scripts or versions and unusual sighash flags, with a verdict OK/REVIEW/INVALID. Fee needs input amounts, which a signed transaction does not carry: use /v1/crypto/psbt-decode for that. No network calls. Price: $0.003 USDC (Base, via x402).

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": {
      "tx": "<tx>"
    },
    "name": "crypto_btc_tx_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
txYes0200000000010262e8b344de73a51894124b7ef3b15c1db18c5d0014334f435d108e81f51a325b0000000000ffffffff62e8b344de73a51894124b7ef3b15c1db18c5d0014334f435d108e81f51a325b0300000000ffffffff02905f010000000000160014e8df018c7e326cc253faac7e46cdc51e68542c4274bd000000000000225120d3a0d82bbfae272329e54e3b3410efc98646eaf06b7b6bf7cadceee05ba1447e0247304402204da33a0b41f0f905d0c5d4b5245e07d77d5ab5be4a4a5371dff665efca79cc600220331159cee208b457c791d59ca5e2243b7929be7511dffb6eed3598668c8625890121031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f01407898c414700affac8cf9f02db37beaacb83cc5bde914e4a1b53ec7b139b4c95e505bb223ad11a497cd2cc07a6ce8f427800089ef41a53c18f4fefad16209f86f00000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is largely pre-supplied; the description does add real value by enumerating outputs (txid/wtxid, weight/vsize, BIP68, sighash, script analysis) and a OK/REVIEW/INVALID verdict. However, "No network calls" sits uneasily beside openWorldHint=true and an x402 payment step, and no return shape or size limits are given without an output schema. Useful but with a transparency gap around side effects and payment mechanics.

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?

Front-loaded with purpose and usage, and nearly every clause carries information an agent needs (encoding variants, return fields, verdicts). The return-value enumeration is a single densely nested block that would read better as a list, so it loses a point for density rather than for length.

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 one-parameter, read-only decoder with no output schema, the description is unusually complete on outputs, detection flags, script types and verdicts. Its main completeness defect is the undocumented-in-schema network option and the unclarified relationship between "no network calls" and the paid x402 invocation.

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 coverage is 100% for the single required tx parameter, and the description usefully adds that hex may be signed or unsigned and legacy, segwit v0 or taproot. But it documents an "optional network= mainnet (default), testnet, signet or regtest" parameter that does not exist in the input schema, which can send an agent to pass a phantom argument. Net value added, net confusion introduced.

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 ("Bitcoin raw transaction decoder") plus the decision context — "Decode a raw Bitcoin transaction offline before you sign, relay or trust it." It also scopes itself against decode-adjacent needs by naming /v1/crypto/psbt-decode, so an agent can separate this from the psbt-decode and other tx siblings without opening schemas.

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?

Gives an explicit when-to-use trigger (before signing, relaying or trusting a raw tx) and an explicit when-to-use-something-else rule: fee computation requires input amounts a signed tx lacks, so route to /v1/crypto/psbt-decode. Cost and payment rail ($0.003 USDC via x402, Base) are also stated up front.

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