Skip to main content
Glama
safe-ssh-mcp

safe-ssh-mcp

by Areso

get_hostname

Retrieves the hostname a remote Linux host reports over SSH, including its FQDN when the host can resolve it.

Instructions

Collects the hostname of a remote Linux host via SSH, as the host itself reports it. Output: "hostname: " (the kernel hostname, uname -n), then "fqdn: " (hostname -f) when the host can resolve its fully qualified name; that line is absent otherwise.

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

Input Schema

NameRequiredDescriptionDefault
hostYes
portNo
userYes
timeoutNo
key_pathNo
passwordNo
accept_new_hostkeyNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does disclose the transport (SSH) and the conditional behavior of the fqdn line being absent when resolution fails, which is genuinely useful. However, it says nothing about authentication requirements (key_path vs password, accept_new_hostkey), timeout semantics, or failure modes for an SSH-based tool.

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-loaded with the core action, then the output format, with no filler sentences. Slight redundancy in restating the return format that an output schema already covers, but the structure is clean.

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?

Output behavior is well covered (and an output schema exists), but for a 7-parameter SSH tool with no annotations and no schema descriptions, the complete silence on connection and credential parameters leaves an agent unable to call it correctly without guessing.

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?

Seven parameters with 0% schema description coverage, so the description must compensate and largely does not. 'Via SSH' and 'remote Linux host' weakly imply host/port/credential parameters, but nothing explains timeout, key_path, password, or the security-relevant accept_new_hostkey flag.

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 the hostname of a remote Linux host via SSH, and clarifies it is the host's own view (uname -n). That scope wording ('as the host itself reports it') meaningfully separates it from a DNS-resolution tool, but no sibling is named explicitly.

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 description never says when to use this versus alternatives such as the DNS-lookup or IP-address tools, nor any preconditions or exclusions. Usage must be inferred purely from the phrase 'hostname of a remote Linux host'.

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