MT5 Trade eXecutor. Execution sibling of MBT: MBT reads/backtests, MTX places and manages real trades. Config-driven, never guesses broker constraints (reads symbol_info, validates via order_check).
MTX has 15 well-named tools with consistent verb_noun patterns (get_*, open_*, close_*, etc.). Descriptions are present and substantive (avg ~150 chars), explaining WHAT each tool does and WHEN to use it. Input schemas are visible and typed. However, critical gaps exist: (1) No output schemas documented, LLMs cannot predict response structure for chaining; (2) Enum constraints missing on critical parameters (side: 'buy'|'sell', order_type: 'buy_limit'|'sell_limit'|'buy_stop'|'sell_stop'), free-form strings invite hallucination; (3) No error recovery guidance, tools return generic {'error': str(e)} without actionable next steps; (4) Confirmation pattern present but not formally documented as a dry-run/preview mechanism in descriptions; (5) No parameter constraints (min/max for volume, numeric ranges) visible in schemas.
Compute a broker-correct position size (in lots) from a risk budget and stop distance. Provide EITHER risk_pct (% of equity) OR risk_amount (account currency), and EITHER sl_price (absolute price) OR sl_points (distance in points). Does not place a trade — pass the returned 'volume' into open_position.
Cancel a working pending order. Same confirm/auto gating as open_position.
Close an open position, in whole or in part. volume in lots; omit for a full close (partial close leaves the remainder open). Same confirm/auto gating as open_position.
Balance, equity, margin, margin_free, margin_level, profit, currency, leverage, and login id for the connected account.
Show the active MTX configuration: terminal path, account login id, execution mode, and money-management summary. Password is redacted. Contains local paths — do not share this output publicly.
Closed deals between from_date and to_date ('YYYY-MM-DD'). Defaults to the last 7 days through now if omitted.
No output schemas documented. LLMs cannot predict response structure (fields, types, pagination) for downstream chaining. E.g., get_positions returns {count, positions} but field types and structure of position objects are undocumented.
Critical parameters lack enum constraints. 'side' in open_position accepts free-form string instead of enum ['buy', 'sell']. 'order_type' in place_pending_order should be enum ['buy_limit', 'sell_limit', 'buy_stop', 'sell_stop']. LLMs will hallucinate invalid values.
Error handling returns generic {'error': str(e)} with no recovery guidance. E.g., 'Invalid symbol' does not suggest calling get_symbol_info first. Errors should categorize as retryable/user-fixable/fatal and guide next steps.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | 2026-07-28+ | v2 |
List working pending orders (buy_limit/sell_limit/buy_stop/sell_stop), optionally filtered by symbol. volume is in lots, sl/tp/price are absolute prices.
List open positions (optionally filtered by symbol). volume is in lots, sl/tp are absolute prices.
Broker-reported symbol constraints and the current bid/ask: digits, point, volume_min/max/step, stops/freeze level (in points), contract size, tick value, spread, and filling mode. Everything a trade must be normalized against.
Evaluate money-management guardrails (equity stop, margin level, per-position loss limits) against the live account. Always reports breaches; if config's mm.enforce is true it also executes the protective closes. Safe to poll on a cron.
Change price/SL/TP/expiration on a working pending order. Absolute prices; omit a field to leave it unchanged. expiration is 'YYYY-MM-DD HH:MM'. Same confirm/auto gating as open_position.
Change SL/TP on an open position. sl/tp are absolute prices; omit one to leave it unchanged, pass 0 to remove it. Same confirm/auto gating as open_position.
Open a market position. side: 'buy' or 'sell'. volume in lots (normalized to the symbol's step/min/max). sl/tp are absolute prices (optional). In execution.mode 'confirm', omitting confirm returns a validated preview only — no trade is sent; call again with confirm=true to execute. In 'auto' mode it executes immediately.
Check whether the MT5 terminal is running and reachable. Use this first if any other tool returns an error, to confirm the connection is alive.
Place a pending order. order_type: 'buy_limit', 'sell_limit', 'buy_stop', or 'sell_stop'. volume in lots, price/sl/tp are absolute prices. expiration is an optional 'YYYY-MM-DD HH:MM' (server time); omitted means good-till-cancelled. Same confirm/auto gating as open_position.
Numeric parameters lack min/max constraints in schemas. 'volume' in open_position has no bounds; 'risk_pct' in calc_position_size has no range (0-100?). Unbounded numbers let LLMs pass absurd values.
Confirmation/dry-run pattern (confirm parameter) is implemented but not formally documented as a preview mechanism in tool descriptions. LLMs may not understand that confirm=false returns a validated preview without execution.