Skip to main content
Glama

Swap quote

swap_quote
Read-only

Get a Jupiter swap quote for any Solana token pair. Returns output amount, price impact, route, and fees. Essential before executing any trade. Costs $0.001 USDC per call.

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": "swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesInput amount in smallest units (e.g. '1000000' for 1 USDC)
inputMintYesInput token mint address (base58)
outputMintYesOutput token mint address (base58)
slippageBpsNoSlippage tolerance in basis points (default: 50 = 0.5%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description is free to add the genuinely new detail: a per-call cost of $0.001 USDC, which matters for an agent deciding whether to poll this tool. It also enumerates return contents in the absence of an output schema. It does not say whether the quote expires or that it is non-binding, which is a real gap for a swap quote.

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, front-loaded with what the tool is, followed by the return payload and then the cost caveat. Nothing is redundant with the schema or title; every sentence adds a decision-relevant fact.

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 compensates by naming the return fields, and it discloses the paid-call cost. What is missing for a quoting tool is the validity window of the quote and whether the returned route is executable as-is, which an agent would want before relying on it.

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%, with units, base58 format, and the slippage default all documented in the schema itself. The description adds no parameter-level guidance (e.g., how slippageBps affects the route or output), so the baseline 3 applies.

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 ('Get a Jupiter swap quote for any Solana token pair') and immediately enumerates what comes back (output amount, price impact, route, fees), which separates it from read-only price tools like token_price or crypto_price in the sibling list.

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

Usage Guidelines3/5

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

'Essential before executing any trade' gives an implied when-to-use cue, but no sibling is named as an alternative or as something to avoid, and there is no statement of prerequisites beyond the implicit wallet/token mints. Usage is inferable rather than explicit.

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