TeX402 LaTeX to PDF Compiler ($0.008 USDC)
tex402_compileCompile multi-file LaTeX (.tex) source to PDF inside TeX402's networkless Docker TeX Live sandbox via POST /v1/compile ($0.008 USDC via x402). Returns a 15-minute PDF download_url, structured diagnostics, and optional 150-DPI PNG page preview image blocks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"main_tex": "<main_tex>"
},
"name": "tex402_compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Optional map of safe relative project paths (e.g. 'refs.bib', 'styles/custom.sty', 'images/fig1.png') to UTF-8 text or 'base64:...' binary payloads | |
| engine | No | TeX engine used for compilation ('pdflatex' or 'xelatex') | pdflatex |
| main_tex | Yes | Root LaTeX document source code (.tex) | |
| bibliography | No | Run multi-pass biber/bibtex bibliography resolution when true | |
| include_page_previews | No | Render 150-DPI PNG page previews and return them as native MCP image/png blocks |