Skip to main content
Glama

Market Intelligence API (core)

Swap quote

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

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. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The annotations already declare read-only, idempotent, non-destructive, and open-world behavior. The description adds useful context beyond annotations: the quote costs $0.005, is simulated, covers multiple venues and chains, and returns price impact, minimum received, and alternatives.

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?

It front-loads the timing and cost, then efficiently packs route scope and return details into one sentence plus a short simulation disclaimer. There is no redundant restatement of the tool name or schema.

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?

Although there is no output schema, the description enumerates the key returned elements: how much you get, price impact, minimum received at your slippage, and alternatives. Given the rich annotations and full schema coverage, this is sufficient for correct invocation.

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 input schema already documents sell, buy, amount, chain, and slippageBps. The description restates supported chains and slippage concepts but adds little parameter-specific syntax beyond the schema, so baseline 3 applies.

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 states a specific action: quote how much you get now for an on-chain swap, naming route venues, supported chains, price impact, minimum received, and alternatives. It also distinguishes the tool from execution by saying it is simulated and nothing is executed.

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 clearly signals timing with "Right before an on-chain swap" and clarifies that the operation is simulated, not executed. However, it does not name sibling tools or explicitly state when not to use this quote.

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