Skip to main content
Glama

dex_tx_swap_quote

Destructive

Returns swap route and pricing. Call before swap_prepare; show result to user before proceeding. → transfer_preview for direct token send (not exchange).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesHuman-readable amount of source token to swap, e.g. "0.001" for 0.001 BNB, "1" for 1 USDT. Do NOT convert to smallest unit (wei/lamports). Obtained directly from user's chat message.
slippageYesSlippage tolerance as decimal ratio: 0.01 = 1%, 0.03 = 3%. Valid range: 0.001 (0.1%) to 0.499 (49.9%). If the user already specified slippage, use it directly. Only ask to confirm when not provided. Default: 0.03 (3%).
token_inYesSource token contract address. Use "-" for native coins (ETH, BNB, MATIC, etc.). For ERC20/BEP20 tokens, provide the full contract address (e.g. 0x55d398326f99059ff775485246999027b3197955 for BSC USDT). Obtain from user input, wallet token list (wallet_get_token_list), or known token mappings. If native_in=1, this field will be auto-set to "-".
mcp_tokenNoMCP session token obtained from login (dex_auth_google_login_poll or dex_auth_gate_login_poll). MUST be provided in every call to this tool after login; omitting it will result in 403
native_inYes⚠️ CRITICAL — Must be set correctly, wrong value causes transaction failure or fund loss. Simply check: is token_in a native/gas coin? If yes, set 1; if it's a contract token, set 0. Native coins: ETH, BNB, MATIC, AVAX, SOL — these are the chain's gas coins, native_in=1. Contract tokens: USDT, USDC, WETH, WBNB, DAI, etc. — these are ERC20/BEP20/SPL tokens, native_in=0. NOTE: BNB = native coin (native=1), WBNB = wrapped contract token (native=0). User saying 'BNB' means the native coin unless they explicitly say 'WBNB'. Same for ETH vs WETH, SOL vs WSOL. When native_in=1, token_in is auto-normalized to '-'.
to_walletNoDestination chain receiving address. ONLY required for CROSS-CHAIN swaps where chain_id_in and chain_id_out belong to different address groups (e.g. EVM→Solana or Solana→EVM). Obtain from dex_wallet_get_addresses: use addresses["SOL"] if dest is Solana, addresses["EVM"] if dest is EVM. Omit for single-chain swaps — defaults to user_wallet.
token_outYesDestination token contract address. Use "-" for native coins. For ERC20/BEP20 tokens, provide the full contract address. Obtain from user input, wallet_get_token_list, or known token mappings. If native_out=1, this field will be auto-set to "-". For cross-chain swaps, use the token's contract address on the destination chain.
native_outYes⚠️ CRITICAL — Must be set correctly, wrong value causes transaction failure or fund loss. Simply check: is token_out a native/gas coin? If yes, set 1; if it's a contract token, set 0. Native coins: ETH, BNB, MATIC, AVAX, SOL — these are the chain's gas coins, native_out=1. Contract tokens: USDT, USDC, WETH, WBNB, DAI, etc. — these are ERC20/BEP20/SPL tokens, native_out=0. NOTE: BNB = native coin (native=1), WBNB = wrapped contract token (native=0). User saying 'BNB' means the native coin unless they explicitly say 'WBNB'. Same for ETH vs WETH, SOL vs WSOL. When native_out=1, token_out is auto-normalized to '-'. CROSS-CHAIN EXAMPLE: USDT(BSC) → SOL(Solana): native_in=0 (USDT is contract token), native_out=1 (SOL is native coin). CROSS-CHAIN EXAMPLE: ETH(Ethereum) → USDT(BSC): native_in=1 (ETH is native coin), native_out=0 (USDT is contract token).
chain_id_inYesSource chain ID. Use well-known IDs: ETH=1, BSC=56, Polygon=137, Arbitrum=42161, Base=8453, Avalanche=43114, Solana=501. Only call dex_chain_config for uncommon/unknown chains. For single-chain swap, must equal chain_id_out.
user_walletYesUser's wallet address matching the SOURCE CHAIN. CRITICAL: You MUST use the chain-specific address — call dex_wallet_get_addresses(account_id) first, then use addresses["EVM"] for EVM chains (ETH/BSC/Polygon/Arbitrum/Base/Avalanche) or addresses["SOL"] for Solana (chain_id=501). NEVER pass an EVM address (0x...) for Solana transactions or vice versa. For cross-chain swaps this is the FROM (source) chain address.
chain_id_outYesDestination chain ID. Use same well-known IDs as chain_id_in. For single-chain swap, set equal to chain_id_in. For cross-chain swap, set to the target chain's ID.

TDQS

A3.8/5.0
Behavior1/5

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

The description states 'Returns swap route and pricing,' which implies a read-only operation, but the annotations declare destructiveHint=true. This is a direct contradiction. The description does not add any behavioral context that would resolve the discrepancy, and it contradicts the structured annotation.

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 two sentences long, front-loaded with the core purpose, and every sentence earns its place. It efficiently covers purpose, workflow integration, and alternatives without any wasted words.

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 extremely rich input schema (every parameter documented) and the tool's simple read-like purpose, the description is sufficient. It states what the tool returns and how to use it. The only gap is the contradiction with annotations, but that is handled under behavioral transparency. The description is complete enough for an agent to understand when and why to invoke this tool.

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 all 11 parameters are well-documented in the input schema. The description itself adds no parameter details beyond the schema, which meets the baseline for high coverage. No additional semantic value is provided.

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's purpose: 'Returns swap route and pricing.' It explicitly positions the tool within the workflow ('Call before swap_prepare') and distinguishes it from an alternative ('transfer_preview for direct token send'). This is specific and differentiates from siblings.

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 provides clear usage guidance: call before swap_prepare, show the result to the user before proceeding, and use transfer_preview instead for direct token transfers. This explicitly states when and how to use the tool relative to alternatives.

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

B3.4/5.0
Disambiguation4/5

Most tools have clear, distinct roles (auth flows, market data, swap stages, wallet operations). A few ambiguities exist, such as dex_tx_get_sol_unsigned vs dex_tx_transfer_preview and dex_agentic_report's name not matching its description, but overall agents can reliably select the correct tool.

Naming Consistency3/5

Naming is inconsistent: while all tools share the dex_ prefix and category segments, some use get_*, others list_*, and several are noun phrases (dex_chain_config, dex_tx_gas, dex_tx_detail). Auth tool ordering also varies (gate_login_start vs login_gate_wallet), making the pattern less predictable.

Tool Count2/5

With 47 tools, the server is over-scoped and burdensome for agents to navigate. Even though the broad DEX domain justifies many features, this exceeds the 25+ threshold for 'too many' and could benefit from consolidation into fewer, higher-level tools.

Completeness4/5

The tool set comprehensively covers DEX workflows: auth, market data, token info, wallet balances, transfer/swap pipeline, cross-chain bridge, and x402 payments. Minor gaps include lack of explicit swap cancellation or withdrawal execution, but these are secondary to the core functionality.