ssh_write_file
Creates, overwrites, or appends text files on a remote host via SFTP, with optional directory creation and file permissions.
Instructions
Create/overwrite (or append to) a text file on the remote host via SFTP.
mode is an octal string like "755". For root-owned paths use
ssh_exec(command="tee /path >/dev/null", stdin=content, sudo=true) instead.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| path | Yes | ||
| append | No | ||
| target | Yes | ||
| content | Yes | ||
| make_dirs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |