Skip to main content
Glama

swap_txn

Builds unsigned swap transactions for a Nomadex pool by finding the best pool for a token pair and returning base64-encoded transactions for signing via UluWalletMCP.

Instructions

Build unsigned swap transactions for a Nomadex pool. Finds the best Nomadex pool for the pair and returns base64-encoded transactions for signing via UluWalletMCP.

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>",
      "amount": "<amount>",
      "sender": "<sender>"
    },
    "name": "swap_txn"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to swap in human-readable units
senderYesSender wallet address
toTokenYesDestination token symbol
slippageNoAllowed slippage percentage (default 5)
fromTokenYesSource token symbol (e.g. VOI, USDC, UNIT)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present the description carries the full burden and does real work: it discloses that the output is UNSIGNED (nothing is executed), that transactions are base64-encoded, that the best pool is selected automatically rather than specified, and that signing happens downstream in UluWalletMCP. It omits failure modes, allowance/balance checks, and slippage consequences.

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?

Two sentences, front-loaded with the action and followed by the return/signing path; nothing is redundant or padding.

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?

The description covers the input side via a fully documented schema and supplies the return shape (base64 unsigned transactions) despite no output schema, which is what an agent most needs. It falls short only on the downstream signing mechanics and error behavior.

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 every parameter including the optional slippage default is already documented in the schema. The description adds no meaning beyond it (e.g. no note on how amount precision interacts with pool selection).

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?

States a specific verb and resource ('Build unsigned swap transactions for a Nomadex pool') plus the outcome ('returns base64-encoded transactions'). It is distinguishable from add_liquidity_txn and remove_liquidity_txn by resource, but it never contrasts itself with get_quote, which covers adjacent territory.

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 — an agent can infer it is the tool for executing a swap, and the mention of signing via UluWalletMCP hints at a workflow, but there is no explicit when-to-use, when-not, or 'call get_quote first' guidance.

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