Skip to main content
Glama
d3v1an
by d3v1an

ssh_download

Download files from remote servers to your local system using secure SFTP transfers. Transfer files between remote SSH servers and local machines with this SSH administration tool.

Instructions

Descarga un archivo del servidor remoto al sistema local via SFTP

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remotePathYesRuta del archivo en el servidor remoto
localPathYesRuta destino en el sistema local

Implementation Reference

  • Handler for the 'ssh_download' tool, which uses SFTP to download a file and logs the operation for history/undo.
    private async handleDownload(args: any): Promise<CallToolResult> {
      this.requireConnection();
      const { remotePath, localPath } = args as { remotePath: string; localPath: string };
    
      const sftp = await this.getSftp();
    
      return new Promise<CallToolResult>((resolve, reject) => {
        sftp.fastGet(remotePath, localPath, (err) => {
          if (err) {
            this.audit("ssh_download", `${remotePath} -> ${localPath}`, "error");
            reject(new Error(`Error descargando archivo: ${err.message}`));
          } else {
            this.audit("ssh_download", `${remotePath} -> ${localPath}`, "ok");
    
            this.recordOperation(
              "ssh_download",
              { remotePath, localPath },
              `Archivo descargado: ${remotePath} -> ${localPath}`,
              true,
              {
                type: "local_file_delete",
                description: `Eliminar archivo local descargado: ${localPath}`,
                localPath,
              }
            );
    
            resolve({
              content: [
                { type: "text", text: `Archivo descargado: ${remotePath} -> ${localPath}` },
              ],
            });
          }
        });
      });
    }
  • Schema definition for the 'ssh_download' tool.
    {
      name: "ssh_download",
      description: "Descarga un archivo del servidor remoto al sistema local via SFTP",
      inputSchema: {
        type: "object",
        properties: {
          remotePath: {
            type: "string",
            description: "Ruta del archivo en el servidor remoto",
          },
          localPath: {
            type: "string",
            description: "Ruta destino en el sistema local",
          },
        },
        required: ["remotePath", "localPath"],
      },
    },

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

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