Skip to main content
Glama

wait_for_trade

Read-only

Poll trade status by requestId until filled, failed, not found, or pending at timeout; returns outcome without resubmitting.

Instructions

Follow a buy_token / sell_token requestId to its result by polling /v1/trade-status. outcome: filled, failed, not_found (expired id) or pending (still running at the timeout: never resubmit).

Input Schema

NameRequiredDescriptionDefault
requestIdYesrequestId returned by buy_token or sell_token
timeoutSecNoMax seconds to wait, default 120

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint and openWorldHint, but the description adds meaningful context beyond them: the polling mechanism, the full set of outcome states (filled, failed, not_found, pending), and the safety caveat about pending/expired ids. Polling interval is not stated, but with no output schema the outcome enumeration carries the key behavioral weight.

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?

Two tight sentences, front-loaded with the action and followed by the outcome states. Every clause earns its place with no redundancy.

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?

For a 2-param wait tool with no output schema, the description supplies the outcome values an agent would otherwise lack and clarifies the pending/expired edge case. Nothing essential for correct invocation or interpretation 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?

Schema description coverage is 100% and the schema already documents both requestId and timeoutSec (default 120). The description repeats 'requestId from buy/sell' without adding syntax or format detail beyond the schema, so baseline 3 applies.

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 names a specific verb (follow/poll) and resource (a trade request's result via /v1/trade-status), and anchors itself to buy_token/sell_token requestIds. This distinguishes it from unrelated read tools and clarifies it is the polling step of the trade lifecycle.

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 establishes the precondition (a requestId from buy_token or sell_token) and a key when-not rule ('never resubmit' on pending). It does not explicitly distinguish from the sibling usdc_wait_for_trade, which is a minor omission.

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

Deploy Server

Other Tools