Skip to main content
Glama
coolport
by coolport

latexmk_compile

Compile LaTeX documents from raw source or .tex file, returning structured errors, warnings, missing package hints, page count, and output file path.

Instructions

Compile a LaTeX document using latexmk. Accepts raw LaTeX source or a path to an existing .tex file. Returns structured errors, warnings, missing package hints, page count, and the output file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bibtexNoBibliography processornone
engineNoTeX engine to usepdflatex
synctexNoGenerate SyncTeX data
file_pathNoAbsolute path to an existing .tex file (mutually exclusive with tex_content)
extra_argsNoExtra latexmk CLI arguments to pass through
return_pdfNoInclude the compiled PDF as base64 in the response when output_format is pdf.
tex_contentNoLaTeX source content (mutually exclusive with file_path)
working_dirNoWorking directory. Defaults to a fresh temp directory.
shell_escapeNoEnable --shell-escape
output_formatNoTarget output formatpdf
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does disclose the structured return values (errors, warnings, package hints, page count, output path), which adds useful context. However, it does not mention side effects, execution time, or failure modes (e.g., if latexmk is not installed), leaving significant gaps.

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?

The description is two sentences, front-loaded with the action and immediately followed by a concise summary of return values. Every word earns its place with no repetition or filler.

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

Completeness3/5

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

For a tool with 10 parameters and no output schema, the description covers the core operation and return values but lacks contextual guidance. It does not address the return_pdf option, working directory semantics, or how to interpret the structured output, and it does not position itself relative to sibling tools.

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% with all parameters having descriptions, so the baseline is 3. The tool description adds no per-parameter detail beyond the schema, though it does reiterate that both raw source and file path are accepted, which is already in the schema.

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

Purpose4/5

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

The description clearly states 'Compile a LaTeX document using latexmk' and lists the two input modes (raw source or file path), making the core purpose unambiguous. However, it does not explicitly distinguish itself from the sibling latexmk_draft_compile, missing the opportunity for full sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like latexmk_draft_compile, latexmk_watch_start, or latexmk_check. It only mentions input options, not decision criteria for tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/coolport/latexmk-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server