write_file
Write text to a remote file via SSH, overwriting existing content and creating parent directories automatically.
Instructions
Write content to a remote file (overwrites existing content).
Creates parent directories if they do not exist.
Args: path: Absolute path to the destination file. content: Text content to write. host_name: Named host from SSH_HOSTS config; uses default host if omitted.
Returns: Success message or error details.
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 | ||
| content | Yes | ||
| host_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |