Skip to main content
Glama

Typeset the project

compile
Idempotent

Typeset the project with latexmk: parsed errors [{type,file,line,message,context?,source?}] (type "error" rows before "warning" rows, first 50; errorsTotal counts the errors and warningsTotal the warnings, whether or not the list was…

Instructions

Typeset the project with latexmk: parsed errors [{type,file,line,message,context?,source?}] (type "error" rows before "warning" rows, first 50; errorsTotal counts the errors and warningsTotal the warnings, whether or not the list was capped; box warnings are omitted; context is the source line the engine was reading, source the tool that raised a warning — latex, a package name, biber — and a biber row names the .bib and its line), on failure ≤4 KB of the log around the first error, pages, and a deep link into Aldine. With errors present the PDF is complete but the bibliography and cross-references are not rebuilt — say so. pdfUrl is a signed link to this run's PDF that anyone can open for 15 minutes — hand it to the user as the way to see the result, and call get_pdf_url for a fresh link later instead of recompiling. pdfStale:true means this run wrote no PDF: pdfUrl shows the previous one, or is null when that no longer exists. Takes up to ~2 minutes; progress notifications arrive while it runs. Compile after a coherent set of edits, not after each one, and never just to check syntax. On errors: fix and recompile at most 3 times, narrating each attempt ("attempt 2 of 3: added natbib"), then stop and ask the user, quoting the failing file:line. A project with no .tex file cannot be typeset: write the main document first. A compiler-not-responding, compiler-cannot-see-the-project, missing-package (hint), quota, or typeset-already-running error is for the user to act on — relay it, do not retry.

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
cleanNoDelete the generated build files (aux, bibliography, latexmk state, precompiled preamble, the previous PDF) first and typeset from nothing; source files are never touched. Only for errors located in a generated file (.aux, .bbl, .toc) that survive a fix in the source, or when the user asks to recompile from scratch: a clean run is several times slower.
branchNoBranch name (defaults to 'main'). Every result, error results included, echoes {branch, head} — head is the branch's current commit (after a write, the commit that write made). Pass the branch explicitly whenever you are not on main.
projectNoProject id. Optional when the access token is scoped to exactly one project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.0
    • addedInput schema / properties / clean
      Added value: +{
      +  "description": "Delete the generated build files (aux, bibliography, latexmk state, precompiled preamble, the previous PDF) first and typeset from nothing; source files are never touched. Only for errors located in a generated file (.aux, .bbl, .toc) that survive a fix in the source, or when the user asks to recompile from scratch: a clean run is several times slower.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it discloses runtime characteristics (~2 minutes with progress notifications), signed PDF link validity (15 minutes), and semantics of pdfUrl and pdfStale. It also explains error parsing, warning omission, log truncation, and that a PDF produced with errors lacks rebuilt bibliography and cross-references.

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 purpose and usage rules are front-loaded, and nearly every clause adds operational value. However, the description is one dense, run-on paragraph with nested parentheticals, which reduces readability even though it avoids outright repetition.

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 complex compile tool with no output schema, the description covers return values, error shapes, PDF link behavior, failure modes, latency, progress notifications, and the correct retry policy. Nothing essential for selecting and invoking it correctly appears to be missing.

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% and the schema already explains clean, branch, and project in detail. The description does not add parameter-specific syntax or constraints beyond what the schema provides, so the high-coverage baseline of 3 is appropriate.

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 description opens with a specific verb and resource: "Typeset the project with latexmk." It immediately distinguishes the operation from sibling tools such as get_pdf_url by explaining that compilation produces a PDF and that get_pdf_url should be used for later fresh links.

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 gives explicit timing guidance: compile after a coherent set of edits, not after each edit, and never just to check syntax. It also defines a bounded error-handling workflow with at most 3 recompiles, narrated attempts, and a stop-and-ask-user condition, plus a list of errors to relay rather than retry.

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