Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by icdmkg2

ssh_disconnect

Close an active SSH connection using the connection ID returned by ssh_connect to end the remote session and release its resources.

Instructions

Disconnect and close an active SSH connection.

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": {
      "connectionId": "<connectionId>"
    },
    "name": "ssh_disconnect"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionIdYesConnection ID returned by ssh_connect

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description must carry the behavioral burden. It says the connection is closed, but does not disclose whether the operation is idempotent, what happens to any active tunnels or sessions, whether errors occur for already-closed connections, or whether permissions are required.

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?

One short sentence with no unnecessary wording; the action and target are front-loaded.

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 simple one-parameter teardown tool with full schema coverage and no output schema, the description is minimally sufficient. However, with no annotations and no mention of connection-state or tunnel side effects, it does not fully equip an agent to handle edge cases.

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 the single parameter 'connectionId' is already documented as the ID returned by ssh_connect. The description adds no additional meaning about the parameter, which is acceptable given full schema coverage.

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 states a specific verb pair ('Disconnect and close') and resource ('an active SSH connection'), so the agent can immediately tell this tears down a session. It is clearly distinct from connect/exec/list siblings, though it does not explicitly name alternatives.

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?

Usage is only implied by 'active SSH connection'; there is no explicit guidance on when to call this versus leaving a connection open, nor any note about prerequisites or exclusions. The agent must infer that this is for cleanup after ssh_connect.

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