Agent-grade document production MCP server powered by Typst
DocForge demonstrates solid tool design with clear naming (verb_noun pattern), comprehensive descriptions (avg 180 chars), and well-structured schemas using Zod. All 13 tools have descriptions and input schemas. However, output schemas are not explicitly documented in the visible code, responses are wrapped in generic {content:[{type:text, text:JSON}]} without formal schema declarations. Parameter descriptions are present but some lack constraint details (e.g., dpi range, page array bounds). Error handling descriptions exist but lack recovery guidance. Tool composition is strong, each tool has a single responsibility and clear sequencing (list→schema→create→compile→export). Security is well-considered with no exposed secrets in parameters.
Compare two document versions — returns data diff and section changes.
Compile document to PDF and PNG previews (synchronous). Returns compile_history, layout_issues, suggested_repairs on failure. For very large documents that may exceed a client timeout, use docforge_compile_document_async (MCP Tasks).
Compile document via MCP Tasks — for large documents that may exceed a client timeout. Same result shape as docforge_compile_document. Poll the task for completion.
Creates a document from template + validated JSON data. Returns document_id (required for compile, preview, export). Expires after 24h idle. WHEN TO USE: After docforge_get_template_schema, when structured data is ready. ON FAILURE: schema_error with agent_action — fix fields before compile.
Export final artifacts: pdf, typ, json, png_preview paths.
Return JSON Schema, README, and sample data for a template. Most important tool — teaches the agent what JSON to produce.
Output schemas not formally documented. Tools return generic {content:[{type:text, text:JSON}]} without declaring the structure of the JSON payload. LLMs cannot plan downstream calls without knowing what fields to expect.
Parameter constraints incomplete. dpi parameter lacks min/max bounds; pages array lacks item type and bounds; repair tokens lack enum or pattern specification. Descriptions state 'positive integer' but JSON Schema should enforce via minimum/maximum.
Error recovery guidance missing. Descriptions mention 'schema_error with agent_action' and 'suggested_repairs' but do not explain what the LLM should do next. No actionable error messages visible in code.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | 2026-07-28+ | v2 |
Run lint checks (unfinished markers, empty sections, page budget, template rules). Always call before export. Returns suggested_repairs when fixes are available.
List available DocForge templates with id, version, description, page budget, and required inputs. Use first to pick a template.
Return page previews as base64 PNGs for visual QA before export. Requires prior compile.
Apply deterministic data repairs (rename_field, add_default, remove_empty_section, etc.). Does not compile — call docforge_compile_document after repairs.
Snapshot current document data as a new document_version for comparison.
Refresh template Typst files in workspace to target version. Does not recompile.
Run visual QA on compiled document — compare against golden baseline, return diff regions and pass/fail.
Tool annotations missing. No readOnlyHint, destructiveHint, or idempotentHint declared in tool registration. Agents cannot infer which tools are safe to retry or have side effects.
Pagination not documented. Tools like docforge_list_templates may return large result sets but no limit, offset, or cursor parameters are visible. Risk of context window exhaustion.