Skip to main content
Glama
delorenj

Super Windows CLI MCP Server

ssh_disconnect

Terminate SSH connections to remote servers when they are no longer required, helping manage system resources and security.

Instructions

Disconnect from an SSH server

Example usage:

{
  "connectionId": "raspberry-pi"
}

Use this to cleanly close SSH connections when they're no longer needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionIdYesID of the SSH connection to disconnect

Implementation Reference

  • Handler for the 'ssh_disconnect' tool. Validates SSH is enabled, parses the connectionId argument, calls SSHConnectionPool.closeConnection, and returns a success message.
    case "ssh_disconnect": {
      if (!this.config.ssh.enabled) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          "SSH support is disabled in configuration"
        );
      }
    
      const args = z.object({
        connectionId: z.string()
      }).parse(request.params.arguments);
    
      await this.sshPool.closeConnection(args.connectionId);
      return {
        content: [{
          type: "text",
          text: `Disconnected from ${args.connectionId}`
        }]
      };
    }
  • src/index.ts:252-275 (registration)
    Registration of the 'ssh_disconnect' tool in the listTools response, including name, description, and input schema.
            {
              name: "ssh_disconnect",
              description: `Disconnect from an SSH server
    
    Example usage:
    \`\`\`json
    {
      "connectionId": "raspberry-pi"
    }
    \`\`\`
    
    Use this to cleanly close SSH connections when they're no longer needed.`,
              inputSchema: {
                type: "object",
                properties: {
                  connectionId: {
                    type: "string",
                    description: "ID of the SSH connection to disconnect",
                    enum: Object.keys(this.config.ssh.connections)
                  }
                },
                required: ["connectionId"]
              }
            }
  • SSHConnectionPool.closeConnection method: retrieves the connection by ID, calls disconnect() on it, and removes it from the pool.
    async closeConnection(connectionId: string): Promise<void> {
      const connection = this.connections.get(connectionId);
      if (connection) {
        connection.disconnect();
        this.connections.delete(connectionId);
      }
    }
  • SSHConnection.disconnect method: clears reconnect timer and ends the SSH client connection if connected.
    disconnect(): void {
      if (this.reconnectTimer) {
        clearTimeout(this.reconnectTimer);
        this.reconnectTimer = null;
      }
      
      if (this.isConnected) {
        this.client.end();
        this.isConnected = false;
      }
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is for 'cleanly close SSH connections' which implies a safe, controlled termination. However, it doesn't mention potential side effects (e.g., whether active commands are interrupted), authentication requirements, or error conditions.

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?

The description is perfectly structured and concise: a clear purpose statement, a helpful example, and a usage guideline - all in three sentences with zero wasted words. The example is appropriately formatted and directly relevant.

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 single-parameter tool with no output schema and no annotations, the description provides adequate context about what the tool does and when to use it. The main gap is the lack of information about what happens after disconnection or potential error scenarios, but given the tool's simplicity, this is reasonably complete.

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?

The schema has 100% description coverage, so the parameter is well-documented in the structured data. The description doesn't add significant semantic information beyond what's in the schema, but the example usage provides helpful context for how the parameter should be used ('raspberry-pi' as an example value).

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 clearly states the tool's purpose with a specific verb ('Disconnect') and resource ('SSH server'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'ssh_execute' or mention that this is specifically for closing connections rather than executing commands.

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?

The description provides clear context about when to use the tool ('when they're no longer needed') and includes an example usage. However, it doesn't explicitly mention alternatives or when NOT to use it (e.g., vs keeping connections open for reuse).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/delorenj/super-win-cli-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server