Skip to main content
Glama

Get a swap quote

get_quote
Read-only

Quote a swap through the OneDex aggregator (XOXNO only if at least 1% better). Returns quotedOut, guaranteed minOut, route, price impact, a full costs breakdown, a one-line costSummary and warnings. Amounts are decimal strings plus raw base units.

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": {
      "tokenIn": "<tokenIn>",
      "tokenOut": "<tokenOut>",
      "amountIn": "<amountIn>"
    },
    "name": "get_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
networkNoMultiversX network (default mainnet; devnet only if configured)mainnet
tokenInYes"EGLD", a token identifier like "ONE-f9954f", or a unique ticker like "USDC"
amountInYesAmount of tokenIn as a decimal string, e.g. "1.5" (not base units)
tokenOutYes"EGLD", a token identifier like "ONE-f9954f", or a unique ticker like "USDC"
slippageBpsNoSlippage in basis points (100 = 1%, default). Above 500 needs confirmHighSlippage: true; above 2000 is refused.
confirmHighImpactNoMust be true to accept price impact above 10%, or when the aggregator-based and independent (api.multiversx.com) impacts disagree by more than 5 points
confirmHighSlippageNoMust be true to accept slippage above 5%

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint and openWorldHint, so safety is already covered, but the description adds real behavior: which aggregator is preferred and under what margin, and that the response carries warnings. It does not address whether the quote hits live state or how stale a quote can get, which matters for an open-world read.

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 sentences, front-loaded with the action and routing rule, then the return contents. Dense but every clause carries information; the only mild cost is that the second sentence is a compressed list.

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 responsibly enumerates the returned fields (quotedOut, minOut, route, price impact, costs, costSummary, warnings). For a 7-parameter quoting tool that is nearly sufficient; quoting freshness or failure modes are the residual gap.

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%, including full descriptions for slippageBps and the two confirm flags, so the description is not required to carry parameter meaning. Its only parameter-adjacent remark ("Amounts are decimal strings plus raw base units") describes output formatting rather than input semantics, leaving the baseline intact.

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?

"Quote a swap through the OneDex aggregator" gives a specific verb and resource, with a notable sourcing rule (XOXNO only if at least 1% better). It does not name the sibling tools it feeds into (build_swap_tx / simulate_swap_tx), so differentiation is inferred from the word "quote" rather than stated.

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

Usage Guidelines3/5

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

Usage is only implied: the read-only quoting nature suggests calling this before build_swap_tx, but the description never states when to quote versus simulate or build, nor any precondition. The 1%-better routing rule describes internal behavior, not when an agent should choose this tool over another.

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.

Resources