Render a document to PDF
render_documentCompiles a document you wrote — LaTeX, Typst or Markdown — to a PDF, files it in this account's own storage, and returns a link the user can open (it lasts about six days).
latex is real TeX (Tectonic, XeTeX underneath): journal and conference classes such as IEEEtran, acmart and elsarticle set the page as they would on the author's machine, and BibTeX bibliographies are built. The source is the main .tex; put the rest of the project — chapters, a refs.bib, a .cls — in files, and images either as base64 in files or as assets URLs. Shell escape is off, so minted does not run (use listings); biber is not available (use BibTeX). The first compile of a rarely used package can take a minute while it is fetched.
typst is a complete Typst document; packages from Typst Universe (#import "@preview/…") work. markdown is set in a clean report style, with LaTeX maths in $…$ and $$…$$.
If the source does not compile, the compiler's own message comes back — for LaTeX, the line that failed: fix the source and call again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A file name for the PDF, without extension, e.g. 'thesis-chapter-2'. Optional. | |
| files | No | LaTeX only: the rest of the project beside the main file. Each {path, text} for a .tex, .bib, .cls or .sty, or {path, base64} for an image or other binary file. Paths are relative, as the source refers to them, e.g. chapters/intro.tex or figures/plot.png. | |
| assets | No | Files the source refers to by relative path, fetched before compiling (latex or typst). Each {url, path}: a public https URL and the path the source uses, e.g. {"url": "https://example.org/plot.png", "path": "figures/plot.png"}. | |
| format | Yes | latex, typst or markdown. | |
| source | Yes | The whole document, as text — for latex, the main .tex file. | |
| context | No | Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution." | |
| llm_model | No | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. |