Skip to main content
Glama

swap_txn

Build unsigned Tinyman v2 token swap transactions on Algorand and return base64-encoded data for wallet signing.

Instructions

Build unsigned transactions to swap tokens on Tinyman v2 (Algorand). Returns base64-encoded transactions for signing via wallet.

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
toTokenYesTo token symbol or ASA ID
slippageNoAllowed slippage percentage (default 0.5)
fromTokenYesFrom token symbol or ASA ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key trait: the output is unsigned and must be signed via wallet, so the tool itself is a non-destructive builder. It omits other important behavior such as whether one transaction or a group is returned, slippage/minimum-received handling, and transaction expiry.

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 tight sentences with no filler, and the core purpose is front-loaded before the return-value note. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must carry return-value context; it only says 'base64-encoded transactions' without clarifying whether that is a single transaction or a group, or what the agent does next. For a swap-building tool with five parameters, that leaves meaningful gaps.

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%, so all five parameters including the slippage default are already documented in the schema. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 3 applies.

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 transactions to swap tokens on Tinyman v2 (Algorand)'. That clearly separates it from add_liquidity_txn and remove_liquidity_txn, though it never explicitly names a sibling or the related get_quote step an agent might need first.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g. whether to call get_quote first, whether the sender needs an ASA opt-in for toToken), and no statement of when this tool is inappropriate. The agent must infer all invocation context from the name and schema.

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