Skip to main content
Glama

get_journal_logs

Reads systemd journal entries, allowing filtering by unit, priority, and time range, and returns structured log data with timestamp, message, and PID.

Instructions

Reads systemd journal entries with optional filtering by unit, priority, and time range (since/until). Set user=true for the user journal. Read-only via journalctl. Fatal only if journalctl fails or an invalid unit is given. Returns structured entries with timestamp, message, priority, unit, and PID. For kernel-only events use get_audit_logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNooptional systemd unit name (e.g. 'nginx.service')
userNoquery user-level journal (default: false)
linesNonumber of recent lines (default: 50)
sinceNooptional start time (e.g. '1 hour ago', '2024-07-03')
untilNooptional end time
priorityNooptional log priority: emerg,alert,crit,err,warning,notice,info,debug

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
entriesYes
Behavior4/5

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

With no annotations, the description discloses that the tool is read-only via journalctl, notes failure conditions (journalctl failure or invalid unit), and describes the return structure. This goes beyond the schema, though it doesn't mention potential permissions or large output constraints.

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

Conciseness5/5

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

The description is concise and front-loaded, with each sentence covering a distinct aspect: purpose, filters, user flag, safety/failure, return format, and alternative. There is no redundancy or filler.

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 read-only tool with six optional parameters and an output schema, the description effectively covers all necessary context: what it does, when to use it vs. alternatives, failure behavior, and return content. It is sufficiently complete for an agent to select and invoke it correctly.

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?

The input schema already provides full descriptions for all parameters (100% coverage). The description adds a usage note for the 'user' parameter and summarizes filtering options, but this is supplementary rather than essential since the schema covers parameter meanings.

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?

The description clearly states the tool reads systemd journal entries, with specific verbs and resource identification. It also distinguishes itself from a sibling tool by noting 'For kernel-only events use get_audit_logs'.

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?

It explicitly provides usage guidance, including when to use the alternative tool for kernel-only events. The instruction 'Set user=true for the user journal' gives concrete invocation context, clarifying a key parameter.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mohabdo21/linux-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server