A Model Context Protocol (MCP) server for programmatic creation, modification, and compilation of structured LaTeX documents. Enables AI agents and automated workflows to generate reports, articles, and papers from templates, with secure, structured content updates and robust PDF compilation using LuaLaTeX and Biber.
The DocWriter MCP server has a focused domain (LaTeX document management) with 5 well-intentioned tools. Naming follows verb_noun convention consistently (create, update, search, compile, list). However, critical gaps exist: parameter descriptions are not visible in the provided source code, input/output schemas cannot be verified, and tool descriptions are minimal (10-50 chars observed). The 'searchAndReplace' tool name violates the single-responsibility principle by combining two distinct operations. No evidence of error guidance, output schema documentation, or pagination support despite the READ_ONLY list tool handling potentially large document collections. Schema quality cannot be verified from the registration files shown.
Compiles a LaTeX document to PDF using LuaLaTeX and Biber for bibliography processing
Creates a new LaTeX document from a template with structured content and metadata
Lists all available LaTeX documents in the configured data directory
Searches for text patterns in a LaTeX document and replaces them with new content
Updates a specific block or section within an existing LaTeX document with new content
No input/output schemas visible in provided registration files. Cannot verify parameter types, constraints (enums, patterns, ranges), or required vs optional.
Tool descriptions are below 50 chars and lack WHEN/WHY context. Example: 'Creates a new LaTeX document from a template or blank slate' (58 chars) does not explain template format, required inputs, or distinguish this from update_document_block.
search_and_replace violates single-responsibility principle. Combined 'search AND replace' should be split into two tools: search_latex (discovery) and replace_in_latex (modification). This allows agents to preview matches before committing destructive changes.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-21 | F | 11 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 45 | 2025-03-26+ | v1 |
No confirmation/dry-run pattern for destructive operations. create_latex_document, update_document_block, search_and_replace, and compile_latex_to_pdf all modify state (WRITE risk). Without a dry-run or confirmation step, agents can inadvertently overwrite or corrupt documents.
list_latex_documents provides no pagination, limit, or filtering. If the document directory contains hundreds of files, returning all of them exhausts context and wastes tokens. Should enforce a default limit (20-50) and provide offset/next_cursor for browsing.
No error handling or recovery guidance visible. If compile_latex_to_pdf fails (missing packages, syntax errors, timeout), the response should guide the LLM: 'Compilation failed: missing package babel. Install via \usepackage{babel} or suggest alternative.' A raw error code helps no one.
Parameter descriptions not visible or missing.