Skip to main content
Glama

gdex_execute_trade

Destructive

Executes an approved trade preview within delegated authority, re-quoting first; if terms moved or expired, returns a revised preview instead of trading.

Instructions

Execute a preview within the user's authority: userApproved=true only after the user approved THIS preview's terms; otherwise the account's delegated policy must allow it (else status denied). Re-quotes first: moved or expired terms return status revised with a new preview instead of trading. Returns an operation; follow it with gdex_operation. Never call again for the same intent after submission_unknown.

Input Schema

NameRequiredDescriptionDefault
previewIdYes
userApprovedNoTrue only if the user explicitly approved this exact preview

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint/openWorldHint annotations, it discloses non-obvious behavior: it re-quotes first, moved/expired terms return status 'revised' with a new preview instead of trading, and the outcome statuses (denied, revised, submission_unknown). These are real behavioral traits an agent needs to avoid double-submitting.

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?

Dense but front-loaded: the core action and approval condition lead, followed by re-quote behavior and the follow-up/retry rules. Every clause carries information, though the single packed paragraph could be broken up for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so at a high level ('Returns an operation; follow it with gdex_operation') while enumerating the possible statuses. It is nearly complete for a 2-param mutation tool, missing only a fuller account of the success payload.

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 only 50% (previewId has no schema description), so the description must compensate. It clearly defines userApproved semantics ('only after the user approved THIS preview's terms'), adding meaning beyond the schema, and previewId's meaning is implied by the preview-flow context, though not spelled out.

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+resource ('Execute a preview') and ties it to the preview-based flow, which distinguishes it from the direct execute_* siblings (execute_spot, execute_cross_perp) and from gdex_preview_trade that creates the preview. An agent can identify the tool's role 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 explicit when-to-use conditions: userApproved=true only after the user approved THIS preview, otherwise the delegated policy must allow it; and explicit follow-up ('follow it with gdex_operation') and a when-not rule ('Never call again for the same intent after submission_unknown'). This is actionable routing guidance.

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