Skip to main content
Glama

prepare_btc_multisig_send

DestructiveIdempotent

Build and partially sign a Bitcoin multisig transaction from a registered wallet, returning a PSBT for external cosigners to complete.

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?

Annotations indicate destructiveHint=true and idempotentHint=true, but the description adds value by detailing the signing process (Ledger hardware interaction), the fact that it does not finalize or broadcast, and the fee cap guard. Does not explicitly confirm idempotency but does not contradict annotations.

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 description is relatively long but front-loaded with the core purpose. The pipeline details are informative for a complex multi-sig flow. Every sentence contributes to understanding, though it could be slightly more concise without losing clarity.

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?

Covers the pipeline steps, constraints (P2WSH only, no broadcast), and related tools. No output schema is provided, but the description mentions returning a partial PSBT. Could specify the return format (e.g., hex, base64) for full completeness in a high-complexity tool.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant context beyond the schema: explains 'max' sweeps with fee-aware selection, fee rate defaults to mempool.space halfHourFee, and the high fee override cap. Each parameter's purpose and behavior is enriched.

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 the tool builds a tx from a multi-sig wallet, signs with Ledger, and returns a partial PSBT. It distinguishes from siblings like prepare_btc_send (single-sig) and combine_btc_psbts (post-processing), providing a specific verb+resource scope.

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?

Explicitly describes the initiator flow and the pipeline, naming downstream tools (combine_btc_psbts, finalize_btc_psbt) for post-processing. Mentions P2WSH-only limitation. Could be clearer about when not to use (e.g., if not initiator or if taproot is needed) but provides strong contextual guidance.

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/vaultpilot-mcp'

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