Skip to main content
Glama

crypto_psbt_decode

Read-only

Bitcoin PSBT decoder and pre-signing check — Decode a Partially Signed Bitcoin Transaction (PSBT, BIP174 v0 and BIP370 v2, taproot fields) offline and check it before signing or broadcasting. psbt= base64 (cHNidP8...) or hex (70736274ff...); optional network= mainnet (default), testnet, signet, regtest. Returns signing status UNSIGNED/PARTIALLY_SIGNED/SIGNED_NOT_FINALIZED/FINALIZED with the next step, per input: amount and address from witness_utxo or non_witness_utxo (the full previous transaction is hashed and checked against the outpoint), spend type, signatures present vs needed (m-of-n from the witness or redeem script), sighash, BIP32/taproot derivation paths; per output: amount, address and role (change when the output carries a wallet derivation path, payment or data). Totals in/out, amount sent externally vs change, exact fee, estimated vsize and fee rate in sat/vB, and the txid (marked final only when every input is native segwit). Flags UTXO/amount mismatches (fee attacks), negative, very high or below-relay fees, unknown fees, dust, burns and nonstandard sighash, with a verdict OK/REVIEW/DANGER. No network calls; never needs keys. Price: $0.004 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": {
      "psbt": "<psbt>"
    },
    "name": "crypto_psbt_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
psbtYes70736274ff0100a6020000000262e8b344de73a51894124b7ef3b15c1db18c5d0014334f435d108e81f51a325b0000000000ffffffff62e8b344de73a51894124b7ef3b15c1db18c5d0014334f435d108e81f51a325b0300000000ffffffff02905f010000000000160014e8df018c7e326cc253faac7e46cdc51e68542c4274bd000000000000225120d3a0d82bbfae272329e54e3b3410efc98646eaf06b7b6bf7cadceee05ba1447e000000000001011fa08601000000000016001479b000887626b294a914501a4cd226b58b2359830001012b409c000000000000225120d3a0d82bbfae272329e54e3b3410efc98646eaf06b7b6bf7cadceee05ba1447e011720531fe6068134503d2723133227c867ac8fa6c83c537e9a44c3c5bdbdcb1fe3370000010520531fe6068134503d2723133227c867ac8fa6c83c537e9a44c3c5bdbdcb1fe3372107531fe6068134503d2723133227c867ac8fa6c83c537e9a44c3c5bdbdcb1fe3371900d34db33f560000800000008000000080010000000000000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Goes well past the annotations by disclosing that it runs offline, never needs keys, performs UTXO/outpoint hash verification, flags fee attacks/dust/burns/nonstandard sighash, and emits a verdict of OK/REVIEW/DANGER. The only friction is the 'No network calls' claim versus openWorldHint=true, which is a soft-hint inconsistency rather than a dangerous misstatement, and no mention of what happens with a malformed PSBT.

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 the verb, resource and format, then organized into input syntax, return structure per input/per output, totals, flags and price. It is dense and long, but with no output schema almost every clause carries information; only the price/payment sentence is arguably separable.

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 complex offline verifier with no output schema, the description covers return fields, signing-state enumeration, derivation paths, fee/vsize math and the verdict scale, which is what an agent needs to interpret results. The gaps are the undeclared-in-schema network option and no guidance on failure/invalid-input behavior.

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 nominally 100%, but the schema's property description is only a bare hex sample, so the description's 'base64 (cHNidP8...) or hex (70736274ff...)' guidance adds real meaning. However it also documents a 'network=' parameter (mainnet/testnet/signet/regtest) that does not appear in the supplied input schema, which creates ambiguity about the actual accepted arguments.

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?

Leads with a specific verb and resource: 'Decode a Partially Signed Bitcoin Transaction (PSBT, BIP174 v0 and BIP370 v2, taproot fields) offline'. The PSBT/BIP version scoping and the 'pre-signing check' framing distinguish it from the raw-transaction and script decoders listed among the siblings.

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?

States the decision context explicitly: 'check it before signing or broadcasting', which tells the agent when to reach for it. It stops short of naming an alternative for non-PSBT raw transactions (e.g. a raw tx decoder) or an exclusion for already-broadcast transactions, so routing between decoders still needs inference.

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