Delete a file or folder
delete_fileRemove a file or folder from an Overleaf project via Git or web mode. Deleted items can be restored from Overleaf History.
Instructions
Delete a file or folder from the Overleaf project. Deleted files can be restored from Overleaf's History. Uses Git; falls back to the opt-in web mode if enabled.
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": {
"path": "<path>"
},
"name": "delete_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File or folder path relative to the project root. | |
| project | No | Project ID or Overleaf project URL (or project name in web mode). Defaults to OVERLEAF_PROJECT_ID. | |
| commit_message | No |