Skip to main content
Glama

Read Journal

read_journal

Query systemd journal logs by unit, priority, time, or regex to troubleshoot services and diagnose system issues.

Instructions

Query the systemd journal (journalctl).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_journal"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoregex filter (journalctl -g)
sudoNoretry with sudo on permission errors (system journal needs root or systemd-journal group)
unitNofilter by unit e.g. 'ssh.service'
userNo
linesNo
sinceNo'1 hour ago', 'today', '2024-06-01', ...
reverseNonewest first
priorityNominimum priority err|warning|info|debug...
identifierNosyslog identifier (-t)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it says nothing beyond naming the backing command. It does not disclose that this is a read-only operation, that the system journal may require root or systemd-journal group membership, or how the sudo retry behaves.

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 front-loaded sentence with zero filler, which is efficient. Its brevity is under-specification rather than verbosity, which is penalized in the other dimensions rather than here.

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

Completeness2/5

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

With 9 parameters, no annotations, and only one sentence, the definition is thin for the tool's complexity; an output schema exists so return values need not be explained. What is missing is the access/permission context and the distinction from sibling log-reading tools.

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

Parameters3/5

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

Schema description coverage is 78%, close to the threshold where the schema itself documents most parameters (grep, unit, since, priority, identifier, reverse), so the baseline is 3. The description adds no extra meaning, leaving the bare 'user' and 'lines' parameters entirely to the schema.

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

Purpose4/5

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

States a specific verb and resource ('Query the systemd journal') and anchors it to the underlying utility ('journalctl'), so the agent knows exactly what data source is being read. It offers no differentiation from sibling read tools such as read_log_file, which an agent could easily confuse with it.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over read_log_file or read_file_text, nor on prerequisites such as journal access permissions. The only hint of context lives in the schema's sudo parameter description, not the tool description.

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

Deploy Server

Other Tools