Read log file
read_log_fileRetrieve log file contents from local or remote Linux hosts for troubleshooting. Specify first or last lines to target relevant entries.
Instructions
Read a specific log file.
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": {
"log_path": "<log_path>",
"host": "<host>"
},
"name": "read_log_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | System to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH | |
| log_path | Yes | Absolute path to the log file (must be in allowed list) | |
| last_lines | No | Number of last lines to retrieve from the log file. Default: 100. Mutually exclusive with first_lines. | |
| first_lines | No | Number of first lines to retrieve from the log file. Mutually exclusive with last_lines. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| unit | No | ||
| entries | Yes | ||
| lines_count | No |