Skip to main content
Glama

logs/dmesg

Read-onlyIdempotent

Read the kernel ring buffer with relative timestamps and human-readable output. Filter by severity levels or use privileged access if restricted.

Instructions

Reads the kernel ring buffer (wraps dmesg --human, relative timestamps). Read-only. Output is cut to the LAST 30 KiB with a [WARNING: Output truncated to last 30KB] prefix and cannot be paged; narrow it with level, a comma list of emerg, alert, crit, err, warn, notice, info, debug (err,warn). On hosts with kernel.dmesg_restrict=1 an unprivileged call fails (dmesg's error is returned); use privileged: true (needs a grant). output_format is accepted and ignored: the reply is always plain text. For older history or service logs use logs/journal-control, for login records logs/logins, for drive faults disks/health.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoComma-separated levels from emerg, alert, crit, err, warn, notice, info, debug (e.g. 'err,warn')
privilegedNoRun as root - needed when kernel.dmesg_restrict=1. Needs a grant for this tool in mcp-sudo.yaml
output_formatNoIgnored - the reply is always plain text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.1
    • changedInput schema / properties / level / description
      Previous value: -"Filter by log level (e.g., 'err,warn')"New value: +"Comma-separated levels from emerg, alert, crit, err, warn, notice, info, debug (e.g. 'err,warn')"
    • changedInput schema / properties / output_format / description
      Previous value: -"Output format"New value: +"Ignored - the reply is always plain text"
    • changedInput schema / properties / privileged / description
      Previous value: -"Run as root"New value: +"Run as root - needed when kernel.dmesg_restrict=1. Needs a grant for this tool in mcp-sudo.yaml"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, but the description adds substantial behavior: output is truncated to the last 30 KiB with a warning prefix, cannot be paged, fails under dmesg_restrict unless privileged with a grant, and output_format is accepted but ignored. These are real operational constraints not derivable from structured fields.

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?

Dense but front-loaded: purpose first, then truncation constraint, then the filtering parameter, then the failure mode, then the sibling routing. Every sentence carries distinct, actionable information with no 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?

With no output schema, the description carries the return-value burden and does so: plain text, 30 KiB truncation, non-pageable. Combined with the failure-mode and routing guidance, an agent has everything needed to call this tool 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?

Schema description coverage is 100%, so the meaning of level, privileged, and output_format is already documented in the schema, including the enum values and the 'ignored' note. The description restates the level enum and the privilege/grant requirement without adding syntax or format detail beyond the schema, so baseline 3 applies.

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 a specific verb and resource ('Reads the kernel ring buffer') and names the wrapped command, so an agent knows exactly what is returned. It also distinguishes itself from siblings by pointing to logs/journal-control, logs/logins, and disks/health for other log sources.

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?

Gives explicit routing rules: journal-control for older history/service logs, logins for login records, disks/health for drive faults. It also states when privileged is required (kernel.dmesg_restrict=1) and how to narrow output with level.

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