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
| Name | Required | Description | Default |
|---|---|---|---|
| serverId | Yes | Server ID to remove |
Implementation Reference
- src/index.ts:463-494 (handler)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, }; } } - src/index.ts:193-205 (schema)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'], }, },