Skip to main content
Glama

logs/journal-control

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
bootNoRestrict output to the current boot (journalctl -b)
unitNoFilter by systemd unit (e.g., 'kubelet.service')
linesNoNumber of entries to tail (default 100; the only size limit)
sinceNojournalctl time syntax, e.g. '1 hour ago', 'today', '2026-09-29 10:00'
untilNoFilter logs until a specific time (e.g., 'yesterday', '12:00')
reverseNoOutput newest entries first
privilegedNoRun as root and join the host mount namespace - required in containerized deployments (needs a grant for this tool in mcp-sudo.yaml)
boot_offsetNoSelect a prior boot relative to the current one, e.g. -1 for the previous boot (implies boot)
output_formatNojson returns one JSON object per line (journalctl -o json); default is plain text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.1
    • changedInput schema / properties / lines / description
      Previous value: -"Number of lines to tail (default: 100)"New value: +"Number of entries to tail (default 100; the only size limit)"
    • changedInput schema / properties / output_format / description
      Previous value: -"Desired output format (e.g. json). Defaults to text"New value: +"json returns one JSON object per line (journalctl -o json); default is plain text"
    • changedInput schema / properties / privileged / description
      Previous value: -"Run as root and join the host mount namespace - required in containerized deployments"New value: +"Run as root and join the host mount namespace - required in containerized deployments (needs a grant for this tool in mcp-sudo.yaml)"
    • changedInput schema / properties / since / description
      Previous value: -"Filter logs since a specific time (e.g., '1 hour ago', 'today')"New value: +"journalctl time syntax, e.g. '1 hour ago', 'today', '2026-09-29 10:00'"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: ordinary users see only their own entries without root or systemd-journal/adm group membership, privileged:true is needed in containers because journalctl lives only on the host, and boots are scoped with offset precedence. These are non-obvious operational constraints an agent must know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph that front-loads what the tool does before constraints and alternatives. Nearly every clause earns its place; it is long for nine parameters but not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter read tool with no output schema, the description covers defaults, output format semantics, permission/privilege prerequisites, and sibling routing. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: boot_offset 'takes precedence over boot', lines is 'the only size limit', and the JSON output is 'one JSON object per line, not an array'. The since/until syntax examples largely duplicate the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the specific verb+resource ('Reads the systemd journal') and even names the underlying command it wraps. It explicitly distinguishes itself from four siblings by use case (logs/dmesg for kernel, logs/logins for logins, docker/logs for containers, services/list for unit state).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing rules to alternatives are given for each overlapping scenario, plus when root/group membership matters and when privileged:true is required. No conditions are left for the agent to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.