Move or rename a project file
move_fileMove or rename a file in an Overleaf project's local clone, creating missing parent folders; fix LaTeX references before pushing to apply.
Instructions
Move or rename a file inside one project, creating any missing parent directories. The move happens in the local clone only; nothing changes in Overleaf until push_changes. LaTeX references are not rewritten: an \input, \include or \includegraphics naming the old path will break, so search_project for it afterwards and fix the references with replace_text before pushing. Both paths are relative to the same project's root; to move a text file between projects, read_file it from one and write_file it into the other. Pulls from Overleaf first. If fromPath is not a file in the project or a file already exists at toPath, nothing moves and the reply says why.
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": {
"fromPath": "<fromPath>",
"toPath": "<toPath>"
},
"name": "move_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toPath | Yes | New path for the file, relative to the project root, e.g. sections/intro.tex. Must stay inside the project and must not already exist. | |
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| fromPath | Yes | Current path of the file, relative to the project root, e.g. intro.tex. |