Skip to main content
Glama

usdc_wait_for_trade

Read-only

Wait for a pending USDC trade by polling every 3s, returning each step, outcome and tx hash; needs_retry can be retried, pending means never resubmit.

Instructions

Follow a pending USDC trade (requestId from usdc_buy, usdc_buy_with_native or usdc_sell) to its result, like gdex.pro's live progress note: polls every 3s and returns each step as it happened (bridge legs, gas top-up, approve, swap), the outcome and the tx hash. outcome "needs_retry" means a sell broadcast was dropped and can be retried in place with usdc_retry_sell; "pending" after the timeout means still settling: never resubmit.

Input Schema

NameRequiredDescriptionDefault
apiKeyNoGDEX API key for AES encryption
requestIdYesrequestId returned by the trade
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
timeoutSecNoMax seconds to wait, default 120
walletAddressNoControl wallet address
sessionPrivateKeyNoSession private key from sign-in

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.12.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description nonetheless adds real behavioral context beyond the annotations: a 3s polling cadence, the enumerated steps returned (bridge legs, gas top-up, approve, swap), the outcome vocabulary, and the resubmission prohibition. With annotations carrying the safety signal, a 4 is defensible, but the polling/timeout interaction details remain implicit, so a middling-to-good score is appropriate.

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, then the outcome semantics, then the caution. Dense and largely waste-free; the aside 'like gdex.pro's live progress note' is decorative rather than functional, a minor cost.

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?

No output schema exists, so the description is the sole source of return-value documentation, and it delivers: step-by-step results, outcome states, and the tx hash. Combined with the retry/pending semantics and the 3s poll interval, an agent has everything needed to call and interpret it.

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 a baseline of 3 applies. The description adds genuine meaning by tying requestId to the specific producing tools, and by implying timeoutSec governs the pending-vs-timeout outcome; the remaining secret/session parameters are left to 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 ('follow') and resource ('pending USDC trade') and identifies the requestId provenance (usdc_buy, usdc_buy_with_native, usdc_sell), which distinguishes it from the sibling wait_for_trade and the get/poll tools.

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?

Explicitly covers the branch on outcome: 'needs_retry' routes to usdc_retry_sell, and 'pending after the timeout' carries an explicit 'never resubmit' prohibition. When-to-use and when-not-to-use are both spelled out with named alternatives.

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