Skip to main content
Glama

Create a swap order

create_swap

Create a real swap order and return the deposit address the user has to send funds to. This call moves no money by itself, but the order is real: it exists in support, it can expire, and a fixed rate is locked against it. Quote the swap first, validate the recipient address, and confirm the amount and the address with the user before calling this. If the user has not explicitly approved both, use swap_link instead and let them confirm on the page. The answer names who executes the order, and that has to be relayed: some orders are routed to a partner aggregator rather than ChangeNOW.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesAsset the user receives, canonical id, for example "usdt.trx".
fromYesAsset the user sends, canonical id, for example "eth.eth".
memoNoMemo or destination tag for the recipient address, when the asset needs one.
addressYesAddress that receives the swapped asset. Check it with validate_address first; a wrong network here loses the funds.
rate_idNoThe rate_id from quote_swap with rate_type "fixed". Required for a fixed rate order. It holds for about two minutes, so quote again right before this call if the user needed time to decide.
amount_toNoAmount the user wants to receive. Requires rate_id from quote_swap.
promo_codeNoPromo code to apply, if the user has one.
amount_fromNoAmount the user sends. Pass this or amount_to, never both.
refund_memoNoMemo for the refund address.
contact_emailNoOptional email for status notifications about this order.
refund_addressNoWhere the deposit returns if the swap cannot complete. Strongly recommended: without it a failed swap needs support.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
toYes
fromYes
statusYes
providerYes
warningsYes
amount_toYes
rate_typeYes
track_urlYes
created_atYes
amount_fromYes
refund_memoYes
valid_untilYes
payin_addressYes
payin_extra_idYes
payout_addressYes
refund_addressYes
payout_extra_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / rate_id / description
      Previous value: -"The rate_id from quote_swap with rate_type \"fixed\". Required for a fixed rate order, and it expires after about ten minutes."New value: +"The rate_id from quote_swap with rate_type \"fixed\". Required for a fixed rate order. It holds for about two minutes, so quote again right before this call if the user needed time to decide."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description adds meaningful behavioral context beyond the annotations: it clarifies that no money moves by itself but the order is real, can expire, and locks a fixed rate. It also warns that the response names an executor and that some orders route to a partner aggregator, which is non-obvious and critical for the agent to relay to the user.

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 sentences deliver the core function first, then caveats, preconditions, the alternative tool, and a routing warning. Every sentence earns its place; there is no fluff or repetition of schema details.

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?

Given the 11-parameter schema with full coverage and an output schema, the description supplies all the non-schemaable guidance an agent needs: when to call, what to do first, when to avoid, and what to relay from the result. Nothing essential is missing.

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?

The schema has 100% description coverage for all 11 parameters, so the baseline is 3. The description connects the overall workflow to some parameters—e.g., 'Quote the swap first' refers to rate_id—but it does not add per-parameter meaning beyond what the schema already provides.

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?

The description states a specific verb and resource: 'Create a real swap order' and identifies the output: 'return the deposit address the user has to send funds to.' It further distinguishes the tool from siblings by calling the order 'real' and explicitly routing non-approved cases to swap_link.

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?

The description gives explicit preconditions: 'Quote the swap first, validate the recipient address, and confirm the amount and the address with the user before calling this.' It also states clear exclusion criteria: if the user has not approved, 'use swap_link instead and let them confirm on the page.' This is actionable and unambiguous.

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