Skip to main content
Glama

DEX swap quote and price impact for up to 5 trade sizes on Base, Ethereum, Arbitrum (quote only)

swap_quote

Use when an agent needs a swap quote and price impact before trading. Input: chain (base, ethereum, arbitrum), from, to (ticker like USDC, ETH or 0x address), amounts (1-5 sizes in from-token units). Output: JSON per size best venue (Uniswap v3 fee tier, Uniswap v2, Aerodrome), amount out, effective price, price impact %, all venue quotes, spot price. Quote only: no calldata, nothing executed. Example: ?from=USDC&to=ETH&amounts=1000,100000 Price: $0.002 USDC (Base or Solana) 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": {
      "from": "<from>",
      "to": "<to>",
      "amounts": "<amounts>"
    },
    "name": "swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesToken bought (same format)
fromYesToken sold: ticker (USDC, USDT, ETH/WETH, BTC/cbBTC/WBTC, wstETH, DAI, AERO, ARB… per chain) or 0x address. Unknown → 400 before payment
chainNoChain (default base)
amountsYes1-5 trade sizes in units of the from token, comma-separated (alias amount)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the tool is read-only in effect, discloses supported venues (Uniswap v3 fee tiers, Uniswap v2, Aerodrome), and reveals the x402 payment model and per-call price. Minor noise: the '(Base or Solana)' payment note references a chain not in the quote-chain list, which could momentarily confuse an agent about supported networks.

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?

It is front-loaded with the usage trigger and then organized as Input / Output / constraint / example / price, which is easy to scan. The example query string and the pricing sentence are somewhat promotional rather than functional, but they are short enough not to crowd out the core content.

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?

There is no output schema, and the description compensates by enumerating the returned JSON fields (best venue per size, amount out, effective price, price impact %, all venue quotes, spot price). Combined with the chain scope and quote-only guarantee, an agent has enough to call it correctly; edge behaviors like error cases or whether gas is included are the remaining gaps.

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 coverage is 100%, so the schema already documents all four parameters, including the ticker-or-0x format and the 1-5 comma-separated amounts. The description restates the same facts and adds an example query string, so it adds value only marginally beyond the schema; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('swap quote and price impact'), names the supported chains (base, ethereum, arbitrum), and explicitly scopes itself as quote-only with 'no calldata, nothing executed.' That scope distinguishes it from any execution or token-info siblings, though it never names an alternative tool directly.

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 opens with an explicit when-to-use trigger ('Use when an agent needs a swap quote and price impact before trading') and clarifies the when-not implicitly via 'Quote only: no calldata, nothing executed.' It lacks a named alternative for the execution step, so routing is slightly inferred rather than spelled out.

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