read_log_file
Retrieve recent entries from system log files on local or remote Linux servers to monitor events and diagnose issues.
Instructions
Read a specific log file (whitelist-controlled via LINUX_MCP_ALLOWED_LOG_PATHS).
Args:
log_path: Path to the log file
lines: Number of lines to retrieve from the end (default: 100)
host: Remote host to connect to via SSH (optional, executes locally if not provided)
username: SSH username for remote host (required if host is provided)
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>"
},
"name": "read_log_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log_path | Yes | ||
| lines | No | ||
| host | No | ||
| username | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |