Skip to main content
Glama

Compile the open Overleaf project

compile

Triggers 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

NameRequiredDescriptionDefault
draftNoDraft mode — faster but uses placeholder images for figures.
root_docNoProject-relative path to use as the LaTeX root (e.g. 'main.tex'). Defaults to the project's configured root doc.
project_idNoOverleaf 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_errorNoStop on the first LaTeX error instead of continuing to produce a partial PDF.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "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.",
      +  "minLength": 8,
      +  "type": "string"
      +}
  2. First observedv0.3.5

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it names the external service (CLSI), discloses the nonstopmode quirk where status is 'success' despite LaTeX errors, and defines error_count parsing. It does not mention side effects on the project (PDF/output files written) or any rate-limit/auth considerations.

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?

Front-loaded with the action, then the return shape, then the critical caveat — a logical order with no filler. The first sentence is dense and list-like, but every clause (including the status:'success' warning) earns its place.

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

Completeness4/5

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

There is no output schema and no annotations, so the description must describe the return value — which it does by enumerating status, PDF presence, error/warning counts, first errors, output files, and timings. Missing only side-effect and permission context for a tool that writes build artifacts into the project.

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

Parameters3/5

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

Schema description coverage is 100%, so draft, root_doc, project_id, and stop_on_first_error are already fully documented in the schema. The description adds no additional parameter meaning beyond the schema, which is the expected baseline of 3.

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?

States a specific verb and resource ('Triggers a LaTeX compile on Overleaf's CLSI') plus the follow-on behavior (fetches output.log, returns a unified summary). It also enumerates the summary fields, so an agent knows exactly what this tool produces versus siblings like read_log.

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

Usage Guidelines4/5

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

Explicitly routes the agent to read_log 'when more context is needed,' which is a concrete alternative with a condition. It also gives practical guidance on interpreting results (error_count === 0 is the real success check), though it doesn't state when not to compile at all.

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