Compile the open Overleaf project
compileTriggers a LaTeX compile on Overleaf's CLSI and returns a summary with status, error and warning counts, and output files. Check error_count === 0 to confirm a clean build.
Instructions
Triggers a LaTeX compile on Overleaf's CLSI, then fetches output.log and returns a unified summary: status, whether a PDF was produced, error_count (parsed ! -prefixed log lines), warning_count, first error lines, output file list, timings. Note: Overleaf returns status:"success" even when LaTeX has errors (PDF is still generated under nonstopmode). The truthful 'did it build cleanly?' check is error_count === 0. Use read_log for the full log when more context is needed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draft | No | Draft mode — faster but uses placeholder images for figures. | |
| root_doc | No | Project-relative path to use as the LaTeX root (e.g. 'main.tex'). Defaults to the project's configured root doc. | |
| 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. | |
| stop_on_first_error | No | Stop on the first LaTeX error instead of continuing to produce a partial PDF. |