upload_file
Upload a single local file to a remote server over an existing SSH/SFTP session, with policy checks and optional overwrite, returning path, byte count, and SHA-256.
Instructions
Uploads one regular file from this computer to a remote server over SSH (SFTP), through an already-open session (see open_session). Use this instead of scp, sftp or rsync. To move a directory, tar it first. The transfer is checked against the host's access policy and may be denied (POLICY_DENIED) or pause while the user is asked to approve it. An existing remote file is never replaced unless overwrite is true (DESTINATION_EXISTS). Returns the resolved remote path, the byte count and the SHA-256 of what was sent.
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": {
"sessionId": "<sessionId>",
"localPath": "<localPath>",
"remotePath": "<remotePath>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| localPath | Yes | Absolute path of the file on this computer to upload. | |
| overwrite | No | Replace the remote file if it exists. Defaults to false. | |
| sessionId | Yes | The sessionId returned by open_session. | |
| remotePath | Yes | Path on the server: absolute, relative to the session's current directory, or starting with ~/ for the login user's home. | |
| description | No | One short sentence for the user: what this does and why. Shown in the approval window next to the exact command, which is what the user judges; it does not change what is allowed. Recommended for chained or long commands. | |
| timeoutSeconds | No | How long the transfer may take before it is aborted and any partial file removed. Defaults to 300; clamped to a maximum of 600. |