Skip to main content
Glama

ssh_remove_server

Remove a server configuration from the SSH management system to declutter your server list and maintain organized connections.

Instructions

Remove a server from config

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverIdYesServer ID to remove

Implementation Reference

  • The handler for 'ssh_remove_server' tool. It disconnects active connections, removes the server from the configuration file, and updates the in-memory configuration state.
    case 'ssh_remove_server': {
      const serverId = args.serverId as string;
      try {
        // Disconnect active connections first
        sshManager.disconnectByServerId(serverId);
    
        removeServer(serverId);
        // Update in-memory config
        const index = config.servers.findIndex(s => s.id === serverId);
        if (index !== -1) {
          config.servers.splice(index, 1);
        }
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ success: true, message: `Server "${serverId}" removed` }, null, 2),
            },
          ],
        };
      } catch (err: unknown) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ error: err instanceof Error ? err.message : String(err) }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Tool definition for 'ssh_remove_server', specifying input schema requirements.
      name: 'ssh_remove_server',
      description: 'Remove a server from config',
      inputSchema: {
        type: 'object',
        properties: {
          serverId: {
            type: 'string',
            description: 'Server ID to remove',
          },
        },
        required: ['serverId'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden. While 'remove' implies deletion, the description fails to clarify if this is permanent, whether active connections are affected, or if the operation can be undone. For a destructive config operation, this is insufficient disclosure.

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

Conciseness2/5

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

At four words, the description is undersized rather than appropriately concise. It front-loads nothing beyond the bare action statement, wasting no words but also failing to earn its place with sufficient actionable information for a destructive tool.

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

Completeness2/5

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

Given the lack of annotations and output schema, and considering this is a destructive operation, the description should disclose behavioral traits like permanence and side effects. With only one parameter, complexity is low, but the safety-critical nature of config deletion demands more context than provided.

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?

The input schema has 100% description coverage ('Server ID to remove'), so the schema fully documents the parameter. The description adds no additional semantic context about the parameter format or valid server ID sources, meeting the baseline for high-coverage schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the basic action (remove) and target (server from config), preventing confusion with physical server deletion. However, it lacks the specificity of which config or what constitutes a 'server' in this context, falling short of clearly distinguishing this as SSH config management.

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

Usage Guidelines1/5

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

No guidance provided on when to use this versus siblings like ssh_disconnect (which terminates sessions but preserves config) or ssh_update_server (which modifies existing entries). No prerequisites mentioned, such as whether the server must be disconnected first.

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/hydroCoderClaud/mcpHydroSSH'

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