Skip to main content
Glama

Get Swap Quote

get_swap_quote

Get a price quote and unsigned transaction for swapping tokens on SunSwap DEX. Returns an unsigned TX for client-side signing. After signing, submit via execute_swap. Requires API key.

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": {
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "amountIn": "<amountIn>"
    },
    "name": "get_swap_quote"
  }
}

Input Schema

NameRequiredDescriptionDefault
toTokenYesToken to buy — symbol or TRC-20 contract address
amountInYesAmount to swap in smallest unit (SUN for TRX, base units for tokens)
fromTokenYesToken to sell — symbol (USDT, TRX, SUN, ...) or TRC-20 contract address
slippageBpsNoSlippage tolerance in basis points (default: 50 = 0.5%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and largely meets it: it discloses that the return is an unsigned transaction requiring client-side signing, that an API key is required, and what to do next. It omits quote lifetime/expiry and whether slippage is baked into the returned transaction, which matters for a quote that can go stale before signing.

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?

Four short sentences, front-loaded with what is returned, followed by the signing workflow and the auth prerequisite. No sentence is filler and nothing is buried.

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?

For a four-parameter quote tool with no output schema and no annotations, the description covers return shape, the signing handoff, and the API key requirement. The remaining gap is behavioral detail about quote validity and failure modes, not core invocation guidance.

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%, including units guidance for amountIn and the meaning of slippageBps in basis points, so the schema does the heavy lifting. The description adds no parameter-level meaning beyond it, which is the baseline case for fully documented schemas.

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 verb and resource: fetches a price quote plus unsigned swap transaction on SunSwap DEX. The addition of 'unsigned TX for client-side signing' distinguishes it cleanly from execute_swap and broadcast_transaction, which are the natural siblings an agent could confuse it with.

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?

Names the downstream step explicitly ('After signing, submit via execute_swap'), which tells the agent exactly where this sits in the workflow. It stops short of stating exclusions, e.g. that it should not be used when an already-built transaction exists or how it relates to estimate_cost or get_prices.

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.