Skip to main content
Glama
SSH MCP Server
by termau

add_connection

Adds or updates a named SSH connection and persists it in the config file for reuse across server restarts.

Instructions

Add or update a manual SSH connection. Persisted to config file across restarts.

Parameters:

  • name: Unique name for this connection (required)

  • host: Server hostname or IP address (required)

  • port: SSH port (default: 22)

  • username: SSH username (required)

  • privateKeyPath: Path to SSH private key (supports ~ expansion)

  • password: SSH password (if not using key auth)

Example: add_connection("staging", "10.0.0.5", 22, "deploy", "~/.ssh/deploy_key")

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": {
      "name": "<name>",
      "host": "<host>",
      "username": "<username>"
    },
    "name": "add_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesServer hostname or IP address
nameYesUnique name for this connection
portNoSSH port (default: 22)
passwordNoSSH password (if not using key auth)
usernameYesSSH username
privateKeyPathNoPath to SSH private key (supports ~ expansion)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the readOnlyHint=false annotation, it discloses that the entry is persisted to the config file across restarts and that the call acts as an upsert ('add or update'), which is genuinely useful behavioral context for a mutating tool. It omits what happens on a name collision (silent overwrite vs error) and whether connectivity is validated, which are the remaining behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded, but the parameter block restates the schema text word-for-word and consumes most of the description's length. The example earns its place; the parameter list largely does not.

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?

For a 6-parameter mutating tool with no output schema, the description never says what is returned or whether success is confirmed, nor does it explain collision/overwrite behavior. The persistence note helps, but an agent still cannot predict the result of the call.

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%, so the schema already documents every field, and the description's parameter list is essentially verbatim duplication. The only added value is the positional example showing a key-auth invocation, which marginally clarifies required vs optional fields.

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+resource combination ('Add or update a manual SSH connection') and clarifies the upsert semantics of the operation. It does not explicitly contrast with siblings like remove_connection or test_connection, but the resource is specific enough that confusion is unlikely.

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

Usage Guidelines3/5

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

The description implies when the tool applies (managing manual SSH connections) but never states when to use it versus alternatives such as test_connection or refresh_connections, nor does it warn against calling it for existing auto-discovered hosts. Usage is inferable but not guided.

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