Skip to main content
Glama

Get a cross-chain swap quote

get_quote
Read-only

Live price for swapping any token to any token across 25+ chains (BTC, ETH, SOL, Base, Arbitrum, BNB, Tron, NEAR, Zcash, TON, Sui, XRP...). No addresses or keys needed, nothing committed. Includes a price_check against market rates and a best_price_check that quotes a competing network (Relay) at the same moment, so you can see proof you are getting the better deal.

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": {
      "from_token": "<from_token>",
      "to_token": "<to_token>",
      "amount": "<amount>"
    },
    "name": "get_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount of from_token to send, as a human-readable decimal string, e.g. '25' or '0.015'. Not base units.
referrerNoOptional: your NEAR account (e.g. 'myagent.near'). You earn 1/3 of the service fee on every swap routed with it. The user pays the same.
to_chainNoChain to receive on.
to_tokenYesToken to receive (same formats as from_token).
recipientNoOptional (with refund_address): destination address, for an exact quote.
from_chainNoChain the token is sent from, e.g. 'solana', 'base', 'ethereum', 'bitcoin'. Needed when the symbol exists on several chains.
from_tokenYesToken to send: symbol ('USDC', 'ETH', 'BTC'), 'SYMBOL@chain', 'SYMBOL on chain', or an asset_id from search_tokens.
slippage_bpsNoMax slippage in basis points (default 100 = 1%, range 10-500).
refund_addressNoOptional (with recipient): refund address on the source chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the bar is lower, and the description still adds real context: nothing is committed, no addresses/keys required, and the response embeds a price_check against market rates plus a best_price_check quoting Relay. It stops short of stating quote expiry or freshness, which matters for a live price.

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?

Three sentences, front-loaded with the core capability and chain scope, then the non-commitment guarantee, then the differentiator. The trailing "so you can see proof you are getting the better deal" is marketing-adjacent but still conveys that the comparison is returned in the response.

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?

For a 9-parameter read-only quote tool with full schema coverage and no output schema, this covers what the agent needs to decide and call correctly. The remaining gap is return-value shape and quote lifetime, which the description leaves unaddressed.

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 only the chain breadth context, not parameter-level meaning. Notably it does not restate the from_chain disambiguation rule or the recipient/refund_address pairing, which the schema already carries.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Live price for swapping any token to any token") and scopes it across 25+ named chains. The clause "No addresses or keys needed, nothing committed" implicitly separates it from the mutating sibling create_swap, though it never names an alternative explicitly.

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?

Usage is only implied: the read-only framing signals this is the pre-swap pricing step, but the definition never says 'call this before create_swap' or explains when to prefer compare_quotes, get_prices, or quote_from_text. The agent must infer the workflow ordering from sibling names alone.

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.