Upload a binary file (figure, PDF, ...)
upload_fileUpload local or base64 files to a specified Overleaf project path, replacing existing files and creating parent folders as needed—ideal for figures and binary assets.
Instructions
Uploads a file from the local disk (local_path) or from base64 (content_base64) to path in the project, replacing an existing file of the same name. Use for figures and other binary assets; use create_doc / edit_file for text. local_path is only allowed inside the client's MCP roots or the directories in OL_UPLOAD_DIRS, and never for dotfiles.
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": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Destination path in the project, e.g. 'figures/teaser.pdf'. An existing file at this path is replaced. | |
| local_path | No | Absolute path of a local file to upload. Must be inside the client's MCP roots or OL_UPLOAD_DIRS; dotfiles and dot-directories are refused. | |
| project_id | No | Overleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it. | |
| content_base64 | No | File content as base64, instead of local_path. | |
| create_parents | No | Create missing parent folders (default: true). |