Skip to main content
Glama

sol_swap

Build a NON-CUSTODIAL Solana DEX swap via RiftBeam aggregator (Orca + Raydium CLMM native IX, Jupiter fallback, 0.10% fee). Returns UNSIGNED base64 VersionedTransaction — sign with your wallet and send. Non-custodial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYessol, usdc or base58 mint
fromYessol, usdc or base58 mint
amountNoHuman amount (sol/usdc only)
amountRawNoBase units (any mint)
slippageBpsNo1-1000, default 50
userPublicKeyYesYour Solana wallet address (signs the tx)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The description adds highly valuable behavioral details beyond annotations: it returns an UNSIGNED transaction, is non-custodial, and explains the aggregator components (Orca, Raydium, Jupiter fallback) and fee. This goes far beyond the readOnlyHint false and openWorldHint true annotations, clarifying that the tool itself does not execute the swap.

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?

The description is two sentences, front-loaded with the core purpose, and includes necessary details without any fluff. Every word earns its place.

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 the return type (unsigned base64 VersionedTransaction), the signing requirement, and non-custodial nature, which is essential for a swap-building tool. It doesn't address parameter nuances like amount vs amountRaw mutual exclusivity, but the schema covers that. Given no output schema, it is sufficiently complete.

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 has 100% coverage with descriptions for all six parameters, so the baseline is 3. The description does not add extra parameter semantics, but it doesn't need to given the schema is thorough.

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 a non-custodial Solana DEX swap using the RiftBeam aggregator, and explicitly mentions it returns an unsigned base64 VersionedTransaction. This distinguishes it from siblings like sol_swap_quote (quotes) and evm_swap (EVM).

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 gives clear context: use this tool to build a swap transaction that the user must sign and send. It does not explicitly name alternatives or when-not-to-use, but the purpose is self-evident and distinct. The non-custodial and unsigned-transaction details make the usage context clear.

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