logs/journal-control
Read and filter systemd journal entries by unit, time range, or boot to inspect recent Linux service and system logs. Read-only.
Instructions
Reads the systemd journal (wraps journalctl -n LINES --no-pager). Read-only. Returns the last lines entries (default 100, the only size limit), oldest first unless reverse. Filter with unit (sshd.service), since/until in journalctl syntax (1 hour ago, yesterday, 2026-09-29 10:00), boot: true (current boot) or boot_offset (-1 = previous boot; takes precedence over boot). Without root an ordinary user sees only their own entries unless in the systemd-journal or adm group. Requires privileged: true in containerized deployments (needs a grant), since journalctl only exists on the host, never in this daemon's own image. Plain text by default; output_format: json gives one JSON object per line (journalctl -o json), not an array. For kernel messages use logs/dmesg, for logins logs/logins, for container output docker/logs, for unit state services/list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boot | No | Restrict output to the current boot (journalctl -b) | |
| unit | No | Filter by systemd unit (e.g., 'kubelet.service') | |
| lines | No | Number of entries to tail (default 100; the only size limit) | |
| since | No | journalctl time syntax, e.g. '1 hour ago', 'today', '2026-09-29 10:00' | |
| until | No | Filter logs until a specific time (e.g., 'yesterday', '12:00') | |
| reverse | No | Output newest entries first | |
| privileged | No | Run as root and join the host mount namespace - required in containerized deployments (needs a grant for this tool in mcp-sudo.yaml) | |
| boot_offset | No | Select a prior boot relative to the current one, e.g. -1 for the previous boot (implies boot) | |
| output_format | No | json returns one JSON object per line (journalctl -o json); default is plain text |