Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_last_logins

Read-only

Retrieve recent successful SSH logins and reboot events from a remote host to audit access activity and verify system restarts. Use for security checks; failed logins are handled separately.

Instructions

Recent successful logins and reboots (last). Failed ones: get_failed_logins.

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_last_logins"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
linesNo
sinceNo
timeoutNo
key_pathNo
password_envNo
accept_new_hostkeyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • removedInput schema / properties / password
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedInput schema / properties / password_env
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed1 schema field changedv0.3.3
    • changedInput schema / properties / timeout / default
      Previous value: -20New value: +60
  3. Addedv0.2.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations only declare readOnlyHint=true, which covers safety but nothing about execution. The description adds the useful scope detail that results are limited to successful entries and include reboots, yet it never mentions that this connects over SSH to a remote host with credentials, that it can time out, or that results may be truncated by a line limit. For a nine-parameter remote-execution tool that is a large undisclosed surface.

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 short sentences, the primary scope first and the sibling routing second, with no filler. Nothing is redundant and nothing could be cut without losing content.

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

Completeness2/5

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

With nine parameters, zero schema description coverage, credential/hostkey parameters, and only a readOnly annotation, the description is too thin for the tool's complexity. An agent must guess at SSH authentication requirements, default line limits, and time filtering. The existence of an output schema relieves it of explaining return values, but not of explaining inputs or connection behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across nine parameters, so the description carries the full explanatory burden and largely drops it. Terms like '(last)' and 'Recent' faintly gesture at line limits and time filtering, but host, port, user, key_path, password_env, accept_new_hostkey, timeout, lines and since are all left unexplained in both schema and description.

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?

The description names the resource concretely: recent *successful* logins plus reboot records, and the parenthetical '(last)' signals the underlying last-style output. It explicitly separates itself from the failed-login sibling, so an agent can pick correctly without opening a schema. It stops short of a full verb phrase, but the intent is unambiguous.

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?

It gives an explicit routing rule: failed logins belong to get_failed_logins, so this tool is for successes and reboots. That is real when/when-not guidance rather than implied usage. It does not say when to prefer this over a general host-overview tool, but the core alternative is named.

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