Skip to main content
Glama

prepare_solana_swap

DestructiveIdempotent

Builds an unsigned Jupiter-routed swap draft using a durable nonce. Returns a preview and handle for later signing and sending via preview_solana_send.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesSolana wallet executing the swap. Must have an initialized durable-nonce account — run prepare_solana_nonce_init first if not set up yet.
quoteYesThe 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 any field is mutated.
prioritizationFeeLamportsNoOptional priority fee in lamports. Omit to let Jupiter pick based on the local fee market (recommended).
Behavior4/5

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

The description adds significant behavioral context beyond annotations, such as the need for a durable nonce, the use of v0 transactions with lookup tables, and the fact that it returns a draft that is not yet signable. It also explains error conditions (nonce not initialized). Annotations indicate destructiveHint=true, which is consistent with the overall intent, though the description emphasizes it is a draft.

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 a single dense paragraph. While it contains valuable information, it could be better structured with bullet points or clearer separation of concerns. However, every sentence adds value and it is front-loaded with the main purpose.

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

Completeness4/5

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

The description covers prerequisites, technical details (Jupiter endpoint, v0 tx), and the workflow (preview then send). It mentions the return includes a compact preview and opaque handle, but does not detail the output structure. Given the lack of an output schema, this is a minor gap. Overall, very informative for a complex tool.

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 three parameters have schema descriptions (100% coverage). The description enriches each parameter with additional semantics: wallet requires nonce initialization; quote must be passed 'verbatim' due to Jupiter signatures; prioritization fee is optional with a recommendation to omit. This far exceeds the baseline.

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 that the tool builds an unsigned Jupiter-routed swap draft, using the quote from get_solana_swap_quote. It distinguishes from siblings like get_solana_swap_quote and prepare_solana_lifi_swap by specifying the Jupiter routing and the draft nature.

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?

The description provides clear usage context: after obtaining a quote, before sending, and requires a durable nonce. It outlines the workflow (preview_solana_send then send_transaction) but does not explicitly compare against alternatives or state when not to use.

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