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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:372-392 (handler)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 }, },
- src/index.ts:165-165 (schema)Input schema for the 'get_connections' tool: an empty object (no input parameters).inputSchema: { type: "object", properties: {}, additionalProperties: false },
- src/index.ts:66-69 (helper)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();