Skip to main content
Glama

get_swap_quote

Read-only

Calculates real-time cryptocurrency swap estimates, network fees, deposit limits, and routing URLs across 240+ multi-chain pairs.

USAGE GUIDELINES:

  • USE WHEN: The user requests an exchange rate calculation or wants an on-chain routing URL between two specific assets (e.g., BTC to XMR, USDT to SOL).

  • DO NOT USE: Checking coin availability (call 'list_supported_currencies') or inspecting boundary limits without an amount (call 'get_pair_limits_and_fees'). Unsuitable for fiat currencies or bank transfers.

PARAMETER SEMANTICS & ROUTING:

  • Inbound ('from') and outbound ('to') must be distinct supported tickers.

  • Tickers are case-insensitive.

  • Input 'USDT' evaluates to TRON (TRC20); pass 'USDTERC' for Ethereum mainnet.

  • When 'amount' is outside provider thresholds ('min_amount' / 'max_amount'), the calculation executes, but 'within_limits' returns false.

BEHAVIOR, TIMEOUTS & CACHING:

  • Strictly read-only without side effects.

  • Liquidity feeds cached for 30 seconds at the edge.

  • Returns JSON error object if upstream liquidity feed is unreachable or pair is unrouted.

Input Schema

NameRequiredDescriptionDefault
toYesOutbound asset ticker determining destination blockchain network and settlement ledger. Must differ from source.
fromYesInbound asset ticker determining source blockchain and deposit address protocol. Must differ from destination.
amountNoInbound volume to exchange. Evaluated against provider liquidity depth to determine 'within_limits' acceptance.

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
rateNo
amountNo
providerNo
swap_urlNo
rate_typeNo
max_amountNo
min_amountNo
updated_atNo
network_feeNo
pool_reserveNo
within_limitsNo
receive_amountNo
quote_validity_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Positive numeric quantity of source asset to convert. Precision supported up to 8 decimal places. Compare against returned 'min_amount' to verify deposit validity."New value: +"Inbound volume to exchange. Evaluated against provider liquidity depth to determine 'within_limits' acceptance."
    • changedInput schema / properties / from / description
      Previous value: -"Source cryptocurrency ticker symbol (case-insensitive, e.g. BTC, XMR, SOL, TON, USDT, ETH, LTC, TRX, DOGE). Must differ from 'to'."New value: +"Inbound asset ticker determining source blockchain and deposit address protocol. Must differ from destination."
    • changedInput schema / properties / to / description
      Previous value: -"Target cryptocurrency ticker symbol to receive (case-insensitive, e.g. XMR, BTC, USDT, SOL, TON). Must differ from 'from'."New value: +"Outbound asset ticker determining destination blockchain network and settlement ledger. Must differ from source."
  2. Changed3 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Positive numeric amount of source cryptocurrency to convert. Precision up to 8 decimal places."New value: +"Positive numeric quantity of source asset to convert. Precision supported up to 8 decimal places. Compare against returned 'min_amount' to verify deposit validity."
    • changedInput schema / properties / from / description
      Previous value: -"Source cryptocurrency ticker symbol (case-insensitive, e.g. BTC, XMR, SOL, TON, USDT, ETH, LTC)."New value: +"Source cryptocurrency ticker symbol (case-insensitive, e.g. BTC, XMR, SOL, TON, USDT, ETH, LTC, TRX, DOGE). Must differ from 'to'."
    • changedInput schema / properties / to / description
      Previous value: -"Target cryptocurrency ticker symbol to receive (case-insensitive, e.g. XMR, BTC, USDT, SOL)."New value: +"Target cryptocurrency ticker symbol to receive (case-insensitive, e.g. XMR, BTC, USDT, SOL, TON). Must differ from 'from'."
  3. Changed4 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Positive numeric amount of source cryptocurrency to convert. Precision up to 8 decimal places. Rate limits apply per provider pool depth."New value: +"Positive numeric amount of source cryptocurrency to convert. Precision up to 8 decimal places."
    • changedInput schema / properties / from / description
      Previous value: -"Source cryptocurrency ticker symbol (case-insensitive, e.g. BTC, XMR, SOL, TON, USDT, ETH, LTC, TRX, DOGE)."New value: +"Source cryptocurrency ticker symbol (case-insensitive, e.g. BTC, XMR, SOL, TON, USDT, ETH, LTC)."
    • changedInput schema / properties / to / description
      Previous value: -"Target cryptocurrency ticker symbol to receive (case-insensitive, e.g. XMR, BTC, USDT, SOL, TON)."New value: +"Target cryptocurrency ticker symbol to receive (case-insensitive, e.g. XMR, BTC, USDT, SOL)."
    • addedOutput schema / properties / pool_reserve
      Added value: +{
      +  "type": "number"
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / rate_type
      Added value: +{
      +  "type": "string"
      +}
  5. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already cover the safety profile, but the description adds genuinely new behavior: 30-second edge caching of liquidity feeds, a JSON error object when the upstream feed is unreachable or the pair is unrouted, and the fact that out-of-threshold amounts still execute with 'within_limits' false rather than failing. That last detail is critical and unobtainable from the annotations.

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?

Front-loaded with the purpose, then organized under labeled routing and behavior sections so an agent can scan for the relevant slice. Every bullet carries actionable information; the one redundant line ('Strictly read-only') is a single clause and does no harm.

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?

An output schema exists, so return values need not be respecified; the description covers the remaining failure modes (unreachable feed, unrouted pair), the limit-evaluation contract, and caching staleness. Nothing an agent needs to call this correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real routing semantics beyond the schema: 'USDT' resolves to TRON (TRC20) and 'USDTERC' is required for Ethereum mainnet, tickers are case-insensitive, and from/to must differ. The aliasing rule alone materially changes how an agent fills the parameters.

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 ('Calculates') plus the exact outputs (swap estimates, network fees, deposit limits, routing URLs) and scope (240+ multi-chain pairs). It is immediately distinguishable from the two siblings, one of which is even named for a different job.

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 'USE WHEN' and 'DO NOT USE' blocks, with both sibling tools named as the alternatives ('list_supported_currencies', 'get_pair_limits_and_fees') and the selecting condition spelled out (checking availability vs. limits without an amount). It also excludes fiat and bank transfers.

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.