tail_logs
Reads the last lines of a large log file without scanning the full file, with optional pattern filtering and a short follow window to capture newly appended entries.
Instructions
The last lines physical lines (max 1000), read from the end of the file without scanning the
rest. If the newest file is short, earlier rotated files are used. Optional pattern filter
(scans at most 64 MiB backwards). follow_seconds (max 60) then waits and returns lines appended
during that window.
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": "tail_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| lines | No | ||
| regex | No | ||
| pattern | No | ||
| ignore_case | No | ||
| follow_seconds | No | ||
| include_rotated | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |