write_file
Write an entire file to an Overleaf project. If a local workspace exists, it stages changes for review; otherwise, it commits and pushes immediately.
Instructions
Write a whole file. With a workspace: writes only (review + push_local). Without: commits + pushes immediately (commitMessage required).
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": {
"filePath": "<filePath>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| filePath | Yes | ||
| projectName | No | Project name, fuzzy name, or 24-char project ID. Omit to use the default/sole project. | |
| commitMessage | No | Required only when the project has no local workspace. |