search_logs
Find log events by text or regex, minimum level, and time window, returning whole stack traces and optional neighboring context so you can diagnose incidents in large logs.
Instructions
Find log events by text/regex, minimum level and time window. A stack trace is ONE event, so
a match shows the whole trace. level is a minimum (WARN, ERROR, ...). context adds that many
neighbouring events either side. Output is capped at max_matches (max 500) and always states how many
more matches exist; newest_first=true keeps the NEWEST matches instead of the oldest.
since/until: ISO ('2026-11-06T12:30:00Z', '2026-11-06 12:30') or relative to the newest log entry
('-30m', '-2h'). Naive times use tz.
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": {
"path": "<path>"
},
"name": "search_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | +00:00 | |
| path | Yes | ||
| level | No | ||
| regex | No | ||
| since | No | ||
| until | No | ||
| context | No | ||
| pattern | No | ||
| ignore_case | No | ||
| max_matches | No | ||
| newest_first | No | ||
| include_rotated | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |