Skip to main content
Glama

Render LaTeX preview

render_preview

Compile LaTeX to PDF and update the live preview, using local TeX or a bundled WASM engine. Get compile status, engine, and preview URL to verify rendered pages.

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, the description carries the full burden and excels: it discloses backend selection logic, shellEscape security implications, return contents, and the fallback behavior when no local TeX is installed. It even notes shellEscape has no effect on the wasm backend.

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 concise at five sentences, covering purpose, backend behavior, return values, and usage context. There is slight redundancy with the backend parameter description, but each sentence earns its place.

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, but the description enumerates exactly what is returned (compile success/errors, engine, backend, file count, preview URL). It also explains mainFile auto-detection and shellEscape security, making it complete for a tool with this complexity.

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?

The input schema already provides full coverage (100%) with detailed descriptions for all four parameters. The tool description adds only that it reports which engine/backend ran, offering no extra parameter semantics, so 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 first sentence states a specific action (compile LaTeX to PDF) and resource (current project) with an outcome (update live preview), clearly distinguishing it from sibling tools that handle diffs and comments.

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?

It explicitly says 'Call this after editing .tex files to see and verify the rendered result,' providing clear when-to-use guidance. It doesn't mention when-not-to-use or name alternative tools, but siblings are functionally distinct.

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

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