Skip to main content
Glama

ssh_update_server

Modify SSH server configurations in mcpHydroSSH by updating connection details like hostname, authentication method, and credentials for existing servers.

Instructions

Update an existing server config

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverIdYesServer ID to update
nameNoServer display name
hostNoServer hostname or IP
portNoSSH port (default: 22)
usernameNoSSH username
authMethodNoAuthentication method (default: "key")
privateKeyPathNoPath to private key (required for "key" auth)
passwordNoPassword (required for "password" auth)

Implementation Reference

  • Handler logic for the ssh_update_server tool.
    case 'ssh_update_server': {
      const serverId = args.serverId as string;
      const updates: Partial<ServerConfig> = {};
      if (args.name !== undefined) {updates.name = args.name;}
      if (args.host !== undefined) {updates.host = args.host;}
      if (args.port !== undefined) {updates.port = args.port;}
      if (args.username !== undefined) {updates.username = args.username;}
      if (args.authMethod !== undefined) {updates.authMethod = args.authMethod;}
      if (args.privateKeyPath !== undefined) {updates.privateKeyPath = args.privateKeyPath;}
      if (args.password !== undefined) {updates.password = args.password;}
    
      try {
        updateServer(serverId, updates);
        // Update in-memory config
        const server = config.servers.find(s => s.id === serverId);
        if (server) {
          Object.assign(server, updates);
        }
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({ success: true, message: `Server "${serverId}" updated` }, 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 and input schema for ssh_update_server.
      name: 'ssh_update_server',
      description: 'Update an existing server config',
      inputSchema: {
        type: 'object',
        properties: {
          serverId: {
            type: 'string',
            description: 'Server ID to update',
          },
          name: {
            type: 'string',
            description: 'Server display name',
          },
          host: {
            type: 'string',
            description: 'Server hostname or IP',
          },
          port: {
            type: 'number',
            description: 'SSH port (default: 22)',
          },
          username: {
            type: 'string',
            description: 'SSH username',
          },
          authMethod: {
            type: 'string',
            enum: ['agent', 'key', 'password'],
            description: 'Authentication method (default: "key")',
          },
          privateKeyPath: {
            type: 'string',
            description: 'Path to private key (required for "key" auth)',
          },
          password: {
            type: 'string',
            description: 'Password (required for "password" auth)',
          },
        },
        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 full burden. It states 'Update' implying mutation, but doesn't disclose whether omitted fields are preserved or reset, whether changes are validated immediately, idempotency guarantees, or what the operation returns. Critical gaps for a destructive-adjacent configuration operation.

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

Conciseness4/5

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

Extremely concise at five words with no redundancy. However, the brevity comes at the cost of omitting necessary context; every word earns its place, but the description needs additional sentences to be functionally complete.

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?

For an 8-parameter mutation tool with partial update semantics, conditional required fields (privateKeyPath vs password based on authMethod), and no output schema, the description is insufficient. It fails to explain the partial update behavior, field interdependencies, or operation side effects necessary for correct invocation.

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?

Schema description coverage is 100%, with all 8 parameters (serverId, name, host, port, username, authMethod, privateKeyPath, password) adequately documented in the schema itself. The description adds no parameter-specific guidance beyond the generic 'server config' reference, warranting the baseline score.

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

Purpose2/5

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

The description states the basic action ('Update') and target ('server config'), but 'config' is ambiguous (SSH connection settings vs remote server configuration). It fails to distinguish from sibling 'ssh_view_config' (read vs write) or clarify that this modifies stored connection parameters (host, port, auth) rather than remote server files.

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

Usage Guidelines2/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 vs 'ssh_add_server' (create new) or prerequisites like obtaining serverId from 'ssh_list_servers'. The schema implies partial updates are supported (only serverId required), but the description doesn't confirm this critical usage pattern.

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