Skip to main content
Glama

Get a token swap quote

get_swap_quote
Read-only

No version argument: token swaps are protocol-agnostic and run on the v4 backend, so the chains and tokens they cover are that backend's and not every chain Aave holds a market on - a chain it does not serve is rejected outright rather than quoted badly. Call get_swappable_tokens first if you do not already know the chain is covered, or read 'canSwapFrom' on the reserve from get_markets. Quote a token swap: returns the quote with a quoteId to prepare and sign through prepare_order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buyYesToken to buy: 'native' for the chain's gas token, or an ERC-20 address (0x...).
kindNosell = spend an exact sell amount; buy = receive an exact buy amount. Default sell.
sellYesToken to sell: 'native' for the chain's gas token, or an ERC-20 address (0x...).
userYesWallet address (0x, 40 hex) of the wallet that will sign the swap - the one the user named in this session. If no wallet has been named, ask for it; never substitute a placeholder, which is rejected.
amountYesAmount in main units (of the sell token for kind=sell, the buy token for kind=buy).
chainIdYesChain id (positive integer).
slippagePctNoOptional max slippage as a percent string, e.g. '0.5' for 0.5%. Omit to accept the backend's suggestion, which moves with market conditions - set this to cap it.

TDQS

A4.6/5.0
Behavior5/5

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

ReadOnlyHint=true already marks it safe, and the description adds substantial context beyond that: swaps run on the v4 backend, coverage is not the same as Aave's market chains, unsupported chains are rejected rather than misquoted, and the result is a quote carrying a quoteId. This is far more than the annotations alone provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries real information, but the definition opens with a version/backend caveat instead of the action verb, and the actual purpose only appears near the end. It is not poorly sized, but it is not the ideal front-loaded structure.

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?

Given no output schema, the description compensates by naming the quoteId and the prepare_order flow, and it preempts the main failure mode (unsupported chain). Minor additional return/error details could be added, but an agent has enough to invoke and integrate the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented in the schema. The description adds meaning on top by explaining the absence of a version argument, clarifying that the backend determines chain/token coverage, and tying the result to prepare_order via quoteId. This exceeds the baseline expected for full schema coverage.

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?

States a specific action: 'Quote a token swap: returns the quote with a quoteId to prepare and sign through prepare_order.' It is unambiguously distinct from siblings like get_swappable_tokens, which is described as a prerequisite, and prepare_order, which consumes the quoteId.

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

Usage Guidelines5/5

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

Explicitly tells the agent when to do prerequisite work: 'Call get_swappable_tokens first if you do not already know the chain is covered, or read canSwapFrom...' It also explains that unsupported chains are rejected outright rather than badly quoted, so the tool should not be tried blindly. The prepare_order follow-up is named as well.

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.

TDQS

A4.1/5.0
Disambiguation4/5

The tool set is organized into clear read/prepare/action families, and cross-references like get_user_positions vs get_user_summary or get_markets vs get_reserve_details keep purposes distinct. A couple of generic names—prepare_action vs prepare_order, preview_action vs prepare_action—could cause misselection, but the descriptions explicitly separate them.

Naming Consistency4/5

Names overwhelmingly follow a verb_noun snake_case pattern: get_* for reads, prepare_* for transaction builders, plus cancel_order and submit_signed_order. The pattern is consistent overall, though a few generic exceptions like get_started, get_aave_guide, and preview_action break the strict resource-noun convention.

Tool Count2/5

With 40 tools, the set is well past the 25+ threshold and feels heavy even though the domain is broad. Most tools are distinct and justified, but an agent must navigate a very large list, and the server could reasonably be split into protocol, governance, and swap/order surfaces.

Completeness4/5

The surface covers v3/v4 reads, positions, health factors, simulations, transaction building, collateral, eMode, liquidation, rewards, sGHO, swaps/orders, and governance proposal reads, with clear sequencing between preview, prepare, and submit. Minor gaps exist—governance has no voting transaction and stkGHO balance/cooldown state is not readable—but they do not block the core Aave workflows.

Resources