Write a file to the remote server
write_fileWrites text content to a remote file via SFTP for deploying configs, env files, or scripts on any server.
Instructions
Writes text content to a file path on the remote server via SFTP. Useful for config files, env files, or scripts that don't fit one of the deploy_* recipes.
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>",
"username": "<username>",
"privateKeyPath": "<privateKeyPath>",
"remotePath": "<remotePath>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server IP address or hostname, e.g. 168.119.45.12 | |
| port | No | SSH port, defaults to 22 | |
| content | Yes | File content to write | |
| username | Yes | SSH username, e.g. root or deploy | |
| passphrase | No | Passphrase for the private key, if it has one | |
| remotePath | Yes | Absolute or ~-relative path on the remote server | |
| privateKeyPath | Yes | Path to the private key on THIS machine, e.g. "~/.ssh/id_ed25519" |