ssh_file_write
Write a file to a remote server atomically and idempotently, verifying content via hash and atomic rename so only validated files replace the target.
Instructions
Положить файл на сервер атомарно и идемпотентно.
Порядок намеренный: сверить хеш, залить во временный, проверить временный, переставить через rename. На месте боевого файла никогда не оказывается непроверенное содержимое, а повторный вызов с тем же текстом ничего не делает и честно сообщает changed=false.
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": {
"server": "<server>",
"remote_path": "<remote_path>",
"content": "<content>"
},
"name": "ssh_file_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 0644 | |
| owner | No | ||
| backup | No | ||
| server | Yes | ||
| content | Yes | ||
| validate | No | Команда проверки со скобками {} вместо пути, например 'nginx -t -c {}' | |
| remote_path | Yes |