MCP Toolsget_quote

get_quote

Get a swap quote with routing preview. Read-only price check — does NOT execute.

Tier: Free

Parameters

ParameterTypeRequiredDescription
sellTokenstringYesToken to sell — symbol (e.g. “USDC”) or contract address
buyTokenstringYesToken to buy — symbol or contract address
sellAmountstringYesAmount to sell in human-readable units (e.g. “100”)
chainIdnumberNoChain ID (default: 1)

Example

"Get me a quote for swapping 100 USDC to ETH on Ethereum"

Response

Returns:

  • Input and output amounts
  • Exchange rate
  • Protocol used (0x or 1inch)
  • Estimated gas

Implementation

  1. Resolves token symbols to contract addresses
  2. Tries 0x API first, falls back to 1inch
  3. Returns formatted quote with rate calculation

Notes

  • Requires ZEROX_API_KEY or ONEINCH_API_KEY
  • Use the swap write tool to execute the quote