prepare_solana_swap
Build an unsigned Jupiter-routed swap DRAFT. Takes the quote object returned by get_solana_swap_quote and calls Jupiter's /swap-instructions endpoint to get the deconstructed instruction list, then composes the final v0 tx: [nonceAdvance, ...computeBudget, ...setup, swap, cleanup?, ...other]. DUR...
This record as markdown: /tools/io-github-szhygulin-vaultpilot-mcp/prepare-solana-swap.md
What prepare_solana_swap does on VaultPilot MCP
AI agents invoke prepare_solana_swap to trigger actions in VaultPilot MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
quote | object | Yes | The full `quote` object returned by get_solana_swap_quote. Pass it back verbatim — Jupiter computes a signature over the quote and rejects /swap-instructions if |
wallet | string | Yes | Solana wallet executing the swap. Must have an initialized durable-nonce account — run prepare_solana_nonce_init first if not set up yet. |
prioritizationFeeLamports | integer | — | Optional priority fee in lamports. Omit to let Jupiter pick based on the local fee market (recommended). |
Parameters from the server's own tool schema.
Why prepare_solana_swap is rated High
This tool constructs a transaction that, once signed, will execute a DeFi token swap through Jupiter on Solana. While it stops short of signing or submitting (making it not directly Financial), it is preparing executable blockchain transaction instructions with real financial intent.
From the tool's definition Build an unsigned Jupiter-routed swap DRAFT... calls Jupiter's /swap-instructions endpoint to get the deconstructed instruction list, then composes the final v0 tx... Returns a compact preview + opaque handle; NOT yet signable
Attacks that exploit this kind of access
The rule that runs prepare_solana_swap safely
PolicyLayer is an MCP gateway: it sits between your AI agents and VaultPilot MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For prepare_solana_swap, this is the rule to start with:
prepare_solana_swap stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect VaultPilot MCP, apply this rule, and every prepare_solana_swap call is checked against it from then on.
Questions about prepare_solana_swap
Build an unsigned Jupiter-routed swap DRAFT. Takes the quote object returned by get_solana_swap_quote and calls Jupiter's /swap-instructions endpoint to get the deconstructed instruction list, then composes the final v0 tx: [nonceAdvance, ...computeBudget, ...setup, swap, cleanup?, ...other]. DURABLE NONCE REQUIRED — if the wallet hasn't run prepare_solana_nonce_init, this errors pointing to it. Uses v0 VersionedTransaction with Address Lookup Tables (Jupiter routes commonly exceed legacy-tx account limits). Returns a compact preview + opaque handle; NOT yet signable — when the user says 'send', call preview_solana_send(handle) to pin the current nonce value, then send_transaction. BLIND-SIGN REQUIRED on Ledger (Jupiter's program ID isn't in the Solana app's clear-sign registry), so the user must match the Message Hash on-device — surfaced in the CHECKS block emitted by preview_solana_send. It is categorised as a Execute tool in the VaultPilot MCP MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
prepare_solana_swap accepts 3 parameters: quote, wallet, prioritizationFeeLamports. Required: quote, wallet. The full parameter table on this page comes from the server's own tool schema.
Register the VaultPilot MCP server in PolicyLayer and add a rule for prepare_solana_swap: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches VaultPilot MCP. Nothing to install.
prepare_solana_swap is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the prepare_solana_swap rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for prepare_solana_swap. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
prepare_solana_swap is provided by the VaultPilot MCP server (vaultpilot-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on VaultPilot, and thousands of servers like it.
Across the catalogue