Create a new text doc
create_docCreate a new .tex, .bib, or other document at a project-relative path in an Overleaf project, optionally adding initial content; creation fails if the path already exists.
Instructions
Creates a new .tex/.bib/... doc at path, optionally with initial content. Fails if the path already exists.
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": "create_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project-relative path of the new doc, e.g. 'sec/related.tex'. | |
| content | No | Initial text. Written as a direct (untracked) edit right after creation, like pasting into a new file. | |
| 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. | |
| create_parents | No | Create missing parent folders (default: true). |