tail_log
Fetch the last N lines from a remote log file on one host or many hosts concurrently. Returns output per host as a JSON map for multi-machine log inspection.
Instructions
Fetch the last N lines of a remote log file on a single host ('host') or multiple hosts concurrently ('hosts'). If using 'hosts', returns a JSON map mapping hostnames to their log output. Prefer 'hosts' to query logs across multiple machines simultaneously.
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": {
"file_path": "<file_path>"
},
"name": "tail_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | The target hostname or IP address | |
| hosts | No | A list of hostname targets to query concurrently | |
| lines | No | Number of lines to read from the end (default: 100) | |
| file_path | Yes | Absolute path to log file on remote target |