Skip to main content
Glama

get_compile_log

Read-only

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

NameRequiredDescriptionDefault
kindNolatex
tailNoHow many lines to return, from the end
formatNoraw
buildRefNoFrom compile_project; defaults to the latest build in this process
projectIdYesOverleaf project ID

Output Schema

NameRequiredDescriptionDefault
logYes
fileYes
buildIdYes
truncatedYes
errorLinesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply readOnlyHint=true; the description carries the real burden and does so thoroughly — no recompilation occurs, log retention at Overleaf is time-limited, expired builds return BUILD_NOT_FOUND, reads are capped at 1 MB from the start, and stale .blg files are explicitly rejected. It even discloses derived return fields (errorLines capped at 100 entries of 240 chars, truncated flag), which is well beyond what the annotation declares.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The size is justified by the dense contract it encodes, and the no-recompile scoping plus the compile_project alternative are front-loaded. The middle section is a long run-on chain of conditions, and the tail limits are restated from the schema, so it loses a point on readability rather than on wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only log reader with five params and an output schema, the description covers every decision an agent must make: which log, which build, how much to read, which format, and what sentinel results mean. Return-field shape is handled by the output schema, so nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 60%, and the description compensates: it explains kind's bibtex branch and its NOT_FOUND semantics, buildRef's default to the latest in-process build plus the NO_BUILD/BUILD_NOT_FOUND outcomes, format "errors-only" as 'only the lines that start an error', and the tail defaults and limits including the 100000-character cap absent from the schema. This adds genuine meaning rather than restating field names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb (read) and two concrete resources (output.log, the .blg file for kind "bibtex"), and immediately distinguishes itself from compile_project with "without compiling again." An agent can tell this is a log-retrieval tool, not a build tool, without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It routes explicitly: "prefer compile_project's summary when that is enough" states the condition under which this tool should not be called, and "Without buildRef it reads the latest build compile_project made in this server process" states the fallback behavior. The when-not case for bibtex (NOT_FOUND when BibTeX did not run, even with a stale output.blg) is also spelled out, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.