get_compile_log
Read a build's LaTeX or BibTeX log without recompiling, returning tail lines or error-only output to diagnose compile failures and BibTeX issues.
Instructions
Read a build's LaTeX log (output.log) or BibTeX log (kind "bibtex", the .blg file), without compiling again. kind "bibtex" is NOT_FOUND when BibTeX did not run for the build, even if Overleaf still lists an output.blg left over from an earlier build. Without buildRef it reads the latest build compile_project made in this server process, else NO_BUILD; Overleaf keeps build output only for a while, and an expired build is BUILD_NOT_FOUND. At most 1 MB of the log is read, from its start, and the last tail lines are returned (default 200, at most 2000, and at most 100000 characters). format "errors-only" returns only the lines that start an error. errorLines lists the first 100 error lines with their 1-based line numbers, each cut to 240 characters. truncated says whether anything of the log was left out. The log quotes source lines near each error; prefer compile_project's summary when that is enough.
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": {
"projectId": "<projectId>"
},
"name": "get_compile_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | latex | |
| tail | No | How many lines to return, from the end | |
| format | No | raw | |
| buildRef | No | From compile_project; defaults to the latest build in this process | |
| projectId | Yes | Overleaf project ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | Yes | ||
| file | Yes | ||
| buildId | Yes | ||
| truncated | Yes | ||
| errorLines | Yes |