Diagnose Strategy
tt_diagnose_strategy⭐ THE go-to tool for "why is my strategy in error / why didn't it trade / what happened to SID ?". ONE call that fuses everything the support team needs into a single DIAGNOSIS CARD: the deployment record (name / status / mode), the ENGINE log (which entry/exit conditions actually fired + any engine errors), and the BROKER log (orders placed, order statuses, broker name, and genuine broker-side failures like RMS / margin / token / auth rejections).
Prefer this over calling the individual log tools when the user is
asking what's WRONG — it gathers all evidence at once. The tool returns
structured card evidence + a render_spec; YOU then present the card
and add the two sections that are the real value:
• ANALYSIS — the root cause and WHICH LAYER it's at (broker vs a
strategy condition). Map the fired condition_id to the strategy's
logic; if you need the condition's definition, follow up with
tt_get_strategy. Don't invent a cause the logs don't support.
• RECOMMENDATION — the concrete fix (re-auth/add-margin at the broker,
or edit a specific condition, or 'no action — exited as designed').
Lead it with the recommended_action field — the next step, from
the triage or from a cause read from the strategy's own template
(action enum + next_step + doc link + optional next_tool,
e.g. re-run at a wider window). next_tool is a suggestion to
offer the user; it is run only when the user asks for it.
AUTH-REQUIRED and OWNERSHIP-GATED + fail-closed: the SID is reverse- looked-up against the caller's account first; not theirs (or an inconclusive lookup) ⇒ REFUSE, read nothing.
strategy_id is the deployed strategy id (SID); resolve via
tt_get_my_deployed_strategies if the user names a strategy.
window_minutes default 1440 (a full day), max 1440.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"strategy_id": "<strategy_id>"
},
"name": "tt_diagnose_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy_id | Yes | ||
| window_minutes | No | Log lookback in minutes, 1..1440 (a full day). Default 1440. A larger value is clamped to 1440 (the log cannot be read further back than a day); below the minimum is refused. |