A Model Context Protocol server for LaTeX file creation and editing
This LaTeX MCP server has visible tool definitions with schemas and descriptions, but exhibits several moderate-to-significant quality gaps. All 7 tools are properly registered with JSON Schema input definitions and non-empty descriptions. However, descriptions are generic and lack actionable guidance for LLM selection. Parameter descriptions are sparse or missing context (e.g., 'Path where the LaTeX file should be created' lacks format expectations, security constraints on path traversal). Output schemas are entirely undocumented, callers have no formal specification of return types, fields, or data structures. No error recovery guidance, no idempotency declarations, and no security constraints documented (path traversal risks are real given base_path validation is in __init__ but not per-call). Tool naming is clear and verb-forward (create_, edit_, read_, list_, validate_, get_, compile_), meeting baseline standards. The server spans 7 tools with moderate composition but lacks output specifications, rate limiting, and comprehensive parameter validation messaging.
Compile a LaTeX file to PDF using pdflatex. Requires LaTeX distribution installed.
Create a new LaTeX document with specified content and structure
Edit an existing LaTeX file by replacing content or inserting new content
Extract the structure of a LaTeX document (sections, subsections, etc.)
List all LaTeX files in a directory
Read and return the contents of a LaTeX file
Perform basic LaTeX syntax validation on a file
No output schemas documented for any tool. Callers cannot infer what fields to expect, breaking downstream tool chaining and forcing LLMs to guess field names.
Parameter descriptions lack format constraints and validation rules. E.g., 'file_path' does not specify: allowed/forbidden characters, max length, or that path traversal is rejected. LLMs cannot self-correct invalid paths.
Tool descriptions are generic and do not explain WHEN to use each tool vs. alternatives, or what consequences follow (e.g., create_latex_file vs. edit_latex_file for new content). LLMs lack selection guidance.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 52 | <=2025-11-25 | v2 |
No error handling guidance. Tools will fail with default Python exceptions, leaving LLMs with stack traces instead of actionable recovery steps (e.g., 'file_path must be within home directory, did you mean /home/user/...?').
Destructive operations (create_latex_file, edit_latex_file, compile_latex_to_pdf) have no confirmation or dry-run mode. Agents can overwrite files without safeguards.
edit_latex_file operation logic is ambiguous: 'search_text' is optional but required for some operations ('replace', 'insert_before', 'insert_after'). Dependency undocumented; LLMs may pass both line_number and search_text, causing confusion.
Base path validation (home_dir restriction) is enforced in __init__ but not documented as a per-call constraint. Tool descriptions do not warn that absolute paths outside home will be silently redirected, breaking agent expectations.
No pagination or result limiting for list_latex_files. Recursive search in a large directory tree could return thousands of results, exhausting context window and degrading LLM reasoning.