Skip to main content
Glama
vilasone455

SSH MCP Server

by vilasone455

get_connections

List active SSH sessions to monitor remote system connections and manage ongoing operations.

Instructions

Return every STILL-OPEN SSH session in global state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler logic for the 'get_connections' tool. It serializes the global 'connections' Map into a JSON array of open connections (connection_id, machine_id, title, currentPath) and returns it as text content.
    if (name === "get_connections") {
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              Array.from(connections.values()).map(
                ({ connection_id, machine_id, title, currentPath }) => ({
                  connection_id,
                  machine_id,
                  title,
                  currentPath,
                })
              ),
              null,
              2
            ),
          },
        ],
      };
    }
  • src/index.ts:163-166 (registration)
    Registration of the 'get_connections' tool in the ListTools handler response, including its name, description, and input schema (no parameters required).
      name: "get_connections",
      description: "Return every STILL-OPEN SSH session in global state.",
      inputSchema: { type: "object", properties: {}, additionalProperties: false },
    },
  • Input schema for the 'get_connections' tool: an empty object (no input parameters).
    inputSchema: { type: "object", properties: {}, additionalProperties: false },
  • Global Map storing all active SSH connections, which is read by the get_connections handler.
    /**
     * Map<connection_id, { client, machine_id, title, currentPath }>
     */
    const connections = new Map();
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns data (not modifies) and specifies the scope ('global state'), but lacks details on permissions, rate limits, response format, or error handling. For a read operation with zero annotation coverage, this is a minimal but adequate disclosure.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the key information ('Return every STILL-OPEN SSH session') with no wasted words. It's appropriately sized for a simple tool with no parameters.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is complete enough for basic understanding but lacks output details (e.g., format, structure) and behavioral context like error cases. It meets minimum viability but has clear gaps in a no-annotation scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter details beyond the schema, but since there are no parameters, a baseline of 4 is appropriate as it doesn't need to compensate for any gaps.

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 specific action ('Return') and resource ('every STILL-OPEN SSH session in global state'), with the 'STILL-OPEN' qualifier distinguishing it from sibling tools like 'get_available_connections' which might return different connection states. It precisely communicates what the tool does without being tautological.

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

Usage Guidelines3/5

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

The description implies usage context through the 'STILL-OPEN' qualifier, suggesting this tool is for monitoring active sessions rather than historical or all connections. However, it doesn't explicitly state when to use this versus alternatives like 'get_available_connections' or provide clear exclusions, leaving some ambiguity about sibling tool differentiation.

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/vilasone455/ssh-mcp-server'

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