Skip to main content
Glama

sftp-upload-file

Destructive

Upload a local file to a remote host over SFTP, streaming binary or large files without passing content through model context. Requires the file inside the configured transferRoot.

Instructions

Upload a local file to the remote host over SFTP, streaming it without passing the contents through model context. The local file must be inside the transferRoot directory the operator configured; without that setting this tool refuses. Use this for binary or large files; use sftp-upload for short text you already have.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoRemote file mode, 1 to 511 (0o777); setuid, setgid and the sticky bit are refused. e.g. 420 for 0644. Omit for 0600 on a new file, or the replaced file’s permission bits.
profileNoProfile name
localPathYesLocal file to upload, inside defaults.transferRoot
overwriteNoReplace an existing remote file (default false)
remotePathYesRemote destination path. No leading or trailing whitespace, and no control, bidirectional or zero-width characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.11.0
    • changedInput schema / properties / remotePath / description
      Previous value: -"Remote destination path"New value: +"Remote destination path. No leading or trailing whitespace, and no control, bidirectional or zero-width characters."
  2. Addedv2.9.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, so the description does not need to re-state that this is potentially destructive. It adds helpful behavioral context: streaming behavior, the transferRoot prerequisite, and refusal behavior. However, it does not describe what happens on overwrite or failure beyond what the parameter schema already implies.

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?

Three short sentences with no filler. The core action and key behavior are front-loaded, followed by a prerequisite and explicit sibling routing. Every sentence earns its place.

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?

The description, combined with a fully documented schema and the destructive annotation, gives an agent enough to select and invoke the tool correctly. It lacks explicit return-value or failure-behavior details, but for an upload tool the streaming, constraint, and usage guidance cover the critical decisions. A brief note on overwrite consequences would make it fully complete.

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

Parameters3/5

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

Schema description coverage is 100%, so the structured parameter docs already carry the semantic load. The description's transferRoot mention is useful but also appears in the localPath schema. It does not add meaningful parameter information beyond what is already available.

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 names a specific verb and resource ('Upload a local file to the remote host over SFTP') and adds a defining behavior: streaming without passing contents through model context. It also explicitly distinguishes this tool from sftp-upload, so an agent can tell them apart without opening schemas.

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?

The description gives clear when-to-use guidance ('Use this for binary or large files') and names the alternative ('use sftp-upload for short text you already have'). It also states a hard prerequisite: the local file must be inside transferRoot or the tool refuses.

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