Skip to main content
Glama

get_available_connections

Retrieve a list of SSH-capable machines recognized by the server but not currently connected, enabling users to identify potential remote systems for secure execution of shell commands.

Instructions

List every SSH-capable machine this server knows about (but is NOT yet connected).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'get_available_connections' tool. Returns a JSON string containing the list of available machines, mapping to {machine_id, label, os, source}.
    if (name === "get_available_connections") { return { content: [ { type: "text", text: JSON.stringify( availableMachines.map(({ machine_id, label , os , source }) => ({ machine_id, label , os , source })), null, 2 ), }, ], }; }
  • src/index.ts:142-147 (registration)
    Registration of the 'get_available_connections' tool in the ListTools response, including its name, description, and input schema (empty object).
    { name: "get_available_connections", description: "List every SSH-capable machine this server knows about (but is NOT yet connected).", inputSchema: { type: "object", properties: {}, additionalProperties: false }, },
  • Helper code that initializes and loads the availableMachines array from a JSON file specified by MACHINES_PATH environment variable, which is used by the tool handler.
    const machinesPath = process.env.MACHINES_PATH ; console.log(`Loading machines from: ${machinesPath}`); const availableMachines = [ ]; // read machines from file if MACHINES_PATH is set if (machinesPath) { try { const machinesData = readFileSync(machinesPath, "utf8"); const machinesFromFile = JSON.parse(machinesData); availableMachines.push(...machinesFromFile); } catch (err) { console.error(`Failed to read machines from ${machinesPath}:`, err); } }

Other Tools

Related 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