write_file
Create or replace a text file in an Overleaf project, with automatic folder creation. Prevents overwriting files modified since the last read unless forced.
Instructions
Create or replace a text file. Missing folders are created.
Refuses to overwrite a file that changed since the last read_file, or that was only read in part, unless force=True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path inside the project, e.g. sections/intro.tex | |
| force | No | Overwrite even if the file changed since the last read | |
| content | Yes | Full new file contents (whole-file replace) | |
| project | Yes | Project id (24-char hex) or exact name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||