Skip to main content
Glama

Compile LaTeX source

compile_latex

Compile LaTeX source to a PDF without picking a project: pass the main .tex content (and optional extra .tex/.bib files). Runs on letX's real TeX Live compile farm and returns a PDF download link, or the compile errors so you can fix the source and try again. Note: only text files are supported here, so projects with images should be created via create_project and edited in letX. The source is saved to the user's "AI Scratchpad" project.

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.7/5.0
Behavior5/5

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

All annotation hints are false, so the description carries the transparency burden. It discloses the execution backend ('real TeX Live compile farm'), the possible outcomes (PDF link or compile errors), and a side effect (source saved to AI Scratchpad). This goes well beyond what the schema or annotations convey.

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

Conciseness5/5

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

Three tight sentences, no fluff. The core action is front-loaded, followed by return behavior, limitations, and side effects. Every sentence earns its place and supports correct usage.

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 3-parameter tool with complete schema coverage and no output schema, the description covers everything an agent needs to call it safely: what it does, what it returns, side effects, and when to use an alternative. No critical gaps are visible.

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 a baseline of 3 is appropriate. The description restates that main_tex is the content and files are optional, adding little semantic detail beyond the schema. The 'text files only' note is a useful constraint but is largely redundant with the files parameter description.

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 states a specific verb ('Compile'), resource ('LaTeX source to a PDF'), and key differentiator ('without picking a project'). This clearly separates it from compile_project and other siblings. The main_tex input is also identified as the primary content to pass.

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 explicitly frames the tool as standalone ('without picking a project'), implying compile_project for project-based workflows. It also gives a concrete exclusion: 'only text files are supported here, so projects with images should be created via create_project and edited in letX.' This tells an agent exactly when to use an alternative.

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