Skip to main content
Glama

prepare_btc_rbf_bump

DestructiveIdempotent

Replace a stuck Bitcoin mempool transaction by creating a BIP-125 RBF bump that preserves recipients and absorbs the fee increase from the change output, with clear-signing on Ledger.

Instructions

Build a BIP-125 Replace-By-Fee replacement for a stuck mempool BTC tx. Reuses the original tx's exact input set, preserves every recipient verbatim, and shrinks the change output to absorb the fee bump. Sequence stays at 0xFFFFFFFD so the replacement is itself RBF-eligible (the user can bump again if the new rate is still too low). Returns a 15-min handle the agent forwards to send_transaction; the Ledger BTC app clear-signs every output + new fee on-screen, so there is NO blind-sign hash to pre-match in chat. Refusal cases: original tx already confirmed; no input is BIP-125-eligible; any input belongs to a wallet other than wallet (multi-source RBF out of scope); no change output (no headroom to absorb the bump — CPFP territory); BIP-125 rule 4 violation (new fee must be >= old fee + 1 sat/vB × new vsize); bumped change below the 546-sat dust threshold; fee exceeds the safety cap (override with allowHighFee: true). Phase 1 source-side scope: native segwit + taproot only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesPaired Bitcoin source address that signed the original tx. Phase 1 scope: native segwit (`bc1q...`) and taproot (`bc1p...`) only. Multi-source RBF (replacing a tx whose inputs span several wallets) is out of scope — every input on the original tx must come from this single address.
txidYes64-hex txid of the stuck mempool tx to replace. Must currently be unconfirmed and BIP-125 RBF-eligible (sequence < 0xFFFFFFFE on at least one input — true by default for every tx `prepare_btc_send` produces). Already-confirmed and final-marked txs are refused.
newFeeRateYesNew fee rate in sat/vB. Must satisfy BIP-125 rule 4: the new absolute fee must be at least the old absolute fee plus 1 sat/vB × new vsize. The replacement preserves every recipient verbatim and shrinks the change output to absorb the bump — refused if the bump would push change below the dust threshold (546 sats).
allowHighFeeNoOverride the fee-cap guard. The cap is `max(10 × newFeeRate × vbytes, 2% of recipient output value)`. Legitimate priority bumps through heavy congestion can exceed it; pass true after confirming with the user.
Behavior5/5

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

Annotations already indicate destructive and idempotent. The description adds extensive detail: exact sequence value (0xFFFFFFFD), 15-min handle, clear-signing on Ledger (no blind sign), all refusal cases. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized, front-loaded with core purpose, then mechanism, then refusal cases. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description explains the return value (15-min handle), clear-signing behavior, and all refusal cases. The tool's complexity is well-covered with 4 parameters fully documented in schema and description context.

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%, so baseline is 3. The description provides overall context but does not add parameter-specific meaning beyond what the schema already offers. For example, the sequence number and fee cap formula are general behavior, not parameter details.

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 BIP-125 RBF replacement for a stuck mempool BTC tx, specifying verb 'prepare' and resource 'btc_rbf_bump', and distinguishes from siblings like prepare_btc_send by focusing on fee bumps.

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?

The description explicitly lists when to use (stuck mempool tx) and refusal cases (confirmed tx, no BIP-125 eligible input, multi-source, no change output, rule 4 violation, dust, fee cap), and mentions CPFP as alternative for no change output. Also notes Phase 1 scope (native segwit + taproot only).

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