Skip to main content
Glama

prepare_swap

Read-only

Build a ready-to-execute THORChain swap. Returns the exact vault address to send to, the memo, the source chain, the expected output and guaranteed minimum, the estimated time, and an expiry. Use this when the user wants to actually perform a swap, not just price it (for pricing only, use quote_swap). The returned instruction is what a wallet signs and broadcasts; this tool itself never moves funds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount to swap in THORChain base units (1e8; e.g. 50000000 = 0.5 BTC)
to_assetYesThe target asset to swap to (e.g. ETH.ETH)
affiliateNoOptional affiliate address or THORName that collects a fee
from_assetYesThe source asset to swap from (e.g. BTC.BTC)
destinationYesThe address on the destination chain that will receive the swap output. Required to execute a swap.
affiliate_bpsNoOptional affiliate fee in basis points (0-1000; protocol caps total affiliate fees at 1000 bps)
max_slippage_bpsNoMaximum acceptable slippage in basis points; sets the min-received limit baked into the memo (default 300 = 3%). Range 1-10000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and the description is consistent, adding real context beyond them: the tool never moves funds, the returned instruction is what a wallet signs and broadcasts, and the result carries an expiry. It stops short of discussing failure modes or whether the quote can go stale before broadcast, so not a 5.

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?

Three sentences, all front-loaded: what it does, when to use it, and the safety caveat. Every sentence earns its place with no filler.

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

Completeness5/5

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

There is no output schema, and the description compensates by enumerating the returned fields (vault address, memo, source chain, expected output, guaranteed minimum, estimated time, expiry). Combined with full param coverage and annotations, an agent has everything needed to call and interpret it.

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 the schema already documents all 7 parameters including units, defaults and ranges. The description adds nothing about parameters (it only describes returns), so the baseline 3 applies.

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+resource ('Build a ready-to-execute THORChain swap') and immediately enumerates the artifact it produces, which distinguishes it from the many read-only query siblings. An agent can tell this apart from quote_swap without opening the schema.

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?

Explicitly names the when ('user wants to actually perform a swap'), the when-not ('not just price it'), and the alternative ('for pricing only, use quote_swap'). This is textbook routing guidance.

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