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. 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.

Input Schema

TableJSON 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
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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it declares read-only and that it 'never executes a trade,' discloses the 0.5% slippage assumption, that a quote is priced at one block and lives 120 seconds, and enumerates the specific failure modes (no route, thin liquidity). This is exactly the behavioral context an agent needs before calling.

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 the sibling routing are front-loaded, and the return-value and failure-mode sentences each earn their place. It is on the longer side for a single dense paragraph, but there is no filler or restatement of the title.

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?

For a five-parameter read-only quote tool with no output schema, the description covers the return shape (output.amount, minimumAmount, decimals), optional fields (priceImpactPct, gasFeeUSD, venues, per-hop routes), and lifecycle metadata (blockNumber, expiresAt), plus error semantics. Nothing needed to call 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 description coverage is 100%, including unit rules for amount, the chain enum mapping, and the caveat about decimals_mismatch, so the schema does the heavy lifting. The description adds little parameter-level detail beyond what is already documented, though it does confirm amounts are returned in tokenOut base units with a decimals scale.

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 up front: 'Best route and expected output for selling a specific amount of one token for another on one chain.' It distinguishes itself from siblings by naming get_price (token value) and search_tokens (ticker to address) as alternatives rather than alternatives for the same 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 routing: '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.' This gives both the use case and the two prerequisite/alternative tools, with no inference required.

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