ssh_write_file
Write or update a remote file over SFTP, with automatic timestamped backup creation before overwriting existing content.
Instructions
Create or update a remote file over SFTP. By default automatically creates a timestamped backup copy (.bak-...) of any existing file before overwriting.
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": {
"serverId": "<serverId>",
"path": "<path>",
"content": "<content>"
},
"name": "ssh_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Optional file permissions mode in octal notation, e.g. "0644" or "0755". | |
| path | Yes | The remote absolute path where the file should be written. | |
| backup | No | Whether to create a timestamped backup before writing if file exists (default: true). | |
| content | Yes | The string content to write into the file. | |
| serverId | Yes | The ID of the configured target server. |