Skip to main content
Glama
ssh-sftp-mcp

ssh-sftp-mcp

by endjoker

sftp_upload_start

Destructive

Starts a background SFTP upload of a local file with atomic publish and overwrite protection by default, returning a transfer ID to poll progress and final status.

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. Returns a transferId immediately; query progress and the final result with sftp_transfer_status.

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_start"
  }
}

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
errorNo
phaseYes
stateYes
resultNo
endedAtYes
directionYes
startedAtYes
totalBytesYes
transferIdYes
targetStateYes
tempCleanedYes
connectionIdYes
bytesVerifiedYes
bytesTransferredYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description earns real credit by explaining the mechanism behind that risk: atomic publish via remote hardlink, refusal to overwrite by default, and the specific hazard that the non-atomic mode can leave a partial file on failure or cancel. It does not address permissions/auth requirements beyond the vague "readable by the server account," and says nothing about the openWorldHint caveat of remote host variability.

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?

Four tight sentences, front-loaded with the core action and safety model, then the opt-in degradation, then the follow-up call. Dense but every clause carries information; no filler or restated name.

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 tool is moderately complex (8 params, mutation with partial-write risk) and the description covers atomicity, overwrite policy, failure modes, and the async handoff, while an output schema already documents return values. The remaining gap is parameter-level coverage for the path/sha256/verification options, which is real but secondary.

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?

With only 50% schema coverage, the description partially compensates: it defines the behavior of allowNonAtomicNoOverwrite and the default of overwrite, which are the two riskiest flags. However, connectionId, remotePath, localPath, and the interplay between expectedSha256 and verifyAfterWrite (single-pass vs read-back verification) get no explanation in either the description or the schema, leaving a meaningful gap.

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

Purpose4/5

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

The description opens with a specific verb+resource ("Uploads a local file") and immediately characterizes the transfer model: atomic hardlink publish plus an immediate transferId return, which implicitly separates it from a blocking upload. It never names the sibling sftp_upload to contrast the two, so the agent must infer the async-vs-sync distinction from the return-value sentence rather than being told directly.

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?

It states the default behavior (refuses to overwrite) and explicitly flags the escape hatch (allowNonAtomicNoOverwrite=true) with its trade-off, plus directs progress polling to sftp_transfer_status. What's missing is guidance on when to pick this over the plain sftp_upload sibling, and no mention of when overwrite=true is appropriate.

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