Create or overwrite a file
write_fileCreate or update an Overleaf LaTeX file by writing full content, adding missing folders and applying a minimal live diff to preserve collaborator cursors.
Instructions
Writes the full content of a text file, creating it (and missing folders) if needed. Existing docs are updated in place via a minimal live diff, so collaborators keep their cursors. Prefer edit_file for small changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| project | No | Project name, id or Overleaf URL. May be omitted when exactly one project is pinned. | |
| suggest | No | Record changes to an existing doc as tracked changes | |
| overwrite | No | Set false to refuse replacing an existing file (default true) |