plan_sync
Previews synchronization between a local folder and an Overleaf project, reporting files to upload, identical items, remote-only paths, conflicts, and ignored entries without making changes.
Instructions
Compare a local folder with a project folder and report what sync_directory would do, changing nothing. Binary files compare by git blob hash at no cost; each text document with a local counterpart, or present only in the project, is read once through the project's queue, so this suits tens of documents, not thousands. Returns toUpload (new or changed), identical (a count and the first 25 paths unless verbose), remoteOnly (what mirror mode would delete, each folder collapsed to one entry that includes its contents), conflicts (a file where the other side has a folder, or non-UTF-8 text where the project has a document; sync_directory cannot apply these), ignored, and planToken. Show the plan to the user before syncing. localFolderPath is on the server's disk; a symbolic link that leads outside it fails with PATH_OUTSIDE_ROOT.
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>",
"localFolderPath": "<localFolderPath>"
},
"name": "plan_sync"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ignore | No | Extra gitignore-style patterns, applied after the defaults (hidden files and folders, __MACOSX/, and LaTeX build output: *.aux, *.log, *.bbl, *.blg, *.out, *.toc, *.synctex.gz, *.fdb_latexmk, *.fls) and after any .olignore file in the folder; "!pattern" re-includes, for example "!.latexmkrc". Ignored paths are never uploaded, compared, or deleted, on either side. | |
| verbose | No | List every identical path and ignored entry instead of the first 25 | |
| projectId | Yes | Overleaf project ID | |
| localFolderPath | Yes | Local folder on the server's own disk, synced as a whole | |
| destinationFolderPath | No | Project folder the local folder corresponds to; "" (the default) is the project root |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ignored | Yes | ||
| toUpload | Yes | ||
| conflicts | Yes | ||
| identical | Yes | ||
| planToken | Yes | ||
| remoteOnly | Yes | ||
| localFolderPath | Yes | ||
| destinationFolderPath | Yes |