Skip to main content
Glama

prepare_btc_rbf_bump

DestructiveIdempotent

Bump the fee of a stuck Bitcoin transaction using BIP-125 Replace-By-Fee. Reuses inputs, preserves recipients, and shrinks change output to absorb the fee increase.

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 (readOnlyHint=false, destructiveHint=true, idempotentHint=true) are known; the description adds behavioral details: sequence remains at 0xFFFFFFFD for further RBF, returns a 15-min handle for send_transaction, and lists all refusal conditions. 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.

Conciseness4/5

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

The description is a single dense paragraph with all necessary information. It could benefit from structuring refusal cases as a list, but it remains clear and front-loaded with the main purpose. No wasted sentences.

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?

Given the complexity (BIP-125 RBF) and absence of an output schema, the description covers all aspects: mechanism, integration with send_transaction, refusal cases, and safety constraints. It is thoroughly complete.

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?

All 4 parameters have descriptions in the schema; the description adds context: wallet scope (native segwit/taproot), txid eligibility (sequence condition), newFeeRate dust threshold and rule 4, allowHighFee cap formula. Adds significant meaning 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 the tool builds a BIP-125 RBF replacement for a stuck mempool BTC transaction, specifying reuse of inputs, preservation of recipients, and shrinking change output. It distinguishes from siblings like prepare_btc_send by outlining the unique RBF mechanism.

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 (stuck mempool tx) and lists refusal cases (already confirmed, no BIP-125-eligible input, multi-source out-of-scope, no change output, rule 4 violation, dust threshold, fee cap). It implies alternatives like CPFP when no change output. Provides clear when-not-to-use 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/recon-crypto-mcp'

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