Skip to main content
Glama

Dovafy SafePerp / SafeSwap MCP

safe_swap_solana

Read-only

Construct an unsigned Solana spot swap transaction via Jupiter Swap API v2 after running mandatory pre-trade anti-rug protection. Hard-blocks buying tokens with active freeze authority, Token-2022 permanent delegate, or honeypot flags while keeping escape sells unblocked with warnings. Disclosed 0.20% official Jupiter platform fee applies on supported SOL/USDC/USDT pairs (0.00% on other pairs). Returns an unsigned base64 transaction and non-custodial signing receipt URL; never signs or requests private keys.

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>",
      "userPublicKey": "<userPublicKey>"
    },
    "name": "safe_swap_solana"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesExact integer amount in raw base units (lamports or smallest token decimals, e.g. "100000000" for 0.1 SOL).
swapModeNoJupiter quote calculation mode: ExactIn (default, fixed input amount) or ExactOut (fixed output amount).
inputMintYesSolana base58 mint address of the token to spend (e.g. So11111111111111111111111111111111111111112 for WSOL).
outputMintYesSolana base58 mint address of the destination token to receive (audited before route construction).
slippageBpsNoMaximum acceptable price slippage in basis points (1 to 1500; default 100 = 1.00%).
userPublicKeyYesUser Solana PUBLIC base58 wallet address that will sign locally. Never pass a private key.
acknowledgeHighRiskNoSet true only to acknowledge non-fatal WARN or elevated-score tokens. Critical rug-pull flags remain hard-blocked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / acknowledgeHighRisk / description
      Added value: +"Set true only to acknowledge non-fatal WARN or elevated-score tokens. Critical rug-pull flags remain hard-blocked."
    • changedInput schema / properties / amount / description
      Previous value: -"Raw integer base units"New value: +"Exact integer amount in raw base units (lamports or smallest token decimals, e.g. \"100000000\" for 0.1 SOL)."
    • addedInput schema / properties / inputMint / description
      Added value: +"Solana base58 mint address of the token to spend (e.g. So11111111111111111111111111111111111111112 for WSOL)."
    • addedInput schema / properties / outputMint / description
      Added value: +"Solana base58 mint address of the destination token to receive (audited before route construction)."
    • addedInput schema / properties / slippageBps / description
      Added value: +"Maximum acceptable price slippage in basis points (1 to 1500; default 100 = 1.00%)."
    • addedInput schema / properties / swapMode / description
      Added value: +"Jupiter quote calculation mode: ExactIn (default, fixed input amount) or ExactOut (fixed output amount)."
    • changedInput schema / properties / userPublicKey / description
      Previous value: -"User Solana PUBLIC wallet address"New value: +"User Solana PUBLIC base58 wallet address that will sign locally. Never pass a private key."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it names the precise blocking conditions, explains the escape-sell exception, discloses a 0.20% fee with a 0.00% carve-out for non-SOL/USDC/USDT pairs, and states the return shape (unsigned base64 transaction plus signing receipt URL). It also asserts non-custody ('never signs or requests private keys'), which resolves the tension with readOnlyHint=true on a transaction-building tool.

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 sentences, each carrying distinct information: what it builds, what the safety gate blocks, and what the fee/return contract is. The blocking behavior is front-loaded before the fee and return details, and no sentence is redundant.

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?

With no output schema, the description takes on the burden of describing return values and does so ('unsigned base64 transaction and non-custodial signing receipt URL'). Combined with fee disclosure, safety gating, and signing model, an agent has everything needed to call this correctly for a 7-parameter tool.

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 the baseline is 3. The description adds limited parameter-level meaning beyond the schema — it clarifies why outputMint is audited and implies how acknowledgeHighRisk interacts with non-fatal warnings versus critical hard blocks, but adds nothing for slippageBps, swapMode, or amount.

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 resource ('Construct an unsigned Solana spot swap transaction via Jupiter Swap API v2') plus the mandatory pre-trade safety gate that precedes it. This cleanly separates it from siblings like safe_bridge_quote and safe_perp_order_hyperliquid, which are different venues/instruments.

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?

Explains that anti-rug checks run automatically and are not optional, and describes the decision rule for buys (hard-block on freeze authority, permanent delegate, honeypot) versus sells (allowed with warnings). It does not explicitly route the agent toward or away from sibling tools, but the instrument-level scoping makes the boundary 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.