Skip to main content
Glama

Swap quote (no trade is made)

get_swap_quote
Read-onlyIdempotent

Estimate what a swap would return right now: the best route across the indexed DEX pools, amount out (decimal-adjusted), effective price, price impact (percent) and the smallest pool liquidity on the route (ADA). It never builds, signs or submits a transaction: the result includes swapUrl, a link the user opens to review the trade and sign it in their own wallet.

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": {
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amount": "<amount>"
    },
    "name": "get_swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount of tokenIn to sell, decimal-adjusted (100 = 100 ADA when tokenIn is ADA).
tokenInYesWhat is sold: a token unit, or "lovelace" / "ADA" for ADA.
tokenOutYesWhat is bought: a token unit, or "lovelace" / "ADA" for ADA.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 by enumerating what the result contains (best route, decimal-adjusted amount out, effective price, price impact percent, smallest pool liquidity in ADA) and describing the non-mutating workflow. This confirms and enriches readOnlyHint/destructiveHint=false rather than repeating them.

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?

Two sentences, densely packed and front-loaded: the capability first, the safety/handoff constraint second. No filler sentences and the enumerated return fields each carry meaning.

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 carries the burden of explaining return values and does so explicitly, plus clarifies the non-mutating handoff. Nothing an agent needs to call and interpret it correctly is missing.

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 coverage is 100%, so the parameters (amount decimal-adjusted, tokenIn/tokenOut units) are already fully documented in structured data. The description does not add syntax or constraints beyond what the schema provides, so 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 ("Estimate what a swap would return right now") and immediately distinguishes itself from build_swap_transaction/plan_swap by declaring it never builds, signs or submits. An agent can route between this and the transaction-building siblings 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 Guidelines4/5

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

Gives clear usage context (a live/now estimate, and a human-in-the-loop handoff via swapUrl for signing in their own wallet). It stops short of naming the alternatives (build_swap_transaction, plan_swap) or stating when-not to use it, leaving the sibling differentiation implicit.

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