write_file
Create a new file or replace or append content in a repository, with parent directories automatically created. Choose mode to avoid overwriting or to extend existing files.
Instructions
Create a new file, or replace / append to an existing one. Use this for NEW files. To change part of an existing file use edit_file instead — it is safer and much cheaper than resending the whole file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | create (default, fails if the file exists), overwrite, or append. | |
| path | Yes | File path relative to the workspace root. Parent directories are created. | |
| content | Yes | Full file content (or the text to append). | |
| workspace | No | Workspace alias. Defaults to the active workspace. |