Atomically Write Remote File
ssh_writeAtomically write a remote file over SSH using a same-directory temp file and rename; existing files are protected unless overwrite is explicitly enabled.
Instructions
Atomically write a remote file via a same-directory temp file and rename. Defaults to overwrite=false to protect production files; pass overwrite=true explicitly to replace an existing file.
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": {
"target": "<target>",
"path": "<path>",
"content": "<content>"
},
"name": "ssh_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eol | No | Line ending normalization (default: preserve) | preserve |
| mode | No | Optional Unix octal permissions, e.g. '0644' or '0755' | |
| path | Yes | Explicit remote absolute path (e.g. /etc/nginx/nginx.conf or C:\Services\app.json) or home-relative ~/... path. Bare relative paths are rejected. | |
| target | Yes | SSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target. | |
| content | Yes | Full UTF-8 text content to write | |
| overwrite | No | Must be true to replace an existing file (default: false) | |
| create_dirs | No | Create missing parent directories (default: true) |