Skip to main content
Glama

upload_file

Upload files to a remote server via SFTP using a local path relative to the transfer root. Existing regular files are overwritten; files over 100 MiB must use rsync or scp.

Instructions

Upload a file to a remote server via SFTP.

Files larger than 100 MiB are refused outright — use rsync or scp for those.

Args: server: Server name (e.g. 'pro-dicentra'). local_path: Path to the local file, RELATIVE to the configured transfer_root (see [settings] in servers.toml, or the SSH_MCP_TRANSFER_ROOT environment variable). Absolute paths, .., . components and embedded NUL bytes are rejected, as is a symlink at ANY component of the path. Sub-directories are allowed (e.g. 'reports/q1.csv'), but every intermediate directory must already exist under transfer_root — upload_file does not create them. transfer_root itself must be a real directory owned by the running user with mode 0700, or every transfer fails. remote_path: Destination path on the remote server — normally absolute, though a relative path is not rejected, just resolved by the remote SFTP server against the SSH login directory. Rejected if it contains .. anywhere (even inside an otherwise legitimate filename) or matches the sensitive-path denylist (/etc/shadow, /etc/passwd, .ssh/*, .aws/credentials, .kube/config, .netrc, …). An existing REGULAR file at the destination is silently OVERWRITTEN — unlike download_file, upload does not no-clobber; an existing non-regular target (symlink, device, FIFO) is refused.

Returns: Confirmation message with file size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYes
local_pathYes
remote_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Despite no annotations, the description fully discloses side effects: silent overwrite of regular files, refusal of non-regular targets, rejection of symlinks, NUL bytes, and denylisted paths, as well as the exact return message.

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

Conciseness5/5

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

The description is well-structured with Args and Returns sections. Every sentence adds meaningful constraints or behavior details; no fluff or redundancy.

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

Completeness5/5

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

The description includes return behavior, error scenarios, and path resolution rules. Combined with the presence of an output schema (implied by 'Has output schema: true'), the agent has complete information to invoke the tool correctly.

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?

Although the input schema has no property descriptions, the tool description covers all three parameters (server, local_path, remote_path) with detailed constraints and examples, fully compensating for the schema gap.

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 tool's purpose ('Upload a file to a remote server via SFTP') and distinguishes it from siblings by contrasting overwrite behavior with download_file and recommending rsync/scp for large files.

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

Usage Guidelines5/5

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

Explicitly states when to use alternatives (files >100 MiB → rsync/scp), and details preconditions (transfer_root existing, directories must already exist) and path restrictions, leaving no ambiguity about appropriate usage.

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