Skip to main content
Glama
ssh-sftp-mcp

ssh-sftp-mcp

by endjoker

sftp_upload

Destructive

Uploads a local file to a remote path over SFTP, publishing it atomically and refusing overwrite by default to prevent accidental data loss.

Instructions

Uploads a local file readable by the server account. Publishes atomically via a remote hardlink and refuses to overwrite by default. allowNonAtomicNoOverwrite=true writes the target directly with exclusive create and may leave a partial file on failure. This call waits for the transfer to finish. Use the matching *_start tool for long transfers.

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": {
      "connectionId": "<connectionId>",
      "remotePath": "<remotePath>",
      "localPath": "<localPath>"
    },
    "name": "sftp_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
localPathYes
overwriteNo
remotePathYes
connectionIdYes
expectedSha256NoVerify a known SHA-256 in a single pass
remotePathStyleNoUse windows when the remote is Windows OpenSSH; accepts a full drive path or a plain relative pathposix
verifyAfterWriteNoRead back and verify SHA-256; adds extra disk or network I/O
allowNonAtomicNoOverwriteNoOpt in to exclusive-create writes directly to the target; a failure or cancel may leave a partial file

Output Schema

NameRequiredDescriptionDefault
bytesYes
sha256Yes
verifiedYes
localPathYes
durationMsYes
remotePathYes
overwrittenYes
tempCleanedYes
atomicPublishYes
expectedSha256MatchedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: atomic publication via remote hardlink, refusal to overwrite by default, the partial-file risk of allowNonAtomicNoOverwrite, and that the call blocks until the transfer completes. This is consistent with destructiveHint=true and non-idempotent semantics and tells the agent the failure modes it must weigh.

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?

Five tight sentences, front-loaded with what the tool does and the default safety behavior, then the risky opt-in, then the blocking note and the alternative tool. No filler or repetition.

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?

An output schema exists and the description covers atomicity, overwrite policy, partial-write risk, and blocking behavior, which is what an agent needs before calling an 8-parameter mutation tool. Minor gaps remain, such as what happens to leftover hardlink artifacts or authentication expectations, but nothing critical is missing.

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

Parameters4/5

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

Schema coverage is 50%, and the description compensates for the important gaps: it clarifies that localPath must be readable by the server account, that overwrite is off by default, and the failure semantics of allowNonAtomicNoOverwrite. It adds nothing on expectedSha256, remotePathStyle, or verifyAfterWrite, but those already carry schema descriptions.

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 ("Uploads a local file") plus a key scope constraint ("readable by the server account"), and explicitly routes long transfers to the matching *_start sibling, so an agent can distinguish it from sftp_upload_start 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 Guidelines4/5

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

Gives a clear conditional alternative ("Use the matching *_start tool for long transfers") and states the default no-overwrite behavior, which implies when a caller must set overwrite. It stops short of naming when-not scenarios beyond overwrite (e.g., verification tradeoffs) but the core routing guidance is explicit.

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