Skip to main content
Glama

Check swap status

get_swap_status
Read-onlyIdempotent

Check a cross-chain swap's current state by its swap_id — pending, processing, success, failed, refunded, incomplete deposit or expired — and get deposit, payout and refund links to confirm whether funds arrived.

Instructions

Look up a swap made with create_swap by its swap_id and explain where it is: PENDING (no deposit seen yet), PROCESSING, SUCCESS, FAILED, REFUNDED, INCOMPLETE_DEPOSIT (less than required arrived) or EXPIRED (address closed, never send to it). swap_id is the protocol-prefixed id create_swap returned, such as near: or chainflip:--; pass it unchanged, prefix included. Returns amounts in normal units and the deposit, payout and refund transaction links. A malformed id is rejected before any request, an unknown one returns "No swap with that id", and a router outage returns an error to retry later. Use it when the user asks whether their swap arrived. Read-only and safe to repeat; poll every 30 seconds or more, not in a tight loop.

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": {
      "swap_id": "<swap_id>"
    },
    "name": "get_swap_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
swap_idYesswap_id exactly as returned by create_swap, e.g. "near:0xAbc..." or "chainflip:123-Btc-45".

Output Schema

NameRequiredDescriptionDefault
reasonNoFailure or refund reason from the route, if any.
statusYesCurrent state.
meaningYesPlain-language explanation of the status.
swap_idYesThe swap.
protocolNoRoute used.
refundedNoRefunded amount, if any.
amount_inNoExpected deposit.
amount_outNoActual payout, once known.
expires_atNoWhen the deposit address stops accepting funds.
payout_txsNoPayout transaction links or hashes.
quoted_outNoOutput quoted at creation.
refund_txsNoRefund transaction links or hashes.
deposit_txsNoDeposit transaction links or hashes.
explorer_urlNoPublic tracking link.
deposit_addressNoWhere the deposit goes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description explains status meanings, swap_id formatting, that malformed ids are rejected before any request, unknown ids return a specific message, and router outages should be retried later. It also explains polling behavior, which is useful operational context beyond readOnly/idempotent hints.

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?

The description is front-loaded with the core purpose and status meanings, then covers id format, returns, errors, usage, and polling. It is dense but every sentence adds useful operational or decision-making context.

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 presence of an output schema and strong annotations, the description still fills in important gaps about statuses, id format, error behavior, and polling. An agent has enough information to invoke the tool correctly and interpret common outcomes.

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?

The schema already documents swap_id completely, so the baseline is 3. The description adds meaningful semantics by explaining that swap_id is protocol-prefixed, giving examples like near:<deposit address> and chainflip:<block>-<network>-<channel>, and instructing to pass it unchanged with the prefix included.

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: look up a swap made with create_swap by swap_id and explain its status. It distinguishes the tool from create_swap by tying itself to swaps already created, and enumerates the possible statuses so the agent knows what the output means.

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

Usage Guidelines4/5

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

It gives a clear usage cue: use it when the user asks whether their swap arrived. It also adds polling guidance of every 30 seconds or more, but it does not explicitly name alternatives or when not to use it.

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