sftp_upload_start
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
| 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 |
|---|---|---|---|
| error | No | ||
| phase | Yes | ||
| state | Yes | ||
| result | No | ||
| endedAt | Yes | ||
| direction | Yes | ||
| startedAt | Yes | ||
| totalBytes | Yes | ||
| transferId | Yes | ||
| targetState | Yes | ||
| tempCleaned | Yes | ||
| connectionId | Yes | ||
| bytesVerified | Yes | ||
| bytesTransferred | Yes |