validate_strategy
Validate a strategy document structure, indicators, and condition tree before running a backtest. Returns valid status, warmup bars, or detailed errors to fix.
Instructions
Validate a strategy document without running a backtest.
A cheap quota separate from backtest runs, so validate freely and ALWAYS before run_backtest.
Args: strategy: The strategy document — name, indicators[], and condition_tree (see get_strategy_schema for the exact shape). injected_indicators: Names of custom time-series columns the caller will supply via data_inputs at run time, so conditions referencing them validate.
Returns: On success: {"valid": true, "warmup_bars": ..., referenced indicators/columns}. On failure: {"valid": false, "errors": [...]} where each error carries a machine code, the location in the document, a message, and context (e.g. the list of valid column names). A failed validation is a NORMAL result, not an error — read the errors, fix the document, and validate again before running.
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": "<strategy>"
},
"name": "validate_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy | Yes | ||
| injected_indicators | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||