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
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing: protocol used (SFTP), path resolution behavior (absolute vs relative paths), default timeout (60 seconds), default connection behavior, and detailed return structure. It doesn't mention error handling beyond the error field or rate limits, but covers core behavioral aspects adequately for a file transfer operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (purpose, Args, Returns). Every sentence adds value: first states core purpose, parameter explanations provide essential context, return documentation is comprehensive. Slightly verbose in parameter explanations but all content is functional. Could be more front-loaded with key behavioral notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation tool with no annotations and no output schema, the description provides excellent coverage: clear purpose, parameter semantics, return structure, and behavioral context. Missing only minor details like authentication requirements or error scenarios beyond the error field. Given the complexity, it's nearly complete and highly usable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing rich semantic context for all 4 parameters: explains local_path path resolution rules, clarifies remote_path must be absolute, specifies timeout default and unit, describes connection_name default behavior. Each parameter gets practical usage guidance beyond basic type information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('使用SFTP协议上传文件到远程服务器' - upload file to remote server using SFTP protocol) and resource (file). It distinguishes from siblings like download_file (opposite direction) and list_directory/list_ssh_connections (different operations). The verb+resource combination is precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through parameter explanations (e.g., '如果不指定则使用默认连接' - if not specified, use default connection), but doesn't explicitly state when to use this tool versus alternatives like execute_command for remote operations. It mentions sibling tools indirectly through connection_name parameter context but lacks explicit comparison guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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