Skip to main content
Glama

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();

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