ssh_write_file
Write or append UTF-8 content to a remote file on a specified host via SFTP, with base64-exec fallback when SFTP is unavailable. Provide the absolute remote path.
Instructions
Write remote file via SFTP (base64-exec fallback). Param is filePath (not path). direct hosts only.
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_id": "<host_id>",
"filePath": "<filePath>",
"content": "<content>"
},
"name": "ssh_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | rewrite | |
| content | Yes | File content (UTF-8) | |
| host_id | Yes | ||
| filePath | Yes | Absolute remote path (required name: filePath, not path) | |
| timeoutMs | No |