Skip to main content
Glama

Review a trade from an opportunity (preview only)

review_opportunity_trade

Refresh the sized trade ticket of one of YOUR actionable evaluations before the user trades it — the same action as Review trade in the Gambit app. It is a PREVIEW: it places, queues and confirms nothing. Requires the api:recommend scope (403 without it). This runs the recommendation pipeline (LLM calls, except when the answer comes from Gambit's view) and can take up to ~45 seconds: each call uses one run of the SAME monthly recommendation quota generate_recommendation uses (403 tier_limit_exceeded when it is spent) and one of 5 calls per minute that evaluate_opportunity and review_opportunity_trade share (429 rate_limited with Retry-After). Do not call it speculatively. Pass the values from an evaluate_opportunity answer for a Today's Market card (opportunity_id) whose outcome is actionable: opportunity_id, evaluation_id, scenario_id (null when the evaluation has none), advisory_fingerprint and origin_ticket_fingerprint (trade_ticket.advisory_fingerprint and trade_ticket.ticket_fingerprint) and source_snapshot_fingerprint (source.snapshot_fingerprint). The answer is data.status ready, with the refreshed sizing and trade_ticket, or unavailable with reason_code: evaluation_identity_changed (the card or evaluation changed; evaluate again), evaluation_materially_changed (Gambit's judgment moved; evaluate again), evaluation_no_longer_actionable, trade_ticket_unavailable, or a sizing reason. For an evaluation from Gambit's view (it carries a gambit block) the ticket is re-sized from the same view, with the stop from realized volatility around the current mark, and the user's limits; evaluation_materially_changed means the view moved (a new version, direction or listing; a moved price alone only re-sizes the ticket), and gambit_view_not_current, plan_levels_unavailable or instrument_authority_rejected mean it could not be re-sized on this run (retry later). The ticket is sized for the user's connected MANUAL wallet. Placing any order is a separate api:trade step (execute_recommendation, then confirm_trade) that needs the human's explicit approval of the preview; never chain it automatically. A Gambit evaluation's recommendation is advisory: execute_recommendation refuses it (409 advisory_not_executable), so a trade on it is a separately sized propose_trade, approved the same way. The response carries app_url, the card's screen.

Input Schema

NameRequiredDescriptionDefault
scenario_idNoevaluation.scenario_id; null or omitted when it has none
evaluation_idYesevaluation.evaluation_id
opportunity_idYesthe evaluated card's id
advisory_fingerprintYesevaluation.trade_ticket.advisory_fingerprint
origin_ticket_fingerprintYesevaluation.trade_ticket.ticket_fingerprint
source_snapshot_fingerprintYesevaluation.source.snapshot_fingerprint

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations: discloses the required api:recommend scope (403), the ~45s LLM-pipeline latency, consumption of the same monthly quota as generate_recommendation (403 tier_limit_exceeded), and the shared 5-per-minute rate limit with evaluate_opportunity (429 + Retry-After). It also enumerates unavailable reason codes and gambit-view edge cases, all consistent with readOnlyHint=false (quota-consuming, non-idempotent side effects) and destructiveHint=false (nothing is placed or confirmed).

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-loads the essential facts (what it does, that it is a preview, the auth scope) before the quota, rate-limit and response detail. It is a dense single-block paragraph with a long gambit-view clause chain, but essentially every sentence carries actionable operational information rather than 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?

With no output schema, the description carries the return-value burden and does so: data.status ready with refreshed sizing and trade_ticket, or unavailable with enumerated reason_codes, plus app_url. For a 6-parameter, mutating, quota-limited tool this is complete enough to call correctly without opening anything else.

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, but the description adds genuine value by stating the provenance of every parameter ('Pass the values from an evaluate_opportunity answer') and the cross-references (trade_ticket.advisory_fingerprint / ticket_fingerprint, source.snapshot_fingerprint, scenario_id null when the evaluation has none). It stops short of explaining why each fingerprint must match or what mismatch triggers.

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 ('Refresh the sized trade ticket of one of YOUR actionable evaluations') and immediately scopes it as a preview that 'places, queues and confirms nothing'. It explicitly distinguishes itself from evaluate_opportunity (the source of the inputs), execute_recommendation/confirm_trade (the separate trade step) and propose_trade (the Gambit-view path).

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 precondition (only for an evaluate_opportunity answer whose outcome is actionable, passing its ids/fingerprints), an explicit prohibition ('Do not call it speculatively'), and names the alternatives for acting on the result (execute_recommendation, then confirm_trade with human approval; propose_trade for advisory Gambit evaluations).

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