MCP server for document management with read, edit, and formatting capabilities
DocumentMCP has two tools with complete input schemas and adequate descriptions, but critical gaps in output documentation, error handling guidance, and parameter type specificity reduce quality significantly. Tool names follow verb-noun convention (read_*, edit_*), which is good. However, descriptions lack the depth needed for robust LLM selection, and the server provides no guidance on error recovery or output structure. The edit_doc tool modifies state but does not clearly document this in its description. No return type schemas are documented for either tool, violating a baseline requirement for A+ tools (100% documented return types). Descriptions meet minimum length (both ~50-80 chars, within the 10-1024 char baseline range, but below the p50 of 194 chars), and all parameters have type annotations and descriptions, which is positive. However, the edit_doc tool's return value is commented out (line 45 in mcp_server.py), suggesting incomplete implementation or testing. The server implements resources and prompts (useful for discoverability) but lacks tool annotations (readOnlyHint, destructiveHint) that would signal to the LLM which tools are safe vs. destructive, a significant oversight for a tool set with read vs. write operations.
Edit a document by replacing a string with another string
Read the contents of a document and return it as a string
No output/return type documentation for either tool. Baselines show 100% of A+ tools document return types. LLMs cannot plan downstream operations or format results without knowing what fields to expect.
edit_doc description does not explicitly state that it modifies state (creates, updates, deletes, sends). Agents need to know which calls are irreversible for safe planning. Description should say 'Modifies a document by replacing text' rather than just 'Edit a document...'.
Missing tool annotations (readOnlyHint, destructiveHint). read_doc_contents should be marked readOnly=true; edit_doc should be marked destructive=true. These hints help LLMs reason about safety and side effects.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Error messages lack recovery guidance. edit_doc throws 'String not found' or 'Document not found' but does not tell the LLM what to do next (e.g., 'Call read_doc_contents first to view the document and find the exact string to replace'). Baselines require actionable error guidance per pattern:recovery-guide.
edit_doc return value is commented out (line 45: '# return f"Document..."'). No explicit return statement means the function returns None, which gives the LLM no feedback on success. Should return a structured result: {"doc_id": str, "status": "success", "message": str}.
No parameter constraints documented for string parameters. old_string and new_string lack guidance on max length, encoding, or special character handling. Per baselines, parameter descriptions should include format, range, and constraint details.
Descriptions are generic and lack context on when to use each tool. 'Read the contents of a document and return it as a string' tells the LLM WHAT but not WHEN or WHY compared to the available resource 'docs://documents/{doc_id}' which serves the same purpose. Descriptions should clarify why a tool differs from available resources.