putty
MCPBlockchainDeFi

get_swap_quote

Get a swap quote from the Uniswap API. Translates the high-level `chain` argument to the numeric chain id the API expects, then POSTs to `/v1/quote` with the wallet, tokens, and amount. Returns the raw quote payload, including gas estimates, the route, and (for UniswapX routes) the Permit2 payload to sign before `/swap` is called. The most useful tool in the DeFi set: agents will call it before every swap.

Get a swap quote from the Uniswap API. Translates the high-level chain argument to the numeric chain id the API expects, then POSTs to /v1/quote with the wallet, tokens, and amount.

Input

The tool takes a single JSON object. Every field, its type, and an example are on the generated reference at GET /mcp/tools, under this tool's name.

Calling it

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { "name": "get_swap_quote", "arguments": {} }
}

Put your arguments in place of the empty object. A call that fails comes back as a normal result carrying isError: true and a message naming what went wrong, not as a JSON-RPC protocol error.

Notes

Returns the raw quote payload, including gas estimates, the route, and (for UniswapX routes) the Permit2 payload to sign before /swap is called. The most useful tool in the DeFi set: agents will call it before every swap.

The full request and response shape, and a live playground, live on the generated reference at GET /mcp/tools.

On this page