write_file
Create or replace an entire file at a target path, auto-create its parent folders, and run post-write compiler or linter checks when needed.
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 |