Skip to main content
Glama

swap_quote

[$0.01 USDC per call via x402] Best same-chain swap quote (DEX aggregation) for any token pair on Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche, Solana and more: output amount, minimum received, fees, gas, via Relay (LI.FI fallback).

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_token": "<from_token>",
      "to_token": "<to_token>",
      "amount": "<amount>"
    },
    "name": "swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to sell in human units
slippageNoMax slippage fraction (default 0.005)
to_tokenYesToken symbol or address to buy
from_chainNoChain name or id (default base)
from_tokenYesToken symbol or address to sell
from_addressNoOptional wallet; required for an executable transaction request

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description does add real behavioral context: a per-call price ($0.01 USDC via x402) and the routing provider with its fallback (Relay, LI.FI fallback). However, it omits whether the call is read-only, how long a quote remains valid, and any rate or permission constraints — gaps that annotations would otherwise cover.

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?

One sentence, front-loaded with the cost signal, then purpose, chains, and return fields. The long chain enumeration is slightly bloated but each element carries selection value.

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, yet the description names the key return values (output amount, minimum received, fees, gas), which is what an agent needs to interpret results. The absence of quote-validity and read-only details is a modest gap for a quote tool of this complexity.

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 all six parameters including slippage defaults and from_address semantics are already documented. The description adds only that any token pair across the listed chains is supported, which does not meaningfully extend parameter meaning.

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 concrete verb and resource ('Best same-chain swap quote (DEX aggregation)') and enumerates the supported chains plus the returned fields. The word 'same-chain' implicitly separates it from the sibling bridge_quote, but the sibling is never named, so differentiation still requires inference.

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 only implied: an agent can infer this is for same-chain swaps rather than cross-chain bridging, but there is no explicit 'use this when / use bridge_quote instead when' statement. No prerequisites or exclusions are stated.

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