Skip to main content
Glama

Build an UNSIGNED Solana swap

solana_swap_build
Read-only

Builds an unsigned Jupiter swap transaction (base64) for the taker's PUBLIC address, including Lantern's 1.00% app fee (see feeDisclosure). Lantern never signs or holds keys: sign it with the agent's own wallet, then broadcast it yourself or with solana_send_transaction. Sanctioned addresses are refused. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "inputMint": "<inputMint>",
      "outputMint": "<outputMint>",
      "amount": "<amount>",
      "taker": "<taker>"
    },
    "name": "solana_swap_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
takerYesThe signing wallet's PUBLIC address
amountYesAmount in the input token's base units (integer string)
inputMintYesSolana mint address (base58)
outputMintYesSolana mint address (base58)
slippageBpsNoMax slippage in basis points

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: readOnlyHint=true only says no server-side writes, but the description explains why (the tool returns an unsigned transaction and never holds keys), discloses the 1.00% fee with a pointer to feeDisclosure, and warns that sanctioned addresses are rejected. That is exactly the behavioral context an agent needs before chaining into a signing step.

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

Conciseness5/5

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

Three short sentences, front-loaded with what is produced and in what format, followed by the custody/signing constraint and the fee/sanctions caveats. No filler and nothing buried.

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?

With no output schema, the description correctly specifies the return value (base64 unsigned transaction) and the follow-up path. It omits that a built transaction embeds a recent blockhash and therefore expires quickly, which matters for an agent that might delay signing.

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?

Schema description coverage is 100%, so every parameter is already documented, including base-units amount, base58 mint addresses, and the slippage default/max. The description adds only that the taker address must be the signing wallet's public key, which the schema also states, so it is baseline rather than additive.

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?

States a specific verb and artifact: builds an unsigned Jupiter swap transaction returned as base64, scoped to the taker's PUBLIC address, with the built-in 1.00% app fee. The custody model sentence (never signs or holds keys) and the mention of solana_send_transaction cleanly separate this from solana_swap_quote and the send tool.

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?

Explicitly tells the agent the workflow after building: sign with the agent's own wallet, then broadcast itself or via solana_send_transaction. Also states a clear exclusion (sanctioned addresses are refused) and cost (free). It stops short of saying a quote from solana_swap_quote should precede a build, which is the one routing decision an agent still has to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources