sftp_write_file
Write text or binary files directly to a remote host over SFTP, avoiding shell escaping and size limits for large or multi-line content.
Instructions
Write a file to a remote host via SFTP (stream-based, no shell). Use this for large or multi-line files where shell heredoc/echo would break on escaping or size limits. For text pass plain content; for binary set encoding to 'base64'.
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>",
"content": "<content>"
},
"name": "sftp_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | File content | |
| encoding | No | Content encoding: 'utf8' (default) or 'base64' for binary | |
| remotePath | Yes | Absolute remote file path | |
| connectionId | Yes | SSH connection ID |