Skip to main content
Glama

dex-swap-quote

Get best-route DEX swap quotes across 20+ chains. Returns expected output, exchange rate, gas cost, and price impact for same-chain or cross-chain swaps.

Instructions

Best-route DEX swap quote across 20+ chains via Li.Fi aggregator. Returns expected output, exchange rate, gas cost, price impact, and route (DEX/bridge names). Works for same-chain and cross-chain swaps. Use ETH/USDC/WBTC symbols or ERC-20 addresses. Chains: ethereum, base, polygon, arbitrum, optimism, bsc, avalanche, and more. $0.012/call — free upstream.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_chainNoSource chain — name (ethereum, base, polygon, arbitrum, optimism, bsc, avalanche) or chain ID integer.
to_chainNoDestination chain. Same as from_chain for same-chain swaps. Use chain name or ID.
from_tokenNoSource token — symbol (ETH, USDC, WBTC, USDT, MATIC, LINK) or ERC-20 contract address.
to_tokenNoDestination token — symbol or ERC-20 contract address.
from_amountNoAmount of source token to swap, in human-readable units (e.g. '0.1' for 0.1 ETH, '100' for 100 USDC). For unknown tokens, provide wei/smallest-unit string with '!' prefix (e.g. '!1000000').
slippageNoMax slippage tolerance as a decimal (0.005 = 0.5%). Default 0.03 (3%).
Behavior3/5

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

Without annotations, the description carries full burden. It discloses the aggregator (Li.Fi), cross-chain capability, and returned fields but does not explicitly state read-only behavior, authentication needs, or rate limits. The cost mention adds transparency, but more detail on behavioral traits would improve it.

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 sentences cover purpose, returned data, and usage details without redundancy. Key information is front-loaded, making it easy for an AI to quickly understand the tool's core function.

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?

Given no output schema, the description lists key return fields (expected output, exchange rate, gas cost, price impact, route). While not exhaustive on format or additional fields, it provides enough context for most use cases. A more detailed output description would enhance completeness.

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

Parameters4/5

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

Schema coverage is 100% with descriptions for all 6 parameters. The description adds practical examples (e.g., '0.1' for ETH) and explains the '!' prefix for wei amounts, which enhances usability beyond the schema alone.

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?

The description specifies the tool as a 'Best-route DEX swap quote across 20+ chains via Li.Fi aggregator' and lists the returned data (expected output, exchange rate, gas cost, price impact, route). It clearly distinguishes from siblings like dex-pair-search or dex-trending-pools by emphasizing multi-chain and cross-chain quote aggregation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It advises using symbols (ETH, USDC) or ERC-20 addresses, lists supported chains, and mentions cost per call. It does not explicitly state when not to use this tool or name alternatives, but given sibling tools, the guidance is sufficient for effective use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thebrierfox/the-stall'

If you have feedback or need assistance with the MCP directory API, please join our Discord server