read_service_logs
Retrieve recent log lines for any service or Docker container and filter them by keyword to identify errors or denied requests.
Instructions
Safely fetch and optionally filter recent log lines for a service or Docker container.
Args: service_name: Target unit (e.g. 'nginx', 'systemd:cron', 'docker:my_container'). lines_count: Number of recent lines to retrieve (default: 50, maximum: 1000). grep_filter: Optional case-insensitive keyword to filter lines (e.g. 'ERROR', '403', 'denied').
Returns: JSON string containing the extracted log lines and matching statistics.
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": {
"service_name": "<service_name>"
},
"name": "read_service_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep_filter | No | ||
| lines_count | No | ||
| service_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |