Skip to main content
Glama

update_ssh_connection

Update an existing SSH connection on the Windows CLI MCP Server by modifying details such as host, port, username, password, or private key path for secure command-line access.

Instructions

Update an existing SSH connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionConfigNo
connectionIdNoID of the SSH connection to update

Implementation Reference

  • MCP tool handler for 'update_ssh_connection'. Parses arguments using Zod schema matching the tool's inputSchema and delegates to the updateSSHConnection helper function from sshManager.
    case 'update_ssh_connection': { const args = z.object({ connectionId: z.string(), connectionConfig: z.object({ host: z.string(), port: z.number(), username: z.string(), password: z.string().optional(), privateKeyPath: z.string().optional(), }) }).parse(request.params.arguments); updateSSHConnection(args.connectionId, args.connectionConfig); return { content: [{ type: 'text', text: 'SSH connection updated successfully.' }] }; }
  • Input schema definition for the 'update_ssh_connection' tool, registered in the ListTools response.
    { name: "update_ssh_connection", description: "Update an existing SSH connection", inputSchema: { type: "object", properties: { connectionId: { type: "string", description: "ID of the SSH connection to update" }, connectionConfig: { type: "object", properties: { host: { type: "string", description: "Host of the SSH connection" }, port: { type: "number", description: "Port of the SSH connection" }, username: { type: "string", description: "Username for the SSH connection" }, password: { type: "string", description: "Password for the SSH connection" }, privateKeyPath: { type: "string", description: "Path to the private key for the SSH connection" } }, required: ["connectionId", "connectionConfig"] } } }
  • Core helper function that implements the SSH connection update logic by modifying the loaded configuration and saving it back to the config file.
    const updateSSHConnection = (connectionId: string, connectionConfig: any): void => { const config = loadConfig(); if (config.ssh.connections[connectionId]) { config.ssh.connections[connectionId] = connectionConfig; saveConfig(config); } };
  • Export of the updateSSHConnection helper function, making it available for import in src/index.ts.
    export { createSSHConnection, readSSHConnections, updateSSHConnection, deleteSSHConnection };
  • src/index.ts:26-26 (registration)
    Import of the updateSSHConnection helper function into the main index file where MCP handlers are defined.
    import { createSSHConnection, readSSHConnections, updateSSHConnection, deleteSSHConnection } from './utils/sshManager.js';

Other Tools

Related 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/simon-ami/win-cli-mcp-server'

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