service_logs
Fetches recent systemd journal logs for a service, with filters for time range, priority, and grep patterns to debug issues and monitor output.
Instructions
Fetch recent journal logs for a systemd service. Supports filtering by time range, priority level, and grep patterns. Useful for debugging service issues and monitoring application output.
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": "<service>"
},
"name": "service_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Filter log lines matching this pattern (passed to journalctl --grep). | |
| user | No | If true, query user-level service logs (--user). | |
| lines | No | Number of recent log lines to return (1-1000, default 50). | |
| since | No | Show logs since this time. Accepts journalctl time specs: '1h ago', '2024-01-15', 'today', etc. | |
| service | Yes | Name of the systemd service to fetch logs for. | |
| priority | No | Minimum log priority level to include. |