Skip to main content
Glama

token.swap_quote

Read-onlyIdempotent

Right before an on-chain swap ($0.005): how much you get now on the best route (Uniswap v2/v3/v4, Aerodrome, direct or through WETH) on Base, Ethereum, Arbitrum, Optimism or Polygon, with price impact, minimum received at your slippage and alternatives. Simulated, nothing executed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buyYesETH, WETH, USDC or a 0x token address
sellYesETH, WETH, USDC or a 0x token address
chainNoChain of the token or pool: base (default), ethereum, arbitrum, optimism or polygon (solana where listed). Not the payment networkbase
amountYesSell amount in whole units, e.g. 1000
slippageBpsNoSlippage tolerance for the minimum received, in basis points

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"Chain of the token or pool: base (default), ethereum, arbitrum, optimism or polygon (solana where listed)"New value: +"Chain of the token or pool: base (default), ethereum, arbitrum, optimism or polygon (solana where listed). Not the payment network"
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true / destructiveHint=false, and the description reinforces this with 'Simulated, nothing executed' and discloses a concrete cost ($0.005). It also names what is returned (price impact, minimum received, alternatives), adding context beyond the annotations, though it omits rate limits or auth needs.

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 value ('how much you get now on the best route') and two sentences total, so it is efficient. It is dense with parenthetical asides (cost, routes, chains) but each clause carries information the agent needs, so no major waste.

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?

With no output schema, the description compensates by listing outputs (price impact, minimum received, alternatives), and annotations plus the 'simulated' note cover the safety profile for a read-only quote. Only error/edge behavior (e.g., no route found) is left unaddressed.

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 description coverage is 100%, giving a baseline of 3. The description adds semantic meaning: it clarifies what slippageBps governs ('minimum received at your slippage') and distinguishes chain as the token/pool network from the payment network, pushing it above baseline.

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 gives a specific action (get a swap quote) with rich scope: routes (Uniswap v2/v3/v4, Aerodrome, direct or via WETH) and chains. It clearly differentiates from adjacent tools like token.risk or token.new_launches by content, but never names a sibling explicitly, so it sits at a 4.

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?

'Right before an on-chain swap' gives a clear usage trigger for when to call it. It provides context but names no alternative tool and states no exclusions (e.g., no-route cases or when a pre-trade decision tool is preferable), so it is short of a 5.

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