Write SSH File
unfour.ssh.write_fileWrite or append UTF-8 content to a remote file over SFTP without a terminal or remote Python, using overwrite, append, or create modes.
Instructions
Writes or appends a remote file through SFTP. Content is limited to 4 MiB of UTF-8 bytes; no terminal session or remote Python is needed. Overwriting an existing file requires SFTP posix-rename@openssh.com v1; unsupported servers leave the original untouched. Failed or timed-out appends may be partial; inspect before retrying. Dev allows ordinary project paths; test and high-risk paths require confirmation; prod is blocked by policy. The returned result contains only path/mode/byte counts and command status, never file content.
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>",
"path": "<path>",
"content": "<content>"
},
"name": "unfour.ssh.write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| path | Yes | ||
| confirm | No | ||
| content | Yes | ||
| timeoutMs | No | ||
| workspaceId | No | ||
| connectionId | Yes | ||
| confirmationText | No | ||
| confirmation_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No |