sftp_download
Downloads a remote file over SFTP to a local writable path, waiting for completion and publishing atomically while refusing overwrite by default.
Instructions
Downloads to a local path writable by the server account. Publishes atomically and refuses to overwrite by default. 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_download"
}
}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 |
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 |