write_file
Create new files or fully overwrite existing ones, building parent folders as needed. Use apply_patch or edit_file for changes to existing files.
Instructions
Create or fully overwrite a file (parent folders are created). Prefer apply_patch/edit_file for changes to existing files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path | |
| check | No | Run compilers/linters on the changed files afterwards (default true) | |
| content | Yes | Complete new file content | |
| expectedSha256 | No | Optional optimistic precondition from file_info; refuse overwrite if the file changed |