Skip to main content
Glama

ssh_disconnect

Terminate an SSH session and release its resources to free connections and prevent stale sessions. Omit the session ID to disconnect the default configured session.

Instructions

Disconnect an SSH session and release resources. If session_id is omitted, disconnects the default session.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ssh_disconnect"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idNoSession ID (optional if using pre-configured server)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and only partially meets it: 'release resources' implies teardown but doesn't say whether in-flight commands are terminated, whether the call is idempotent on an already-closed session, or what error results from an unknown session_id. For a destructive lifecycle operation this is a meaningful gap, though the default-session resolution is useful context.

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, no wasted words, with the primary action stated first and the omission behavior second. Nothing is repeated from the schema or title.

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?

For a one-optional-parameter teardown tool with no output schema and no annotations, the definition covers the action, the resource, and the default-parameter behavior. Minor remaining gaps (post-disconnect session state, error behavior) are less critical given the tool's low complexity.

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

Parameters4/5

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

Schema coverage is 100% so the schema already documents session_id, but the description adds a concrete default-resolution rule ('If session_id is omitted, disconnects the default session') that the schema's vaguer 'optional if using pre-configured server' note does not spell out. That is genuine added meaning beyond the structured field.

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 gives a specific verb and resource ('Disconnect an SSH session') plus a secondary effect ('release resources'), which is clearly distinct from siblings like ssh_connect, ssh_exec, and ssh_list_sessions. It stops short of explicitly naming an alternative, so it lands at 4 rather than 5.

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 only conditional guidance is the default-session fallback when session_id is omitted, which is usage-relevant but not a when-to-use/when-not-to-use rule. There is no mention of how this relates to ssh_exec_cancel or what to do if exec commands are still pending, leaving the agent to infer the lifecycle.

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