Skip to main content
Glama

prepare_btc_lifi_swap

DestructiveIdempotent

Builds an unsigned Bitcoin PSBT for bridging native BTC to an EVM chain or Solana via LiFi's solver auction, returning a 15-minute handle for hardware verification and signing.

Instructions

Build an unsigned Bitcoin PSBT-v0 that bridges native BTC to a token on another chain via LiFi's aggregator. LiFi auctions the route across intent solvers (NEAR Intents, Garden, Thorswap, Chainflip, Symbiosis, …) and returns a PSBT depositing to the chosen solver's vault address with an OP_RETURN memo committing to the cross-chain destination. Destinations: every EVM chain (ethereum/arbitrum/polygon/base/optimism) and Solana — TRON has no LiFi route from BTC and is rejected. Source-side scope (Phase 1, mirrors prepare_btc_send): native segwit and taproot only. Returns a 15-min handle the agent forwards to send_transaction; the Ledger BTC app clear-signs every output (vault deposit + OP_RETURN + change-back-to-source + LiFi fee output) on-screen, so there is NO blind-sign hash to pre-match in chat. The verification block surfaces the vault address, OP_RETURN bytes (hex + ASCII prefix), expected and minimum output on the destination, slippage, the chosen solver, and execution duration estimate. Server-side checks before forwarding: every PSBT input belongs to the source address, exactly one OP_RETURN output is present, the deposit output address matches the LiFi-advertised vault, and nonWitnessUtxo is hydrated on every input (Ledger 2.x rejects segwit/taproot inputs without it).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesPaired Bitcoin source address. Phase 1 source-side scope: native segwit (`bc1q…`) and taproot (`bc1p…`) only. Multi-source consolidation is out of scope here — LiFi runs its own UTXO scan against `fromAddress` and bakes the input set into the PSBT.
toChainYesDestination chain. EVM `SupportedChain` (ethereum/arbitrum/polygon/base/optimism) for an EVM bridge, or `"solana"` for native SOL/SPL delivery. TRON is NOT routable from BTC via LiFi (rejected with a clear error).
toTokenYesDestination token. EVM hex when `toChain` is EVM; SPL mint (base58) when `toChain === "solana"`. `"native"` resolves to the chain's conventional native sentinel (`0x0…0` for EVM, wrapped-SOL mint for Solana).
toAddressYesDestination wallet — REQUIRED. The Bitcoin source address is not a valid recipient on any destination chain. Format must match the destination (Solana base58 for `"solana"`, EVM hex otherwise).
amountYesDecimal BTC string (up to 8 fractional digits, e.g. "0.005"). "max" is NOT supported — bridges commit to an exact deposit amount via the OP_RETURN memo at quote time, so the amount must be known up-front.
slippageBpsNoSlippage tolerance in basis points (50 = 0.5%, 100 = 1%). Default ~50. Hard-capped at 500 (5%); above 100 (1%) requires `acknowledgeHighSlippage: true` to opt in. Cross-chain bridges may impose their own minimums above this.
acknowledgeHighSlippageNoRequired when `slippageBps > 100`. Mirrors the `prepare_swap` guard — forces the caller to state that an unusually-high slippage is intentional.
Behavior5/5

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

Provides extensive details beyond annotations: 15-min handle, Ledger clear-signing, server-side checks, verification block contents. 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?

Well-structured with focused sentences, each adding value. Slightly long but efficient given tool complexity.

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?

No output schema, but description thoroughly explains return format (handle, verification block) and behavior (server-side checks, Ledger interaction). Complete for the tool's complexity.

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?

With 100% schema coverage, baseline is 3. Description adds significant meaning: amount doesn't support 'max', slippage cap and guard, wallet address restrictions, and chain-specific token formats.

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?

Clearly states it builds an unsigned Bitcoin PSBT-v0 for bridging native BTC to another chain via LiFi. Specifies the aggregator, output types, and destination chains, and distinguishes from siblings like prepare_btc_send.

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?

Describes when to use (for BTC cross-chain bridging via LiFi) and when not (TRON not supported). Implicitly differentiates from other BTC send tools, but lacks explicit when-not-to-use for sibling tools.

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