Skip to main content
Glama

Create XMR/USDC swap order

create_swap
Idempotent

Step 2. Creates the order from get_quote's next.arguments (quoteId, plus to if the quote had none): one order per quote; moves no funds. An order cannot be cancelled; unfunded, it expires. Retry with the same arguments: the default idempotencyKey returns the same order. Fund once, only while payable is true: before signing deposit.payment, get_swap_status {orderId, payment} must return paymentCheck.safeToSend. Next: get_swap_status.

Input Schema

NameRequiredDescriptionDefault
toNoDestination, only if the quote had none (next.missing). Never guess.
detailNo
quoteIdYesFrom get_quote's next.arguments.
idempotencyKeyNoOptional; default q_<quoteId>. Reuse on every retry. A custom key: a fresh random UUID per intent.
quoteIntentDigestNoFrom next.arguments: create fails if the quote's terms differ.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
nextYes
errorNo
queueNo
stateNo
depositNo
orderIdNo
payableNo
replayedNo
trackUrlNo
fromQueueNo
operationYes
recoveredNo
destinationNo
userMessageNo
payableReasonNo
idempotencyKeyNo
expectedReceiveNo
reconfirmRequiredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / fromQueue
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / idempotencyKey
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / queue
      Added value: +{
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover safety/idempotency flags; the description adds substantive traits they do not: no funds move, orders cannot be cancelled, unfunded orders expire, and the default idempotencyKey yields the same order on retry. It also gates the funding action behind a separate verification call, which is real behavioral guidance.

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?

Dense and front-loaded with the core action first, then constraints, retry, and funding. The colon/semicolon run-on is information-efficient but slightly harder to parse than distinct sentences would be; every clause still carries load.

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?

An output schema exists so return values need no explanation, and annotations cover the safety profile. The description fills the remaining gaps for a stateful, idempotent order-creation tool: upstream source, non-cancellability, expiry, retry behavior, and the mandatory funding precondition.

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 80%, so the baseline is 3, but the description adds provenance the schema cannot: quoteId and to come from get_quote's next.arguments, and to is only supplied when the quote had none. It reinforces 'Never guess' for to, tying parameter values to the upstream call.

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 (creates) and resource (swap order) and positions itself in the workflow as 'Step 2' consuming get_quote's output. It is trivially distinguishable from siblings like get_quote and get_swap_status, which it names explicitly.

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 explicit when-to-use (after get_quote, one order per quote), when-not-to-fund ('only while payable is true'), the pre-signing precondition (paymentCheck.safeToSend), and the next step (get_swap_status). Retry semantics are also spelled out, so an agent needs no inference.

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