Skip to main content
Glama

sftp-upload-file

Destructive

Upload local binary or large files to a remote host over SFTP while streaming contents outside model context. The local file must reside in the configured transferRoot; otherwise the tool refuses.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "localPath": "<localPath>",
      "remotePath": "<remotePath>"
    },
    "name": "sftp-upload-file"
  }
}

Input 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.31.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. 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."
  3. Addedv2.9.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds real context beyond the single destructiveHint annotation: the file is streamed without passing contents through model context, and the tool refuses outright when transferRoot is not configured. It does not spell out that overwrite=true discards an existing remote file, relying on the annotation and schema for that risk, so it stops short of full disclosure.

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 sentences, front-loaded with the action, then the hard precondition, then the sibling routing. No filler or repeated schema content.

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 destructive write tool with no output schema, the description covers the precondition, failure mode, streaming behavior and the alternative tool. Minor gap: it never confirms what a successful upload returns or how overwrite interacts with an existing destination beyond the schema's default hint.

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 localPath, remotePath, mode, profile and overwrite are already well documented, including the transferRoot constraint on localPath and the mode default. The description adds no parameter-level meaning beyond what the schema states, which is the baseline case.

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?

States a specific verb and resource ('Upload a local file to the remote host over SFTP') and immediately names the sibling it differs from ('use sftp-upload for short text you already have'), so an agent can distinguish the two without opening either schema.

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?

Gives an explicit when-to-use rule ('binary or large files') and an explicit alternative with its own condition ('sftp-upload for short text you already have'), plus the prerequisite that the local file must be inside the configured transferRoot.

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