Skip to main content
Glama

prepare_solana_lifi_swap

DestructiveIdempotent

Construct an unsigned LiFi swap or bridge from Solana. Supports in-chain swaps via Jupiter/Orca and cross-chain bridges to EVM chains. Returns Solana v0 tx for Ledger signing. Requires durable nonce.

Instructions

Build an unsigned LiFi-routed swap or bridge with Solana as the source chain. Returns a Solana v0 tx the user signs on Ledger. Two flows share this surface: (1) IN-CHAIN swap when toChain="solana" — LiFi internally routes through Jupiter / Orca / similar; consider prepare_solana_swap (Jupiter direct) as the more direct path for in-chain only. (2) CROSS-CHAIN bridge when toChain is an EVM chain — LiFi aggregates Wormhole, deBridge, Mayan, Allbridge. The Solana source tx confirms first; destination delivery happens after via the bridge protocol (typically 1-15 min). DURABLE NONCE REQUIRED. The builder rejects multi-tx routes (returned by some bridge variants) and multi-signer routes (which would need an ephemeral signer LiFi normally provides via its wallet adapter — Ledger-only signing can't supply it). Reverse direction (EVM → Solana) is not yet wired in this server; track as a follow-up. BLIND-SIGN on Ledger — match the Message Hash on-device after preview_solana_send.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana base58 wallet — funds the swap and signs the source tx. Must have an initialized durable-nonce account (prepare_solana_nonce_init).
fromMintYesSource token: SPL mint address (base58) or the literal string "native" to swap SOL (LiFi maps "native" to wrapped-SOL internally; the wrap ix is built into the route).
fromAmountYesRaw integer amount in base units (NOT decimal-adjusted). Decimals are the source token's decimals — e.g. 1 USDC (6 decimals) = '1000000', 1 SOL (9 decimals) = '1000000000'.
toChainYesDestination chain. "solana" runs an in-chain swap (LiFi routes through Jupiter / Orca / similar — consider prepare_solana_swap for the more direct path). EVM chains run a cross-chain bridge.
toTokenYesDestination token. SPL mint (base58) when toChain="solana"; 0x-prefixed EVM token address otherwise. "native" works on both (resolves to the chain's conventional native sentinel).
toAddressNoOptional destination wallet. Defaults to the source wallet for in-chain swaps. REQUIRED for cross-chain bridges since the Solana base58 source wallet won't be a valid EVM-chain recipient.
slippageBpsNoSlippage tolerance in basis points (50 = 0.5%). Omit for LiFi's default (0.5%). Cross-chain bridges may impose their own minimums above this.
Behavior5/5

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

The description adds rich behavioral context beyond annotations: explains returned Solana v0 tx is blind-signed on Ledger, that source tx confirms first and delivery is async, and that builder rejects certain routes. Annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=true) are consistent with this behavior, and no contradiction is present.

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

Conciseness3/5

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

The description is fairly long and contains some redundant phrasing (e.g., multiple mentions of LiFi routing). While it is front-loaded with purpose, the length could be trimmed without losing essential information. Adequately structured but not maximally concise.

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?

For a complex tool with two flows, Ledger signing, and no output schema, the description comprehensively covers purpose, usage conditions (durable nonce, blind-sign), rejection cases, and references to related tools (`prepare_solana_swap`, `preview_solana_send`). It sufficiently equips an agent to invoke the tool correctly.

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?

The input schema itself has 100% description coverage, so baseline is 3. The description does not significantly enhance parameter understanding beyond the schema; it only provides high-level context (e.g., durable nonce for wallet, blind-sign). No new semantic depth is added.

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 an unsigned LiFi-routed swap or bridge with Solana as source chain. It distinguishes between in-chain swap (toChain='solana') and cross-chain bridge (toChain=EVM), and explicitly references the sibling tool `prepare_solana_swap` for the more direct in-chain path.

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?

Provides explicit guidance on when to use this tool vs `prepare_solana_swap`, warns that reverse direction is not yet wired, states durable nonce requirement, and explains rejection of multi-tx and multi-signer routes. This helps the agent decide correctly.

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