Skip to main content
Glama

Decode and analyze a PSBT

bitcoin_decode_psbt
Read-onlyIdempotent

Decode and analyze a PSBT (base64): inputs, outputs, fee and fee rate when the input data is present, estimated vsize, signatures still missing and the next step. Nothing is signed or broadcast. Paid per call. Price: 5 sats or US$0.005 (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": {
      "psbt": "<psbt>"
    },
    "name": "bitcoin_decode_psbt"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
psbtYesA PSBT in base64 (URL-encode + as %2B)
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.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is largely covered; the description reinforces this with "Nothing is signed or broadcast," which is the key behavioral assurance for a PSBT tool. It also discloses commercial behavior not present in annotations: pay-per-call pricing (5 sats / US$0.005 USDC) and the existence of a payment step. It does not discuss rate limits or error conditions, keeping it short of a 5.

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 functional sentence leads with the verb and output list, and the payment terms are packed into a short trailing sentence with no filler. It is a compact two-sentence block, though the output enumeration is dense enough to be slightly hard to parse in one pass.

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?

There is no output schema, so the description must carry the return-value burden, and it does so by listing the exact fields returned. Combined with the no-signing guarantee and the cost/payment model, an agent has what it needs to call and interpret the result; only edge-case behavior for PSBTs lacking input data is left implicit.

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 each parameter, including the payment parameters, is documented in the schema itself. The description adds only that the PSBT is base64 (already in the psbt schema field, which additionally explains URL-encoding of '+'), so meaning beyond the schema is minimal. 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?

The description names a specific verb+resource pair ("Decode and analyze a PSBT") and immediately enumerates the concrete outputs an agent will get: inputs, outputs, fee, fee rate, estimated vsize, missing signatures and next step. This is clearly distinguishable from siblings like bitcoin_decode_transaction or bitcoin_decode_script, which operate on different artifacts.

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 only implied: an agent can infer it should call this when holding a base64 PSBT rather than a raw transaction. There is no explicit when-to-use/when-not statement and no named alternative for adjacent cases such as decoding a finalized transaction. The note that fee rate appears only "when the input data is present" is the one genuinely useful situational caveat.

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