Skip to main content
Glama

ssh_get_status

Check the status of SSH connections. Specify a connection ID to view its state or omit to list all active connections from the remote server management system.

Instructions

Get SSH connection status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionIdNoConnection ID (optional, shows all connections if not provided)

Implementation Reference

  • The ConnectionStatus interface defines the shape of the status object returned by ssh_get_status, containing connectionId, serverId, status, connectedAt, lastActivity, and isBusy.
    export interface ConnectionStatus {
      connectionId: string;
      serverId: string;
      status: 'connected' | 'disconnected';
      connectedAt?: string;
      lastActivity?: string;
      isBusy: boolean;
    }
  • src/index.ts:106-119 (registration)
    Tool registration for ssh_get_status in the ListToolsRequestSchema handler, defining its name, description, and inputSchema (accepts optional connectionId).
    {
      name: 'ssh_get_status',
      description: 'Get SSH connection status',
      inputSchema: {
        type: 'object',
        properties: {
          connectionId: {
            type: 'string',
            description: 'Connection ID (optional, shows all connections if not provided)',
          },
        },
        required: [],
      },
    },
  • The tool handler for ssh_get_status in the CallToolRequestSchema switch statement. If connectionId provided, calls sshManager.getStatus(); otherwise calls sshManager.getAllStatuses() and returns results as JSON.
    case 'ssh_get_status': {
      const connectionId = args.connectionId as string | undefined;
      if (connectionId) {
        const status = sshManager.getStatus(connectionId);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(status, null, 2),
            },
          ],
        };
      } else {
        const statuses = sshManager.getAllStatuses();
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(statuses, null, 2),
            },
          ],
        };
      }
    }
  • SSHManager.getStatus() - returns status for a specific connection (by ID or last used). Returns ConnectionStatus object or null if not found.
    getStatus(connectionId?: string): ConnectionStatus | null {
      const conn = this.getConnection(connectionId, false);
      if (!conn) {return null;}
    
      return {
        connectionId: conn.id,
        serverId: conn.serverId,
        status: 'connected',
        connectedAt: conn.connectedAt.toISOString(),
        lastActivity: conn.lastActivity.toISOString(),
        isBusy: conn.isBusy,
      };
    }
  • SSHManager.getAllStatuses() - returns an array of ConnectionStatus for all active connections.
    getAllStatuses(): ConnectionStatus[] {
      return Array.from(this.connections.values()).map(conn => ({
        connectionId: conn.id,
        serverId: conn.serverId,
        status: 'connected',
        connectedAt: conn.connectedAt.toISOString(),
        lastActivity: conn.lastActivity.toISOString(),
        isBusy: conn.isBusy,
      }));
    }
Behavior2/5

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

No annotations are provided, so the description must cover behavioral traits. It only says 'Get SSH connection status' without detailing what status information is returned, side effects, or authentication needs. The parameter hint about showing all connections if no ID is useful but insufficient.

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?

The description is a single, front-loaded sentence with no wasted words. However, it may be overly terse at the expense of completeness.

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 tool's simplicity, the description is minimally viable but lacks details on output format or what 'status' includes. Without annotations or output schema, the description should compensate but does not.

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 schema already documents the one parameter with 100% coverage. The description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the verb 'Get' and the resource 'SSH connection status'. It effectively distinguishes from sibling tools like ssh_connect and ssh_disconnect by focusing on status retrieval.

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 on when to use this tool versus alternatives such as ssh_list_servers or ssh_connect. The description does not provide context for usage or exclusions.

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