sftp_upload
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
| Name | Required | Description | Default |
|---|---|---|---|
| localPath | Yes | ||
| overwrite | No | ||
| remotePath | Yes | ||
| connectionId | Yes | ||
| expectedSha256 | No | Verify a known SHA-256 in a single pass | |
| remotePathStyle | No | Use windows when the remote is Windows OpenSSH; accepts a full drive path or a plain relative path | posix |
| verifyAfterWrite | No | Read back and verify SHA-256; adds extra disk or network I/O | |
| allowNonAtomicNoOverwrite | No | Opt in to exclusive-create writes directly to the target; a failure or cancel may leave a partial file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | ||
| sha256 | Yes | ||
| verified | Yes | ||
| localPath | Yes | ||
| durationMs | Yes | ||
| remotePath | Yes | ||
| overwritten | Yes | ||
| tempCleaned | Yes | ||
| atomicPublish | Yes | ||
| expectedSha256Matched | Yes |