Edit a file
edit_fileApply exact search-and-replace edits to Overleaf files, merging live collaborator typing instead of overwriting it; optionally record edits as tracked changes.
Instructions
Applies exact search-and-replace edits to a file, live: collaborators see the change instantly and concurrent typing is merged, not overwritten. All edits apply together or not at all. With suggest=true the edits become tracked changes the author can accept or reject in Overleaf's review panel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| edits | Yes | Applied in order, each to the result of the previous one | |
| dryRun | No | Show the diff without changing anything | |
| project | No | Project name, id or Overleaf URL. May be omitted when exactly one project is pinned. | |
| suggest | No | Record as tracked changes (suggestions) instead of direct edits |