Skip to main content
Glama

swap_quote

Preview cross-chain swap quotes: route, fees, and slippage. Returns Li.Fi quote JSON without execution steps. Evaluate before swapping.

Instructions

Raw Li.Fi swap quote JSON without execution steps. USE WHEN: preview route, fees, and slippage before swap_via_nattswap. NOT WHEN: you need step-by-step agent instructions (use swap_via_nattswap). RETURNS: Li.Fi quote { estimate, toolDetails, transactionRequest, ... }. Free — no x402. Side effects: none.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromChainYesSource Li.Fi chain id (e.g. 1 Ethereum, 8453 Base, 42161 Arbitrum)
toChainYesDestination Li.Fi chain id
fromTokenYesSource token contract address on fromChain
toTokenYesDestination token contract address on toChain
fromAmountYesAmount in token smallest units (wei for 18-decimal tokens)
fromAddressYesSender wallet 0x + 40 hex chars
toAddressYesRecipient wallet 0x + 40 hex chars
slippageNoMax slippage percent (e.g. 0.5 for 0.5%)
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that the tool is free ('no x402') and has no side effects. However, it does not mention idempotency, rate limits, or what happens on invalid input. While adequate, a bit more detail could improve transparency.

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

Conciseness5/5

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

The description is extremely concise, with only three sentences. Information is front-loaded with the primary purpose, then usage guidelines, then return type and properties. No word is wasted.

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 the tool has 8 parameters and no output schema, the description covers the core aspects: purpose, usage context, return shape, cost, and side effects. It lacks details on error conditions or parameter constraints (e.g., slippage range), but for a preview tool this is largely sufficient. A more complete description might include an example or note about input validation, but it's already strong.

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?

The schema description coverage is 100%, so the schema already documents all parameters well. The description adds only high-level return structure ('{ estimate, toolDetails, transactionRequest, ... }'), not additional parameter meaning. Baseline 3 is appropriate as the description provides marginal added value.

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?

The description clearly states the tool returns a 'Raw Li.Fi swap quote JSON without execution steps'. It specifies the verb (get/preview) and resource (swap quote), and distinguishes it from swap_via_nattswap which executes the swap. This level of specificity is excellent.

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?

The description explicitly states when to use ('preview route, fees, and slippage before swap_via_nattswap') and when not to use ('when you need step-by-step agent instructions'), with the alternative tool named. This is ideal guidance for an AI agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DIALLOUBE-RESEARCH/hypernatt-terminal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server