Skip to main content
Glama

Journal query

log_query
Read-onlyIdempotent

Query systemd journal entries by unit, priority, time window, or message text to inspect logs, returning timestamps, priorities, and messages with optional detail.

Instructions

Journal entries filtered by unit, priority, time window or message text. Returns ts, prio and msg only; detailed adds unit, pid and boot.

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": "log_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNoCase-insensitive substring of the message
unitNoOnly entries from this unit
limitNoEntries per page
sinceNoStart of the window
untilNoEnd of the window
cursorNoCursor from a previous call
detailNodetailed adds unit, pid and boot idconcise
priorityNoMaximum priority (err includes more severe)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds the return field composition (ts, prio, msg; detailed adds unit, pid, boot), which is genuinely useful given no output schema, but it says nothing about pagination, the default page size, or ordering.

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?

Two tight sentences: the filter surface first, then the return shape. Every clause carries information and nothing is padded.

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

Completeness3/5

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

For an eight-parameter query tool with no output schema, the description covers filters and return fields adequately. It omits pagination behavior around cursor/limit and result ordering, which an agent needs to page correctly even though the schema names those parameters.

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 100%, so all eight parameters are already documented, including the detail enum's meaning and the priority semantics ('err includes more severe'). The description only restates those axes and the detail behavior, adding essentially no meaning beyond 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?

Names the resource (journal entries) and the filter axes (unit, priority, time window, message text), so an agent knows exactly what it retrieves. It does not explicitly contrast with the sibling log_errors, so differentiation is only partial.

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

Usage Guidelines3/5

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

Usage is implied by the query nature and the read-only annotations, but there is no explicit statement of when to pick this over log_errors or when it is inappropriate. The agent must infer the boundary.

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