Skip to main content
Glama

Swap status

get_swap_status
Read-only

Status and fill of a swap by quote_id or signature. Safe to repeat. Moves nothing. Pass quote_id (from the swap result, or a failure message's Reference ID) OR transaction_signature. status: not_executed (quoted, never executed, nothing traded; executable until quote_expires_at), expired (never executed, too old), pending, confirmed, failed. Once booked, filled_input_amount_ui / filled_output_amount_ui are what was spent and received, effective_slippage_bps the gap to the quote. failed carries failure_details (stage, error_class: slippage_exceeded, insufficient_funds / insufficient_lamports, program_error, unknown_revert; dropped_tx_blockhash_expired = never landed, nothing moved: re-quote and try once more). A confirmed sell lists resting_order_ids. šŸ”“ Call this whenever execute_swap or quick_buy returned a next_step: until it says confirmed, never tell the user tokens arrived, and never re-execute to find out (that trades twice).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_swap_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
quote_idNoThe `quote_id` the swap returned. Give this OR `transaction_signature`.
request_idNoOlder name for `quote_id`.
transaction_signatureNoThe `transaction_signature` the swap returned. Give this OR `quote_id`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / quote_id / title
      Removed value: -"Quote Id"
    • removedInput schema / properties / request_id / title
      Removed value: -"Request Id"
    • removedInput schema / properties / transaction_signature / title
      Removed value: -"Transaction Signature"
    • removedInput schema / title
      Removed value: -"get_swap_statusArguments"
  2. Changed3 schema fields changed
    • addedInput schema / properties / quote_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The `quote_id` the swap returned. Give this OR `transaction_signature`.",
      +  "title": "Quote Id"
      +}
    • changedInput schema / properties / request_id / description
      Previous value: -"The `quote_id` of the swap you executed. Give this OR `transaction_signature`."New value: +"Older name for `quote_id`."
    • changedInput schema / properties / transaction_signature / description
      Previous value: -"The `transaction_signature` the swap returned. Give this OR `request_id`."New value: +"The `transaction_signature` the swap returned. Give this OR `quote_id`."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces this with "Safe to repeat. Moves nothing" while adding behavior annotations cannot express: the full status lifecycle, what each terminal state means, the failure_details stage/error_class taxonomy, and the specific interpretation of dropped_tx_blockhash_expired. The only nuance is that "safe to repeat" sits beside idempotentHint=false, but that is consistent since the returned status evolves between calls, not a contradiction.

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 purpose and the safety constraint, and almost every clause carries operational meaning (status semantics, failure classes, the double-trade warning). The status and error-class enumerations are long and the trailing emoji-marked paragraph delays the most critical instruction slightly, but nothing is filler.

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, yet the description still tells the agent how to read filled_input_amount_ui, effective_slippage_bps and resting_order_ids, plus how to act on failures. For a read-only lookup with three optional params, nothing an agent needs in order to call or interpret it is missing.

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, and the description earns an increment by explaining where quote_id comes from (the swap result or a failure message's Reference ID) and by restating the either/or constraint between quote_id and transaction_signature. It does not, however, mention request_id, the legacy alias in the schema.

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 and resource ("Status and fill of a swap") plus the two lookup keys, which immediately separates it from execute_swap/quick_buy/get_swap_quote. An agent can tell what it returns without opening the 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 trigger ("Call this whenever execute_swap or quick_buy returned a next_step"), an explicit prohibition ("never re-execute to find out (that trades twice)"), and the acceptable inputs including the fallback source of quote_id from a failure message's Reference ID.

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