Create or exactly edit one file
edit_fileEdit files in a bounded workspace with conflict-safe updates, using exact replacements and SHA verification for atomic changes.
Instructions
Atomically create a UTF-8 file, or edit one using unique exact replacements and a current whole-file SHA-256. workspace(read) returns that SHA for small files; use file_info for larger files. When multiple workspaces are configured, pass the same workspace_id used for inspection. Cannot delete files, edit the local task config, follow links, or access credential-like paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| replacements | No | ||
| workspace_id | No | Required when server_info lists multiple workspaces. | |
| create_content | No | Used only when creating a new file. | |
| expected_sha256 | No | Required when editing an existing file. |