write_file
Creates a UTF-8 text file at a specified workspace path, replacing existing content only when overwrite is enabled. Ideal for new files; use update_file for modifying existing files.
Instructions
Create a UTF-8 text file, or replace one when "overwrite" is true. Prefer edit_file or update_file for changes to an existing file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path relative to the workspace root, or an allowed absolute path. | |
| content | Yes | Complete UTF-8 file content. | |
| overwrite | No | Allow replacing an existing file; defaults to false. | |
| expected_sha256 | No | Optional SHA-256 returned by a previous read or write. The call fails if the file changed since then. |