detect_anomalies_tool
Analyze ROS2 logs by establishing a baseline from initial data and flagging anomalies like rate spikes, error bursts, severity escalations, and silence gaps.
Instructions
Detect anomalous patterns in a ROS2 log run. Use after load_run.
Statistically analyzes the run using the first portion as a baseline for "normal" behavior, then flags deviations: rate spikes, new error patterns, severity escalations, silence gaps, and error bursts.
Args: run_id: Run ID from list_runs or a direct path to a log file/directory. baseline_ratio: Fraction of the run (by time) to use as baseline (default 0.3 = first 30%). min_severity_score: Only return anomalies with severity_score >= this value (0.0-1.0). Default 0.0 returns all. limit: Maximum anomalies to return. Defaults to MCP_ROS2_LOGS_MAX_RESULTS (100). offset: Number of anomalies to skip (default 0). log_dir: Optional path to log directory override.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | ||
| baseline_ratio | No | ||
| min_severity_score | No | ||
| limit | No | ||
| offset | No | ||
| log_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |