Skip to main content
Glama

Intents Swap

Quote a swap

quote_swap
Read-onlyIdempotent

Quote a swap between any two supported tokens, on any chains, with no account needed. Exact input: send amount (integer base units) of from, receive about amountOut of to and at least minOut, all-in. Assets are CAIP-19. Start it with create_swap.

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": "<from>",
      "to": "<to>",
      "amount": "<amount>"
    },
    "name": "quote_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesCAIP-19 of the asset you receive
fromYesCAIP-19 of the asset you send
amountYesExact input, in the `from` asset's base units
slippageBpsNoOverride; default is automatic (50 bps, 100 on long-tail tokens)

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
quoteYes
minOutYes
quoteIdYes
amountInYes
amountOutYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real value on top: no account required, exact-input semantics, the distinction between expected `amountOut` and guaranteed `minOut`, and that slippage is auto-defaulted unless overridden. It does not mention rate limits or quote expiry/refresh behavior, which would matter for a priced quote.

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?

Three tight sentences with the core purpose front-loaded and no filler. The closing phrase "Start it with create_swap" is slightly ambiguous in direction, costing a point on 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?

With an output schema present, return fields needn't be spelled out, yet the description still names amountOut/minOut to set expectations. For a 4-param quote tool this covers what an agent needs, with only the sequencing wording left hazy.

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 coverage is 100% and each field is already documented, so the description only restates base-unit amounts and CAIP-19 assets. It adds no new meaning for `slippageBps` (e.g., what a higher value costs the user) beyond what the schema states, so the baseline 3 applies.

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?

"Quote a swap between any two supported tokens, on any chains" gives a specific verb and resource plus scope (cross-chain, accountless). It is clearly a read-only price quote, distinguishable from sibling create_swap which executes the swap.

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

Usage Guidelines4/5

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

"Start it with create_swap" places the tool in the swap flow and "no account needed" signals it can be called pre-auth. There is no explicit statement of when not to use it (e.g., versus swap_status for an already-submitted swap), so it falls short of a full 5.

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.