server_list
View configured server aliases and details to manage remote SSH/SFTP connections through the MCP SFTP Orchestrator interface.
Instructions
Affiche la liste de tous les alias de serveurs configurés avec leurs détails.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:81-92 (registration)Registration of the 'server_list' tool, including title, description, empty input schema, and handler function.server.registerTool( "server_list", { title: "Lister les alias de serveurs", description: "Affiche la liste de tous les alias de serveurs configurés avec leurs détails.", inputSchema: z.object({}) }, async () => { const serverList = await servers.listServers(); return { content: [{ type: "text", text: JSON.stringify(serverList, null, 2) }] }; } );
- server.js:88-91 (handler)Handler function for 'server_list' that invokes servers.listServers() and formats the result as JSON text block.async () => { const serverList = await servers.listServers(); return { content: [{ type: "text", text: JSON.stringify(serverList, null, 2) }] }; }
- server.js:83-87 (schema)Tool schema defining title, description, and empty input schema (no parameters required).{ title: "Lister les alias de serveurs", description: "Affiche la liste de tous les alias de serveurs configurés avec leurs détails.", inputSchema: z.object({}) },
- servers.js:45-47 (helper)Helper function listServers() that reads and returns the servers configuration from JSON file.async function listServers() { return await readServers(); }
- servers.js:6-15 (helper)Underlying helper readServers() that loads the servers.json file, handling missing file gracefully.async function readServers() { try { await fs.access(SERVERS_FILE_PATH); const data = await fs.readFile(SERVERS_FILE_PATH, 'utf-8'); return JSON.parse(data); } catch (error) { // Si le fichier n'existe pas, on retourne un objet vide return {}; } }