Skip to main content
Glama

get_quote

Best route and expected output for selling a specific amount of one token for another on one chain, priced from the pools LCX Liberty DEX indexes itself. Use it for what an amount would swap for; use get_price for a token's value, and search_tokens first to turn a ticker into an address. Read-only: it never executes a trade. Returns output.amount and output.minimumAmount (at 0.5% slippage) in tokenOut's base units, with output.decimals to scale them; priceImpactPct, gasFeeUSD, the venues and the per-hop routes; and blockNumber and expiresAt, since a quote is priced at one block and lives 120 seconds. Also returns swapUrl: a link that opens this same swap on the LCX Liberty DEX site, filled in and freshly quoted, for the user to review and sign with their own wallet. Give it to the user when they want to make the swap; opening it executes nothing. When there is no quote, the result is an error that says why: no route between the two tokens, or liquidity too thin for this size, usually naming a size that would fill.

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

Input Schema

NameRequiredDescriptionDefault
amountYesPositive human amount of tokenIn to sell, e.g. "1.5". Scaled by the token's own decimals, which the server knows: do not send decimals.
chainIdYes1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic, 324 ZKsync
tokenInYesSell token address. Use the zero address for native ETH.
decimalsNoOptional, and best left out. Only for a token the index holds no decimals for; a value that disagrees with the token's own is refused (decimals_mismatch).
tokenOutYesBuy token address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic, 324 ZKsync"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  9745,
      -  59144,
      -  4326,
      -  57073,
      -  480,
      -  1868,
      -  100,
      -  25,
      -  146
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  9745,
      +  59144,
      +  4326,
      +  57073,
      +  480,
      +  1868,
      +  100,
      +  25,
      +  146,
      +  324
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 59144 Linea, 57073 Ink, 480 World Chain, 1868 Soneium, 25 Cronos"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  59144,
      -  57073,
      -  480,
      -  1868,
      -  25
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  9745,
      +  59144,
      +  4326,
      +  57073,
      +  480,
      +  1868,
      +  100,
      +  25,
      +  146
      +]
  3. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 59144 Linea, 57073 Ink, 480 World Chain, 1868 Soneium, 25 Cronos"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  9745,
      -  59144,
      -  4326,
      -  57073,
      -  480,
      -  1868,
      -  100,
      -  25,
      -  146
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  59144,
      +  57073,
      +  480,
      +  1868,
      +  25
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 59144 Linea, 57073 Ink, 480 World Chain, 1868 Soneium, 25 Cronos"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 9745 Plasma, 59144 Linea, 4326 MegaETH, 57073 Ink, 480 World Chain, 1868 Soneium, 100 Gnosis, 25 Cronos, 146 Sonic"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  59144,
      -  57073,
      -  480,
      -  1868,
      -  25
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  9745,
      +  59144,
      +  4326,
      +  57073,
      +  480,
      +  1868,
      +  100,
      +  25,
      +  146
      +]
  5. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 480 World Chain, 25 Cronos"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 59144 Linea, 57073 Ink, 480 World Chain, 1868 Soneium, 25 Cronos"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  480,
      -  25
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  59144,
      +  57073,
      +  480,
      +  1868,
      +  25
      +]
  6. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 480 World Chain"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 480 World Chain, 25 Cronos"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999,
      -  480
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  480,
      +  25
      +]
  7. Changed2 schema fields changed
    • changedInput schema / properties / chainId / description
      Previous value: -"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM"New value: +"1 Ethereum, 8453 Base, 42161 Arbitrum One, 10 OP Mainnet, 4663 Robinhood Chain, 56 BNB Chain, 137 Polygon, 43114 Avalanche, 130 Unichain, 143 Monad, 5042 Arc, 999 HyperEVM, 480 World Chain"
    • changedInput schema / properties / chainId / enum
      Previous value: -[
      -  1,
      -  8453,
      -  42161,
      -  10,
      -  4663,
      -  56,
      -  137,
      -  43114,
      -  130,
      -  143,
      -  5042,
      -  999
      -]New value: +[
      +  1,
      +  8453,
      +  42161,
      +  10,
      +  4663,
      +  56,
      +  137,
      +  43114,
      +  130,
      +  143,
      +  5042,
      +  999,
      +  480
      +]
  8. First observed

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so: it declares the tool read-only ("never executes a trade"), that quotes are priced at one block and live 120 seconds, that minimumAmount assumes 0.5% slippage, and that opening swapUrl executes nothing. It even documents failure modes (no route, thin liquidity with a suggested size), which is exactly the behavioral context an agent needs for a quote tool.

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?

Purpose and routing come first, then behavioral guarantees, then return fields, then the user-facing swapUrl instruction — good front-loading with no filler sentences. The return-value enumeration is dense and long, but each item carries information an agent would otherwise lack without an output schema.

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?

There is no output schema, so the description must define the response, and it does: output.amount, minimumAmount, decimals scaling, priceImpactPct, gasFeeUSD, venues, routes, blockNumber and expiresAt. Combined with the read-only and expiry disclosures, an agent has everything needed for this multi-parameter, mutating-adjacent quoting tool.

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% and the schema already explains amount, chainId, tokenIn/tokenOut and the risky optional decimals field in detail. The description adds no parameter-level meaning beyond that (e.g., no size limits or rounding behavior for amount), so the baseline of 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 (best route and expected output for selling an amount of one token for another on one chain) plus the pricing source (pools the LCX Liberty DEX indexes itself). It explicitly distinguishes itself from get_price and search_tokens, so an agent can route without opening any schema.

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?

Gives concrete when-to-use guidance ("what an amount would swap for") and names the alternatives with the condition that selects them: get_price for a token's value, search_tokens to resolve a ticker to an address. It also states the handoff case: give the swapUrl to the user when they want to make the swap.

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