Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by YawLabs

ssh_diagnose

Read-only

Diagnose SSH connectivity failures by checking agent status, loaded keys, known_hosts, SSH config, and running a test connection to identify and fix access problems.

Instructions

Diagnose SSH connectivity issues. Checks ssh-agent status, loaded keys, known_hosts, SSH config, and attempts a test connection. Use this BEFORE attempting SSH operations if you suspect connectivity issues, or AFTER a failed SSH operation to understand why it failed.

Input Schema

NameRequiredDescriptionDefault
hostYesSSH hostname or IP address
portNoSSH port (default: 22)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.9.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  2. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=true; the description is consistent with that, disclosing that it opens a live connection ("attempts a test connection") and enumerates every probe it runs, which is real value beyond the annotations. It does not say whether the tool always returns diagnostics rather than erroring on a failed connection, nor whether it has notable latency from the network probe.

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 sentences: the first names the purpose, the second enumerates what is checked, the third gives the when-to-use conditions. The intent is front-loaded and no sentence is wasted.

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

Completeness4/5

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

With only two parameters, one required, and a clear enumeration of probes, the description is sufficient to call it correctly. The one gap is that no output schema exists, so the agent is not told the shape of the diagnostics (per-check pass/fail vs. free-form) nor what is returned when the test connection fails.

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% and both parameters (host, port) are documented with defaults in the schema, so the schema carries the burden. The description adds no host/port semantics such as whether to pass a hostname from config or whether the port affects all checks, so baseline 3 applies.

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 ("Diagnose SSH connectivity issues") and enumerates the concrete checks performed (agent status, keys, known_hosts, config, test connection), so an agent knows exactly what it does. It does not, however, distinguish itself from overlapping siblings such as ssh_test, ssh_agent_ensure, ssh_config_lookup, or ssh_known_hosts_fix, which cover a subset of the same ground.

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?

Explicitly gives both timing conditions: use BEFORE SSH operations when connectivity is suspect, or AFTER a failure to diagnose. That is a clear, actionable trigger. It stops short of naming alternatives (e.g. "use ssh_test for a single quick reachability check; use ssh_agent_ensure if you only need the agent running").

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