sftp_write_safe
Write remote files atomically over SSH with automatic timestamped backups, returning unified diffs and SHA-256 hashes for verification and rollback.
Instructions
Safe atomic remote file write: creates automated remote backup (.matlock.bak.), writes atomically, and returns a unified diff patch and SHA-256 hashes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional SSH connection target. If omitted, uses default profile (homelab). | |
| content | Yes | Complete content to write into file. | |
| filePath | Yes | Absolute remote file path to write. | |
| createBackup | No | Whether to create .matlock.bak snapshot (default true). |