validate_rules
Preflight check trading rules for schema errors, missing portfolio assets, and feature coverage before backtests, returning a detailed error list to enable quick fixes.
Instructions
Preflight validation of stored rules: schema-checks each rule's trigger and action grammar, verifies referenced assets exist in the portfolio, and (if flow_job_id given) confirms every feature the rules reference is covered by the FLOW model's feature set. Run this before backtest_rules / forward_test_rules to surface bad rules cheaply (~200ms, free) instead of letting them silently fail mid-backtest. Returns ok=true with empty error lists if all clean; otherwise lists missing_portfolio_assets, missing_rule_features, and per-rule grammar errors so the agent can patch and retry.
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": {
"portfolio_id": "<portfolio_id>"
},
"name": "validate_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_ids | No | Specific rules to check (default: all rules in the portfolio) | |
| flow_job_id | No | FLOW generation job to feature-coverage-check against (optional) | |
| portfolio_id | Yes | Portfolio UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |