write_remote_file
Write files on remote SSH hosts with correct handling of large, binary, or special-character data, avoiding echo and heredoc pitfalls.
Instructions
Write content to a file on the remote host using the established session.
Use this tool to write file contents instead of using echo, redirection, or heredocs with send_command. This method handles large files, binary data, and special characters correctly.
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": {
"session_id": "<session_id>",
"remote_path": "<remote_path>",
"content": "<content>"
},
"name": "write_remote_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | ||
| content | Yes | ||
| session_id | Yes | ||
| remote_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |