Skip to main content
Glama

Get cross-chain swap quotes

get_quote
Read-only

Get live quotes for swapping one asset to another (cross-chain or same-chain). Returns routes ranked by amount received, each with a quoteToken, the executing protocol, expectedReceive, minimumReceived and estimated time. All fees (network, protocol and platform) are included.

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": {
      "sellAssetId": "<sellAssetId>",
      "buyAssetId": "<buyAssetId>",
      "sellAmount": "<sellAmount>"
    },
    "name": "get_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
slippageNoMaximum slippage in percent. Default 1.5.
providersNoOptional: only return routes from these provider ids, e.g. ["NEAR", "FLASHNET"]. From list_providers.
buyAssetIdYesAsset to receive, e.g. "ethereum-eth". From list_assets.
sellAmountYesAmount to send as a decimal string in the sell asset's units, e.g. "0.05".
sellAssetIdYesAsset to send, e.g. "bitcoin-btc". From list_assets.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / providers
      Added value: +{
      +  "description": "Optional: only return routes from these provider ids, e.g. [\"NEAR\", \"FLASHNET\"]. From list_providers.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description adds real value beyond them: routes are ranked by amount received, fees (network/protocol/platform) are already included, and each route carries a quoteToken and estimated time — all relevant to whether the agent must act before the quote goes stale.

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 tight sentences, front-loaded with the purpose, then the return shape, then the fee caveat. Every clause carries information an agent would otherwise have to discover.

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 enumerating the return fields (quoteToken, protocol, expectedReceive, minimumReceived, estimated time) and the fee-inclusive semantics. Missing only minor operational detail such as quote validity window or number of routes returned.

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 sellAssetId, buyAssetId, sellAmount, slippage and providers are all documented in the schema with defaults and cross-references to list_assets/list_providers. The description adds nothing about slippage or provider filtering, so baseline 3 applies.

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?

States a specific verb and resource ('Get live quotes for swapping one asset to another') and scopes it to both cross-chain and same-chain. It doesn't explicitly contrast with create_swap or get_swap_status, but the read-only quote semantics are unmistakable.

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 implied — an agent can infer this is the pricing step before create_swap — but the description never says when to use it versus create_swap/get_swap_status, nor any precondition (e.g., call list_assets first, quote expiry).

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