overleaf_write_file
Create or replace a document's full content in an Overleaf project, sending only changed lines to preserve collaborator cursors and optionally submitting tracked changes; missing folders are created.
Instructions
Create a text document, or replace an existing one's whole content.
Only the lines that differ are sent, so collaborators' cursors elsewhere are preserved. Missing folders in the path are created.
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": {
"project": "<project>",
"path": "<path>",
"content": "<content>"
},
"name": "overleaf_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path in the project, e.g. 'main.tex' or 'chapters/intro.tex'. | |
| content | Yes | Full new content of the document. | |
| project | Yes | Project id, Overleaf project URL, or exact project name. | |
| track_changes | No | Submit as a tracked change (suggestion) instead of a direct edit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |