Skip to main content
Glama

Compile LaTeX source

compile_latex
Destructive

Compile LaTeX source to a PDF without choosing a project: the main .tex content plus optional extra .tex, .bib or .sty files. Use when the user wants a PDF of LaTeX that is in the conversation. Runs on letX's TeX Live installation and returns a PDF download link, and the LaTeX errors when there are any. Text files only, no images. The source is saved to the user's "AI Scratchpad" project, replacing the files of the same name from the previous call (earlier versions stay in that project's history).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNooptional additional text files (chapters, refs.bib, custom .sty)
compilerNoTeX engine: pdflatex (default), xelatex, or lualatex. Leave empty and letX works it out from the packages the document loads.
main_texYesthe full content of main.tex

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the description's real value is explaining the *mechanics* of that destruction: the source is saved to the user's "AI Scratchpad" project, files of the same name are replaced, and earlier versions survive in project history. It also discloses return behavior (PDF download link plus LaTeX errors on failure) and the text-only input constraint. It stops short of naming auth/permission requirements or size/time limits, so 4 rather than 5.

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 purpose and the project-free scoping in the first clause, then side effects and return values. Four sentences all carry information; only the compiler-default remark is arguably redundant with the schema. No filler or restatement of the tool name.

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?

No output schema exists, yet the description supplies return semantics (PDF download link, LaTeX errors when compilation fails). For a 3-parameter tool with a persistence side effect, the description covers input constraints, side effects, history behavior, and outputs — nothing an agent needs to call it correctly is 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 coverage is 100%, so the schema already documents main_tex, files[].path/content, and the pdflatex/xelatex/lualatex options. The description adds only a mild constraint (text files only, no images) on the files parameter and nothing on format or syntax the schema doesn't already carry. Baseline 3 is correct.

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+resource (compile LaTeX source to PDF) and immediately scopes it against the sibling project-based path: "without choosing a project: the main .tex content plus optional extra .tex, .bib or .sty files." An agent can distinguish it from compile_project without opening either 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?

Explicitly names the triggering condition ("Use when the user wants a PDF of LaTeX that is in the conversation") and the implicit alternative is disambiguated by "without choosing a project" and "Text files only, no images." Both when-to-use and when-not are inferable with no guessing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources