Write a remote file
ssh_write_fileCreate or replace a full text file on a remote host over SFTP while preserving existing permission bits; the parent directory must already exist.
Instructions
Creates or replaces a text file on a host over SFTP. The whole file is replaced with content. An existing file keeps its permission bits. The parent directory must exist.
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": {
"host": "<host>",
"path": "<path>",
"content": "<content>"
},
"name": "ssh_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Name of a configured host, as returned by ssh_list_hosts | |
| path | Yes | Absolute path, or one relative to the login directory | |
| content | Yes | Full new contents of the file |