Skip to main content
Glama

Check a swap's outcome

get_swap_status
Read-only

Check where a quote or swap stands, by request_id (the quote_id) OR transaction_signature — exactly one. Moves nothing and is safe to call again. status is one of: not_executed (quoted but never executed — nothing was traded; it can still be executed until quote_expires_at), expired (never executed and now too old — nothing was traded; get a fresh quote if the user still wants it), pending (submitted, waiting for confirmation), confirmed, failed. executed_at is when it was submitted (null = never). Once booked, filled_input_amount_ui / filled_output_amount_ui are what was actually spent and received and effective_slippage_bps how far the fill landed from the quote. A failed swap carries failure_details (transaction_signature, stage, error_class, chain_error, provider). error_class is always set for an on-chain revert: slippage_exceeded (requote), insufficient_funds / insufficient_lamports (the wallet could not cover the trade or SOL for fees/rent), program_error (a program refused it; its code is in chain_error.code), unknown_revert; dropped_tx_blockhash_expired means it never landed. request_id also accepts the Reference ID a failure message printed. A confirmed sell carries resting_order_ids: your orders still live on the token sold (empty once a full sell's exits are all cancelled).

🔴 CALL THIS WHENEVER execute_swap OR quick_buy RETURNED A next_step. A swap can return before its fill is confirmed. Until this tool says the swap succeeded, you do NOT know that it did: never tell the user their tokens have arrived based on the execute response alone, and never re-execute the quote to find out (that would trade twice). If it is still pending, say so and check again shortly.

Input Schema

NameRequiredDescriptionDefault
request_idNoThe `quote_id` of the swap you executed. Give this OR `transaction_signature`.
transaction_signatureNoThe `transaction_signature` the swap returned. Give this OR `request_id`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark it read-only and non-destructive, but the description adds substantial non-structured behavior: it "moves nothing," is safe to repeat, warns that the status can be transient (pending) and must not be assumed final, and enumerates every failure class and what each implies for the user. The "safe to call again" wording is compatible with idempotentHint=false because the returned status legitimately changes over time — no 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 what the tool does and the critical call trigger, then structured status-by-status. It is long and dense, and a few clauses (filled amounts, resting orders) border on explaining the output schema, but nearly every sentence changes how an agent should act on the result.

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 explains the decision-relevant semantics of status values and error classes that a schema alone would not convey (e.g., not_executed means nothing was traded and can still execute until expiry). For a two-param post-trade status check, nothing an agent needs 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% and both params are already documented, so the baseline is 3; the description adds real value by stating the exactly-one constraint and by noting that request_id also accepts the Reference ID printed in a failure message — a non-obvious acceptance rule absent from 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 ("Check where a quote or swap stands") plus the two mutually exclusive lookup keys, and implicitly separates itself from get_swap_quote (pre-trade) and execute_swap (submission) by being the post-execution read. An agent can tell exactly what this returns and when it applies.

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?

Explicit trigger ("CALL THIS WHENEVER execute_swap OR quick_buy RETURNED A next_step"), an explicit prohibition with rationale ("never re-execute the quote to find out (that would trade twice)"), and follow-up guidance for the pending case ("if it is still pending, say so and check again shortly"). This is the strongest possible when/when-not coverage.

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