Write file
project_write_fileCreate, overwrite, or append files inside the workspace, with directory creation and checksum verification. Use it to write full file contents; edit small sections with project_edit_file instead.
Instructions
Write a file. mode=create errors if it exists; overwrite replaces; append concatenates to the end. Use when: create a new file or replace/append a file's contents. Avoid when: only a small section needs to change (project_edit_file) to leave the rest intact. Speed: fast; clears the read/list/search cache for the affected path. Output: file_written: action, bytes_written, sha256_after. Batch-safe: no
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| content | Yes | ||
| create_dirs | No | ||
| relative_path | Yes | Path inside the workspace (relative, or absolute inside the workspace) | |
| expected_sha256 | No |