Skip to main content
Glama

Get Dex Quote

get_dex_quote
Read-only

Get the best Uniswap v3 swap quote on Ethereum (chain_id=1) or Base (chain_id=8453) via direct on-chain QuoterV2 calls. Queries all four fee tiers (100/500/3000/10000 bps) in parallel and returns the tier with the highest output amount, along with per-tier breakdown. Inputs are raw uint256 amounts and EIP-55 checksummed addresses; native ETH is not quoted directly — pass the WETH address. Returns no_liquidity=true when no pool exists for the pair. Point-in-time quote at the returned block_number; do not cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idNo1 = Ethereum mainnet, 8453 = Base mainnet. Other chains unsupported.
token_inYesEIP-55 checksummed address of the token being sold. For native ETH, pass the WETH address (Ethereum: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; Base: 0x4200000000000000000000000000000000000006).
amount_inYesInput amount in RAW uint256 units (e.g. '1000000' for 1 USDC, '1000000000000000000' for 1 WETH). Must be > 0 and < 2^128. Common token decimals: WETH/ETH/DAI/wstETH/cbETH/weETH 18, WBTC/cbBTC 8, USDC/USDT 6. Do not call read_contract to look up decimals — use these values directly.
token_outYesEIP-55 checksummed address of the token being bought.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_idYes
token_inYes
amount_inYes
token_outYes
amount_outYes
block_numberYes
no_liquidityYes
fee_tier_usedYes
effective_rateYes
quotes_per_tierYes
amount_out_humanYes
amount_in_decimalsYes
amount_out_decimalsYes

TDQS

A4.5/5.0
Behavior5/5

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

The description enriches the readOnlyHint annotation with critical behavioral details: it queries four fee tiers in parallel, returns the best tier plus a breakdown, reports no_liquidity=true when no pool exists, and returns a block_number for point-in-time quotes. It also cautions against caching. This goes well beyond the annotation's safety signal.

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?

The description is a single, information-dense paragraph. Every sentence contributes unique value: purpose, mechanism, input formats, native ETH caveat, no-liquidity behavior, and point-in-time nature. There is no redundancy or fluff.

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?

Given the tool's complexity (multi-chain, four fee tiers, specific input constraints), the description covers all essentials: supported chains, parallel tier queries, output choice, no-liquidity handling, and freshness caveat. It even warns against caching. The presence of an output schema means return values need not be fully described, and the description is complete enough for an agent to use the tool correctly.

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 schema already thoroughly documents token_in, token_out, amount_in, and chain_id. The description adds a brief note about raw uint256 amounts and EIP-55 addresses, but this largely duplicates schema content. Since the schema handles parameter explanations, the description adds minimal additional semantic value.

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 clearly states the tool's function: obtaining the best Uniswap v3 swap quote on Ethereum or Base. It specifies the method (direct on-chain QuoterV2), the resource (Uniswap v3), and the scope (chain_ids 1 and 8453). This distinguishes it from sibling tools like get_token_price or get_dex_volume.

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?

The description provides clear context: it is for on-chain swap quotes, explicitly lists supported chains, and explains that native ETH is not quoted directly (use WETH). It also warns against caching due to point-in-time quotes. While it does not explicitly name alternative tools, the intended usage is unmistakable given the specific inputs and behavior.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools target distinct blockchain/DeFi resources and actions. A few pairs like get_lending_rates vs get_yield_rates and get_defi_positions vs get_liquidation_risk have overlapping boundaries, but detailed descriptions and explicit redundancy notes (e.g., get_eth_balance vs get_wallet_portfolio) reduce confusion.

Naming Consistency5/5

All tools follow a consistent snake_case verb_noun pattern (e.g., get_block, convert_currency, decode_transaction). The only minor deviations are noun-first names like http_fetch and web_search, but the style is uniform and predictable.

Tool Count2/5

At 27 tools, the server exceeds the 25-tool threshold for 'too many' and feels heavy. While the breadth of DeFi and crypto features justifies some size, the number is unwieldy for an agent to scan efficiently and could be consolidated (e.g., merging balance-related tools).

Completeness4/5

The tool surface covers a wide range of blockchain data: balances, prices, TVL, yields, DEX quotes, gas, block/transaction details, approvals, and DeFi positions. Gaps include lack of wallet transaction history and NFT support, but these are beyond the server's clear focus on read-only DeFi analytics.

Resources