Skip to main content
Glama

Render LaTeX preview

render_preview

Compile LaTeX to PDF and update live preview locally. Uses local TeX or bundled WASM, returns compile status and preview URL.

Instructions

Compile the current project's LaTeX to a PDF locally and update the live preview. Uses the machine's TeX install when it has one, otherwise a bundled WASM TeX Live in a headless browser — so no local TeX is required. Returns compile success/errors, which engine and backend ran, the file count, and the local preview URL — open it to see the rendered pages. Call this after editing .tex files to see and verify the rendered result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engineNoTeX engine. Defaults to xelatex.
backendNoCompiler backend. Default "auto": use the local TeX install (latexmk) when there is one — full package fidelity, output matching Overleaf — else the bundled WASM TeX Live. "system" forces the local one and errors if absent; "wasm" forces the bundled one.
mainFileNoPath to the main .tex file, relative to the project root. Auto-detected (by scanning for \documentclass) if omitted.
shellEscapeNoLet the document run external programs (LaTeX shell-escape) — needed by \includesvg (Inkscape), minted (Pygments) and similar. Off by default: it lets a .tex execute shell commands, so enable it only for sources you trust. Has no effect on the wasm backend, which cannot run subprocesses at all.
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It reveals key behaviors: uses local TeX or WASM, updates live preview, returns compile success/errors, engine, backend, file count, and preview URL. There is no mention of destructive actions, but that aligns with a preview tool.

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 description is efficiently structured: first sentence states purpose, second explains backend, third lists returns, fourth gives usage advice. It contains no fluff, though some sentences are slightly long. Every sentence contributes value.

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?

Given no output schema, the description adequately explains return values (success/errors, engine, backend, file count, preview URL). It also covers the live update behavior. It does not detail error formatting or edge cases, but covers the essentials.

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 the schema already documents all parameters well. The description adds no significant parameter-specific detail beyond the schema; it only provides general context. Baseline 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 clearly states the tool's action: 'Compile the current project's LaTeX to a PDF locally and update the live preview.' It identifies the specific resource (LaTeX project) and verb (compile/preview), and is well differentiated from sibling tools which are about comments and diffs.

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?

The description explicitly says 'Call this after editing .tex files to see and verify the rendered result,' giving clear usage context. It does not specify when not to use it or provide alternative tools, but siblings are distinct enough to avoid confusion.

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/Still-chowline394/MagicTeX-mcp'

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