Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_service_logs_from_journalctl

Retrieve recent journald logs for a specific systemd service over SSH, optionally within a time window, to diagnose service failures.

Instructions

Gets recent journald logs for a specific systemd service. Optional since limits them to a time window: '30 min ago', '2 hours ago', 'today', 'yesterday' or 'YYYY-MM-DD HH:MM:SS' (the last lines entries within it are returned).

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": {
      "service": "<service>",
      "host": "<host>",
      "user": "<user>"
    },
    "name": "get_service_logs_from_journalctl"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
linesNo
sinceNo
serviceYes
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

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. It never discloses that the tool connects to a remote host over SSH (host/port/user/password/key_path/timeout/accept_new_hostkey), nor what accept_new_hostkey implies security-wise. Only the log-retrieval behavior (time window plus last `lines` entries) is described.

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?

Two compact sentences with the core purpose front-loaded and the `since` formats given inline. Nothing is redundant, though the space is spent on one optional parameter rather than the connection parameters.

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 log-window semantics are covered well. However, for a 10-parameter tool that performs remote authenticated execution with no annotations, leaving authentication and host-key handling undocumented is a substantial completeness gap.

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 10 parameters, so the description must compensate, and it only meaningfully covers `since` (with accepted formats and examples) and `lines`. The seven connection-related parameters, including the security-relevant accept_new_hostkey flag, are left entirely unexplained.

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: 'Gets recent journald logs for a specific systemd service.' That distinguishes it from container/runtime log tools in the sibling list, though it does not explicitly contrast with get_journal_errors, the closest journald sibling.

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?

The only guidance is about the optional `since` window, which is parameter usage rather than tool-selection guidance. There is no statement of when to use this over get_journal_errors, get_dmesg, or the docker/kubectl log tools, and no prerequisites or exclusions.

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