Skip to main content
Glama
liang04
by liang04

upload_file

Upload files from local systems to remote servers using SFTP protocol. Specify local and remote paths with optional timeout and connection settings for secure file transfers.

Instructions

使用SFTP协议上传文件到远程服务器

Args:
    local_path: 本地文件路径
               推荐使用绝对路径以避免路径解析问题
               如果使用相对路径,将基于MCP服务器的工作目录进行解析
    remote_path: 远程服务器文件路径(绝对路径)
    timeout: 传输超时时间(秒),默认60秒
    connection_name: SSH连接名称,如果不指定则使用默认连接

Returns:
    Dict包含上传结果:
    - success: 是否成功上传
    - local_path: 本地文件路径(转换为绝对路径后)
    - remote_path: 远程文件路径
    - file_size: 文件大小(字节)
    - connection: 使用的连接名称
    - error: 错误信息(如果有)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
local_pathYes
remote_pathYes
timeoutNo
connection_nameNo

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

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