rollback_to_version
Restore an Overleaf project to an earlier commit, leaving changes uncommitted for review before pushing. Modes: restore files or revert commits since a SHA.
Instructions
Restore a workspace to a prior commit as UNCOMMITTED changes (review with diff_local, then push_local). mode "restore" = git checkout ; "revert" = undo commits since .
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": {
"projectName": "<projectName>",
"commitSha": "<commitSha>"
},
"name": "rollback_to_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | restore (default) or revert. | restore |
| force | No | Proceed even if the workspace has uncommitted changes. | |
| paths | No | Paths to restore (restore mode only). Omit for all. | |
| commitSha | Yes | Target commit SHA (from list_version_history). | |
| projectName | Yes | Project name, fuzzy name, or 24-char project ID. Omit to use the default/sole project. |