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.
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 |