manage_tracked_changes
Accept or reject tracked changes in an Overleaf document by supplying listed change IDs, revision, and user confirmation; prevents unconfirmed or mismatched decisions.
Instructions
Accept or reject tracked changes in one document. First list them with list_tracked_changes and confirm them with the user, then pass that document's filePath and revision, the changeIds (1 to 500, each once), and confirmCount equal to the number of changeIds; a missing or different confirmCount is CONFIRMATION_MISMATCH and nothing is sent. Accepting an insert keeps its text and accepting a delete removes it; rejecting an insert removes its text and rejecting a delete restores it. A tracked replacement is an insert and a delete linked by pairedChangeId: pass both ids. Checked in this order before anything is sent: access (only the owner and collaborators who can edit may decide; review-only and read-only access is PERMISSION_DENIED), whether track changes is available for the project (REVIEW_UNSUPPORTED, details.kind "feature_disabled"; review may need a plan that includes it), the revision (REVISION_CONFLICT), that every id is a tracked change in this document (NOT_FOUND, details.missingChangeIds), and that no change left out overlaps a chosen one (INVALID_ARGUMENT, details.overlappingChangeIds). REVIEW_UNSUPPORTED with details.kind "route_unavailable" or "document_protocol" means this Overleaf cannot decide changes this way. The decision is sent once and verified on a fresh read of the document. One that timed out is observed, never resent: recoveredAfterTimeout: true when it applied, TIMEOUT or REMOTE_ERROR with details.outcome "not_applied" when it did not, REVISION_CONFLICT with details.outcome "unknown" when the document changed meanwhile, and OUTCOME_UNKNOWN when it could not be observed. A repeated decision changes nothing: it fails with REVISION_CONFLICT when the first one changed the document's revision, as every reject and every history-OT decision does, or with NOT_FOUND when it did not, as after an accept on a ShareJS document, which leaves the revision as it was. Rejecting on a ShareJS (legacy editor) document may notify the change's author; on a history-OT document it does not. Returns action, filePath, changeIds, the resulting revision and protocol, remainingChangeCount (tracked changes left in the document), trackChangesActive, and recoveredAfterTimeout. List again after every decision and after REVISION_CONFLICT or NOT_FOUND: ids merge and split, and history-OT ids are valid only with the revision they were listed with.
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": {
"projectId": "<projectId>",
"filePath": "<filePath>",
"revision": "<revision>",
"action": "<action>",
"changeIds": "<changeIds>"
},
"name": "manage_tracked_changes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| filePath | Yes | Project-relative path using forward slashes | |
| revision | Yes | The revision list_tracked_changes returned for this document | |
| changeIds | Yes | changeId values from list_tracked_changes, all in this document, each once | |
| projectId | Yes | Overleaf project ID | |
| confirmCount | No | Must equal the number of changeIds, after the user has confirmed them |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| filePath | Yes | ||
| protocol | Yes | ||
| revision | Yes | ||
| changeIds | Yes | ||
| trackChangesActive | Yes | ||
| remainingChangeCount | Yes | ||
| recoveredAfterTimeout | No |