Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_dmesg

Collects the remote Linux kernel log over SSH, using passwordless sudo/doas when required and an optional since filter for recent messages.

Instructions

Collects dmesg log from a remote Linux host via SSH. Reading the kernel log usually requires root: when the login user is not root, the command is run through passwordless sudo or doas (sudo -n / doas -n). Optional since limits it to recent messages: '30 min ago', '2 hours ago', 'today', 'yesterday' or 'YYYY-MM-DD HH:MM:SS'. It requires util-linux 2.37+ on the remote host; on older hosts dmesg fails with an unrecognized option error - then call without since.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "host": "<host>",
      "user": "<user>"
    },
    "name": "get_dmesg"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
sinceNo
timeoutNo
key_pathNo
passwordNo
accept_new_hostkeyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / since
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv0.1.14

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses the SSH transport, that reading the kernel ring buffer needs root and is escalated via passwordless `sudo -n`/`doas -n`, and a specific remote dependency (util-linux 2.37+) with its observable failure mode. It does not state what happens if neither sudo nor doas is available, nor how timeouts/connection failures surface.

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?

Front-loads what it collects, then authentication, then the optional `since` behavior and its version caveat in a logical order. Every sentence carries information; only the version-failure sentence edges toward over-detail for the space.

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?

An output schema exists, so return values need not be explained, and the authentication/privilege path is well covered. However, for an 8-parameter remote-execution tool with zero schema descriptions, leaving five connection/credential parameters entirely unexplained is a real gap an agent must guess around.

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 0% across 8 parameters, so the description must compensate. It covers `since` thoroughly with accepted formats ('30 min ago', 'today', 'YYYY-MM-DD HH:MM:SS') and a version caveat, and implies `host`/`user` via the SSH framing, but `port`, `timeout`, `key_path`, `password`, and `accept_new_hostkey` are undocumented anywhere. Partial compensation only.

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 ("Collects dmesg log") plus the transport ("from a remote Linux host via SSH"), and clarifies it is the kernel log, which distinguishes it in substance from sibling log tools like get_journal_errors or get_docker_logs. It stops short of naming or contrasting any sibling explicitly, so it lands at 4 rather than 5.

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

Usage Guidelines4/5

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

Gives a concrete conditional: if the remote util-linux is older than 2.37, the `since` flag errors out and the agent should "call without since." That is real usage steering. It does not say when to prefer dmesg over journalctl-style or container-log siblings, so no exclusion guidance exists.

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