query_logs_tool
Search and filter merged ROS2 log timeline by severity, node, time range, or text. Include surrounding context from all nodes for cascade analysis.
Instructions
Search and filter the merged ROS2 log timeline. Use after load_run.
Flexible query tool for finding specific log entries across all nodes. Supports filtering by severity, node, time range, and text content. The context parameter enables cross-node cascade analysis by including surrounding messages from ALL nodes around each match.
Args: run_id: Run ID from list_runs or a direct path to a log file/directory. severity: Filter by severity level(s). Comma-separated: "ERROR", "WARN,ERROR,FATAL". Case-insensitive. nodes: Filter by node name(s). Comma-separated: "sensor_driver", "planner,controller". time_start: Start time filter. ISO format ("2024-04-14T14:02:31"), epoch ("1713103351.0"), or relative ("-30s" = 30s before run end, "+10s" = 10s after run start). time_end: End time filter. Same format as time_start. text: Search message content. Plain substring by default. Interpreted as regex if it contains special characters (*, +, ?, [, etc). limit: Maximum entries to return (default 50). Total match count is always reported even if truncated. offset: Number of entries to skip (default 0). context: Include N messages before and after each match across ALL nodes. Enables cascade analysis (e.g., context=5 shows what happened on other nodes around each error). Overlapping context windows are merged. log_dir: Optional path to log directory override.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | ||
| severity | No | ||
| nodes | No | ||
| time_start | No | ||
| time_end | No | ||
| text | No | ||
| limit | No | ||
| offset | No | ||
| context | No | ||
| log_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |