Skip to main content
Glama

chain_swap_quote

Read-only

DEX swap quote (Uniswap v3, on-chain) — Live on-chain swap quote from Uniswap v3 QuoterV2 on base, ethereum, arbitrum, optimism or polygon. Tries 4 direct fee tiers plus 1-hop routes via WETH/USDC in one batched eth_call and returns the best amountOut, rate, route, fee tiers, gas estimate and price impact (LOW/MODERATE/HIGH/SEVERE). from/to = symbol (WETH, USDC, USDT, DAI, WBTC, cbBTC, AERO, ARB, OP, WPOL, LINK, UNI, AAVE...) or any ERC-20 address. amount in token units (default 1). Indicative only - excludes other DEXes. Price: $0.004 USDC (Base, via x402).

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": {
      "chain": "<chain>",
      "from": "<from>",
      "to": "<to>",
      "amount": "<amount>"
    },
    "name": "chain_swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesUSDC
fromYesWETH
chainYesbase
amountYes1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: it discloses the implementation (batched eth_call against QuoterV2), the routing search space, the exact returned fields (amountOut, rate, route, fee tiers, gas estimate, price impact with four severity buckets), a caveat that results are indicative, and a concrete cost of $0.004 USDC via x402 — a payment requirement the agent would not otherwise know. The read-only nature is consistent with readOnlyHint.

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?

Front-loaded with the core identity and scope before the mechanics and pricing; every sentence carries information. It is dense — long parenthetical symbol and chain lists plus slash-separated impact tiers — which slightly hurts scannability, but little could be cut without losing useful detail.

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 describe what comes back, and it does so exhaustively (best amountOut, rate, route, fee tiers, gas estimate, price-impact tier). Combined with chain/token/amount semantics, cost, and the 'indicative only' limitation, an agent has everything needed to call it and interpret the result.

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 nominally 100%, but the schema 'descriptions' are just bare examples ('USDC', 'WETH', 'base', '1'), so the description carries real weight: it enumerates accepted symbols (WETH, USDC, USDT, DAI, WBTC, cbBTC, AERO, ARB, OP, WPOL, LINK, UNI, AAVE...), permits any ERC-20 address for from/to, names the five valid chains, and clarifies that amount is in token units with a default of 1. That is meaningful semantic enrichment rather than restatement.

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 — a live on-chain Uniswap v3 QuoterV2 swap quote — plus the exact chains covered and the routing strategy (4 direct fee tiers + 1-hop via WETH/USDC). It also scopes itself against the wider DEX landscape with 'Indicative only - excludes other DEXes', so an agent can tell this is Uniswap-v3-only and not a general aggregator.

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: use it to price a swap before executing. The 'excludes other DEXes' and 'indicative only' lines set expectations about accuracy and coverage, but there is no explicit when-to-use vs. when-not guidance and no named alternative (e.g., a batch quote or pool-inspection sibling) for the agent to route to.

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