Skip to main content
Glama

Create a swap (for an agent that controls the sending wallet)

create_swap

Creates the swap and returns the payment instruction: the one-time deposit address, the memo if the chain needs one, the exact amount in decimal and in base units with the decimals and token contract as listed by the liquidity partner, a wallet URI where a standard exists (BIP-21, ERC-681, Solana Pay, Monero, TON), and the status URL. Use it only when you control the wallet at fromAddress and will send the deposit yourself; for a person use swap_page_link. The deposit must come from fromAddress; there is no refund address — a swap that cannot be completed is handled by support from the swap id. Floating rate: the final amount is set when the deposit confirms.

Input Schema

NameRequiredDescriptionDefault
toYesasset slug to receive, e.g. btc
fromYesasset slug you send, e.g. usdt-trc20
amountYesdecimal amount you send, as a string, within get_limits
extraIdNomemo / destination tag / payment ID for the receiving side, only where that asset needs one
toAddressYesthe receiving address for the `to` asset
fromAddressYesthe address you will send the deposit from (a wallet you control)
fromExtraIdNothe sending side's extra id, only if your wallet attaches one

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag the write, non-idempotent, open-world profile, and the description adds genuinely non-obvious behavior: no refund address, failed swaps handled by support via swap id, and floating rate where the final amount is only fixed on deposit confirmation. The only gap is that it doesn't say whether calling twice creates two swaps or whether the quote expires, though non-idempotent is already annotated.

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?

Front-loaded with the action and its return value, then conditions and caveats in descending priority; no filler sentences. The first sentence is dense with a long parenthetical list of URI standards, but since there is no output schema that detail is load-bearing rather than decorative.

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?

No output schema exists, and the description fully covers the response surface an agent must act on (address, memo, amount formats, wallet URI, status URL). For a non-idempotent, irreversible-value tool it also discloses the no-refund and floating-rate behavior, leaving nothing essential unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: the deposit must originate from fromAddress and that wallet must be under the caller's control, and the returned amount is expressed both in decimal and base units against the partner's token contract. That clarifies the constraint that makes fromAddress semantically different from toAddress.

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?

Specific verb and resource ("Creates the swap") plus an explicit enumeration of what comes back: deposit address, memo, amount in decimal and base units, wallet URI, status URL. It also names the sibling it is not (swap_page_link), so an agent can route without opening any 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?

Gives an explicit use condition ("only when you control the wallet at fromAddress and will send the deposit yourself") and an explicit alternative for the other case ("for a person use swap_page_link"). The when-not case is stated, not merely implied.

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