Skip to main content
Glama

Get a swap quote

get_quote
Read-onlyIdempotent

Quote a swap on-chain via your RPC to see net output, enforced minimum, price impact, and Phoenix Check verdict; use exact=true for an execution-grade dry-run.

Instructions

Quote a swap on-chain through YOUR RPC: net output after the fee, the minimum the Router enforces, price impact and the Phoenix Check verdict (ok / caution / danger / blocked; it fails closed). Set exact=true for an execution-grade dry-run of every leg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNobase | eth | optimism | arbitrum | robinhood, or a numeric chain id. Optional when your RPC has a single chain.
exactNotrue: previewPlanExact, every concentrated leg dry-run
amountNoinput amount in human units, for example "1.5"
tokenInYesinput token: a 0x address, or a symbol such as ETH, WETH, USDC, BZPX
versionNoprotocol version: latest (default) | 1 | 2 | 2.0.0
amountInNoinput amount in base units, as an integer string
tokenOutYesoutput token: a 0x address, or a symbol such as ETH, WETH, USDC, BZPX
userMinOutNooptional explicit minimum output, in base units of tokenOut

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the safety profile is covered. The description adds real behavior beyond that: it fails closed, the verdict has four enumerated states, output is net of fee, and exact=true changes the execution mode to a per-leg dry-run.

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?

Two dense sentences, front-loaded with verb and resource, then the return contents, then the exact flag. Every clause carries information; the em-dash list is efficient rather than padded.

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 usefully enumerates the return fields an agent should expect, and the fails-closed behavior is disclosed. Only the routing relative to sibling quote/simulate tools is missing.

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 schema already documents all eight parameters including exact and version defaults. The description reinforces exact=true semantics but adds no syntax or constraints the schema lacks, so baseline 3 applies.

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?

States a specific verb (quote) and resource (swap) and enumerates the returned quantities: net output after fee, Router minimum, price impact, Phoenix Check verdict. An agent can distinguish this from build_swap/simulate_swap, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this versus simulate_swap or build_swap, and no prerequisites or exclusions. The only usage hint is the parameter-level 'exact=true for an execution-grade dry-run,' which is guidance about a flag, not about tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.