Skip to main content
Glama

Get swap status

get_swap
Read-only

A swap's live status: waiting (for the deposit), confirming, exchanging, sending, finished, failed, refunding, refunded, expired, verifying (held for an ID check), action_required or unknown. instructions is the next step, for the user. Read it again after poll_after seconds, not sooner (each read asks the exchange), until is_final.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
swap_idYesThe id create_swap returned ('sw_...').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description goes well beyond that by disclosing that each invocation performs an upstream exchange lookup (an implicit rate/cost constraint), that polling should be paced by poll_after, and that is_final is the termination signal. It also explains the meaning of the returned 'instructions' field as the user's next step, which is behavioral context absent from any structured field.

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?

Front-loaded with the state enumeration, then the meaning of 'instructions', then the polling rule in a single imperative sentence. The long status list earns its space because no schema enum exists to carry those values, and there is no filler or repetition.

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, so the description must carry the return shape itself, and it does: status values, 'instructions', 'poll_after', and 'is_final'. For a one-parameter polling tool with only readOnlyHint for annotations, nothing an agent needs in order to call it correctly or interpret the result 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?

With a single parameter at 100% schema coverage, the schema already states that swap_id is the id create_swap returned, including pattern and length constraints. The description adds nothing further about the parameter, so this is the baseline case where the schema does the work.

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 definition identifies the resource and the exact information returned (a swap's live status) rather than restating the tool name, and enumerates every possible state including the less obvious ones ('verifying (held for an ID check)', 'action_required', 'unknown'). That state vocabulary makes it unmistakable next to create_swap, get_quotes, or validate_address, which deal with initiating or pricing rather than reporting progress.

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?

It gives explicit operational guidance: re-read only after poll_after seconds, not sooner, and keep reading until is_final. It even explains the reason ('each read asks the exchange'), which tells the agent that repeated polling has a real cost. The only gap is that no alternative tool is named for edge cases, but the when-to-use and when-to-call-again conditions are unusually concrete.

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