Skip to main content
Glama

HelmSwap

Get swap quote (inputMint / outputMint / amount)

get_swap_quote
Read-onlyIdempotent

Same live, non-binding exact-input quote as get_quote, for agents that already use the inputMint / outputMint / amount / slippageBps convention (also accepted: tokenIn / tokenOut / amountIn, sellToken / buyToken / sellAmount, fromToken / toToken). amount is an integer in the token's smallest unit (for example 10000000 for 0.01 SOL); decimal amounts are rejected. The chain is inferred as Solana when a mint address is given and no chain is set; otherwise pass chain (see get_quote) or it defaults to Base. Only exact-input (swapMode ExactIn) is supported. Returns inputMint, inAmount, outputMint, outAmount (the estimate after the disclosed fee, before slippage), otherAmountThreshold (the minimum after slippage), swapMode, slippageBps, platformFee, priceImpactPct (a decimal string: 0.01 is one percent), routePlan, plus everything get_quote returns: the disclosed fee, any exit-liquidity warning (give it to the user in the server's own words), expiresAt, quoteTicket and openInHelmSwapUrl. Read-only: nothing is signed or sent and no wallet is needed. Quotes expire in about 15 seconds. Pass the whole result to build_swap_transaction when the user wants the transaction. Not a price feed. Tokenized stocks, perps and prediction markets are not available. Not financial advice.

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

Input Schema

NameRequiredDescriptionDefault
chainNoOptional. chain: 'solana', 'base', 'bnb', 'ethereum', 'robinhood', 'ink', 'hyperevm', 'elysium' or 'arc', or a numeric EVM chainId (default 8453, Base). Inferred as Solana from a mint address.
amountYesInteger amount of inputMint in its smallest unit. Alias: amountIn, sellAmount, inAmount.
chainIdNoOptional EVM chain id.
referrerNoOptional payout address (EVM 0x or Solana base58) to attribute a disclosed share of the fee. The trader pays the same fee either way.
swapModeNoOnly ExactIn is supported.
inputMintYesToken to sell: Solana mint or EVM contract address, or a native symbol (SOL, ETH, BNB, HYPE). Alias: tokenIn, sellToken, fromToken.
outputMintYesToken to buy: Solana mint or EVM contract address, or a native symbol. Alias: tokenOut, buyToken, toToken.
slippageBpsNoSlippage tolerance in basis points. Default 50.

Output Schema

NameRequiredDescriptionDefault
feeNo
chainNo'solana' or an EVM chain id.
inAmountNo
swapModeNo
warningsNo
expiresAtNo
inputMintNo
outAmountNoEstimated amount out, after the disclosed fee and before slippage.
routePlanNo
outputMintNo
platformFeeNoDisclosed fee already reflected in outAmount: { amount, feeBps }.
quoteTicketNo
slippageBpsNo
exitLiquidityNo
priceImpactPctNoDecimal string: 0.01 is one percent. Omitted if unavailable.
serverBroadcastsNo
openInHelmSwapUrlNo
priceImpactPercentNoThe same impact as a percent number (1 is one percent).
otherAmountThresholdNoMinimum amount out after slippage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint/idempotentHint the description discloses that nothing is signed, no wallet is needed, quotes are non-binding and expire in ~15 seconds, fees are disclosed inside the quote, and any exit-liquidity warning must be relayed in the server's own words. That is exactly the behavioral context annotations cannot carry.

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

Conciseness4/5

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

Dense but front-loaded: wording convention first, then amount units, chain inference, supported mode, return fields, safety and expiry, then next step. A few clauses duplicate the schema (swapMode ExactIn, amount units) and the wall of text could be broken into shorter sentences, but no sentence is filler.

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?

For an 8-parameter quoting tool the definition covers defaults, chain inference, the exact-input restriction, fee/slippage semantics of the returned fields, expiry, and the hand-off tool. The output schema exists but the description's emphasis on priceImpactPct format and otherAmountThreshold adds useful interpretation rather than redundancy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description still adds value by spelling out the integer-smallest-unit semantics with an example (10000000 for 0.01 SOL), that decimals are rejected, the full alias set, and the chain-inference/default-to-Base rule. It only stops short of explaining referrer or chainId precedence beyond what the schema says.

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 (live, non-binding exact-input swap quote) and immediately distinguishes itself from the sibling get_quote by naming the calling convention (inputMint / outputMint / amount / slippageBps) it serves. An agent can pick between the two quote tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing: use this if you already use the inputMint convention, otherwise see get_quote; pass the whole result to build_swap_transaction when a transaction is wanted. It also states what it is not (not a price feed; tokenized stocks, perps and prediction markets unavailable) and when to pass chain vs rely on inference.

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.