Skip to main content
Glama

prepare_btc_multisig_send

DestructiveIdempotent

Build and sign a multi-sig Bitcoin transaction from a registered wallet using a Ledger, returning a partial PSBT for cosigners to finalize.

Instructions

Initiator flow — build a tx FROM a registered multi-sig wallet, sign it with our Ledger key in the same call, return the partial PSBT for cosigners to sign. Pipeline: (1) fetch UTXOs across the wallet's gap-limit window, (2) coin-select with a multi-sig-aware vbyte estimator (P2WSH sortedmulti(M,...,N) inputs are ~2-4× P2WPKH), (3) resolve a fresh chain=1 change address (lowest unused index), (4) build PSBT v0 with witnessUtxo + nonWitnessUtxo (Ledger app 2.x requirement) + witnessScript + bip32_derivation for ALL cosigners, (5) sign with our Ledger via the existing co-signer flow (the device walks every output address + amount on-screen), (6) splice our signature into the PSBT, return the partial PSBT. We do NOT finalize or broadcast — the caller gathers remaining signatures externally, then runs combine_btc_psbts + finalize_btc_psbt. The fee-cap guard scales to multi-sig sizes automatically. Phase 3 supports wsh (P2WSH) wallets only; taproot lands in a follow-up PR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletNameYesName of a registered multi-sig wallet (matches `register_btc_multisig_wallet`).
toYesRecipient address. Any of the four mainnet types is accepted as a destination.
amountYesDecimal BTC string (up to 8 fractional digits, e.g. "0.001") or "max" to sweep every UTXO across the wallet's gap-limit window. "max" picks the fee-aware amount after coin-selection so the user doesn't have to subtract fees by hand.
feeRateSatPerVbNoFee rate in sat/vB. Optional — defaults to mempool.space's `halfHourFee` (~3-block target). Multi-sig txs are inherently larger than P2WPKH, so the absolute fee at the same sat/vB will be ~2-4× a single-sig send.
allowHighFeeNoOverride the fee-cap guard. The cap is `max(10 × feeRate × vbytes, 2% of recipient value)` and uses the multi-sig vsize estimator.
Behavior4/5

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

Description discloses behaviors beyond annotations: signs with Ledger, returns partial PSBT, uses coin-selection with multi-sig vbyte estimator, fee-cap guard, and pipeline steps. No contradiction with annotations (destructiveHint=true, idempotentHint=true).

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?

Description is lengthy but well-structured with a numbered pipeline. First sentence sums up purpose, and each step adds value. Slightly verbose but earn its sentences.

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?

Given no output schema, description adequately states return value (partial PSBT). Also covers prerequisites, pipeline steps, and limitations. Lacks some details like exact format of returned PSBT but sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). Description adds value by explaining 'amount' can be 'max' to sweep, fee rate defaults to halfHourFee, and allowHighFee overrides cap. Also explains multi-sig vsize impact, adding clarity beyond schema.

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 clearly states it is the initiator flow to build and sign a multi-sig transaction, returning a partial PSBT. It distinguishes from siblings like prepare_btc_send, combine_btc_psbts, and finalize_btc_psbt by outlining the specific role.

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?

Explicitly states when to use this tool (initiator flow) and what not to do (do not finalize or broadcast). Provides a pipeline and notes that Phase 3 supports only wsh wallets, giving clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/recon-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server