write_file
Create or replace a UTF-8 file in a read-write workspace with SHA-256 verification and recoverable change tracking. Preserves line endings and permissions.
Instructions
Create or replace a UTF-8 text/code/Markdown/config file in an rw space. Supply full text <=1 MiB, observed SHA-256 (or 'absent' for create), and unique request_id. Preserve existing UTF-8 BOM, CRLF and permissions by default; line_ending can be preserve/lf/crlf. Returns recoverable change_id. Prefer apply_text_patch for partial reads. No document binaries or code execution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| text | Yes | ||
| workspace | Yes | ||
| request_id | Yes | ||
| line_ending | No | preserve | |
| expected_sha256 | Yes |