MCP server - Generador de documentos Word desde Markdown (via pandoc)
Single tool with adequate schema and description, but significant gaps in error handling, parameter validation, and composition patterns. Tool name is clear (generate_word_document) and description is substantial (280+ chars), covering what it does and prerequisites. Input schema includes 4 parameters with types and descriptions. However, error handling is minimal (returns plain strings, no recovery guidance), no input validation constraints documented, and no output schema formally defined. The tool performs a single, focused action (good), but lacks production-grade robustness expected for file-writing operations.
Genera un documento Word (.docx) a partir de texto en formato Markdown. Usa pandoc internamente, por lo que soporta la gama completa de Markdown: encabezados, párrafos, negrita, cursiva, tachado, listas, tablas, bloques de código con resaltado de sintaxis, citas, notas al pie, imágenes (rutas locales), matemáticas LaTeX, y más. IMPORTANTE: Cuando esta herramienta devuelva el resultado, debes informar al usuario exactamente la ruta completa del archivo generado para que pueda abrirlo desde su explorador de archivos o con doble clic.
Error handling returns plain strings with no recovery guidance. Errors like 'pandoc no encontrado' or 'Error al generar el documento: {exc}' do not tell the LLM what to do next or how to self-correct.
Output schema not formally documented. Tool returns a plain string with file path and size, but LLMs cannot reliably parse unstructured text to extract the path for downstream use. Should return structured JSON with {path, size_kb, success}.
Parameter constraints not documented. 'markdown_text' has no length limits; 'filename' has no character restrictions stated; 'output_dir' has no validation that it exists or is writable. LLMs will pass arbitrary values.
No input validation or sanitization visible in code. Path traversal via 'output_dir' or 'reference_docx' is possible if an LLM passes '../../../etc/passwd'. Filename sanitization exists but is minimal.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2026-07-28+ | v2 |
Pandoc dependency resolution is fragile and Windows-specific. If pandoc is not found, the error is silently swallowed (pass in try/except), and the tool will fail at runtime with a cryptic pypandoc error instead of a clear setup message.