Search local logs
search_local_logsSearch local log files for regular-expression patterns within allowed log directories to find matching lines, errors, and exceptions.
Instructions
Search local log files for a regular-expression pattern. Searches only within TOOLBOX_LOG_DIRS, or the server's current working directory when that variable is unset. Very long lines are skipped, and truncated indicates when a safety or result limit stopped the search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Files or directories to search, using absolute paths or paths relative to an allowed log root. | |
| pattern | No | JavaScript regular expression applied to each line; risky patterns are rejected. | error|fatal|exception|panic |
| maxResults | No | Maximum number of matching lines to return. | |
| caseSensitive | No | Whether the regular expression is case-sensitive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| pattern | Yes | ||
| warnings | Yes | ||
| truncated | Yes | Whether a result limit stopped the search before all possible results were read. | |
| scannedFiles | Yes | ||
| returnedMatchCount | Yes | ||
| skippedOversizedLines | Yes | Number of lines skipped because they exceeded the safe processing limit. |