Suggest, accept or reject tracked changes
manage_tracked_changesPropose edits as tracked changes for co-authors to accept or reject, and accept or reject existing suggestions in Overleaf projects.
Instructions
Change the suggestions in Overleaf's review panel; action picks what. suggest proposes a change that arrives as tracked changes a co-author can accept or reject, rather than as finished text, in one of two forms. findText with replaceWith replaces one exact snippet: findText must match exactly and occur once in the document, and an empty replaceWith suggests deleting it. content rewrites more at once: with sectionTitle it is the section's full replacement, from its heading to the next heading of the same or a shallower level, and alone it is the whole document's new text; only the passages that differ become suggestions, so unchanged text keeps its comments. Use suggest when proposing a change to someone else's paper; use edit_file when the edit should simply be made. accept makes suggestions part of the paper, so suggested insertions become ordinary text and suggested deletions are removed for good. reject undoes them: a suggested insertion is removed and a suggested deletion puts the original text back. Name the suggestions to decide by changeIds from read_review (view tracked_changes), or pass all: true for every suggestion in the document. Every action reaches Overleaf immediately, for every collaborator, through the editor rather than the Git bridge, so there is no push step and no undo from here; confirm accept and reject with the user first. suggest needs review access to the project and accept and reject need edit access; the call is refused before anything is sent when the account lacks it. Overleaf's editor cannot store emoji or other characters outside the Basic Multilingual Plane, so replaceWith or content containing one is refused; write a LaTeX command instead. Returns the suggestion made, with the number of suggested deletions and insertions a content rewrite became, or the suggestions decided after checking they are gone from the review panel.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"path": "<path>"
},
"name": "manage_tracked_changes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | accept and reject: decide every suggestion in the document, whoever made it. Give this or changeIds, not both. | |
| path | Yes | Every action: the document, relative to the project root, for example main.tex. | |
| action | Yes | What to do: suggest (propose a replacement, a section or a whole document as tracked changes), accept or reject (decide suggestions already in the review panel). | |
| content | No | suggest, instead of findText and replaceWith: the new text. With sectionTitle it replaces that section and must start with the section's own sectioning command; alone it is the complete new text of the document. | |
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| findText | No | suggest, with replaceWith, for one snippet: exact text to replace, matched literally including whitespace. Must occur exactly once in the document. | |
| changeIds | No | accept and reject: ids of the suggestions to decide, as read_review (view tracked_changes) shows them in […]. Give these or all, not both. | |
| replaceWith | No | suggest, with findText: the suggested replacement text. An empty string suggests deleting findText and nothing more. | |
| sectionTitle | No | suggest, with content, for one whole section: its title as in the sectioning command, matched case-insensitively with a substring fallback. |