write-file
Write content to files on remote SSH servers with options to append, use sudo privileges, or create directories as needed.
Instructions
Write content to a file on the remote server
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": {
"path": "<path>",
"content": "<content>"
},
"name": "write-file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to write | |
| content | Yes | Content to write to the file | |
| connectionName | No | SSH connection name (optional, default is 'default') | |
| append | No | Append to file instead of overwriting (optional, default is false) | |
| sudo | No | Write file with sudo privileges (optional, default is false) | |
| createDirs | No | Create parent directories if they don't exist (optional, default is false) |