An MCP server for managing and editing documents with support for reading, editing, and formatting operations
DocumentMCP has two tools with basic schemas and descriptions, but significant gaps limit production readiness. Both tools have descriptions (10-20 chars baseline met), and input schemas are present with typed parameters. However, descriptions lack depth on WHEN to use each tool, error recovery guidance, and parameter constraints. The edit_document tool lacks idempotent/destructive hints. No output schema documentation. Error messages are minimal ('Doc with id X not found' is bare). Tool composition is reasonable (read vs edit separation), but descriptions don't explain prerequisites or dependencies. Naming is clear (verb_noun pattern), but parameter descriptions are sparse. No pagination, no batch operations, no recovery guidance for failed edits.
Edit a document by replacing a string in the documents content with a new string.
Read the contents of a document and return it as a string.
Descriptions lack actionable context. 'Read the contents of a document' (43 chars) does not explain when to call this vs accessing via resources, what format is returned, or error recovery. Baseline: 194 chars avg for A+ tools.
edit_document lacks destructive/idempotent hints. Tool modifies state but has no annotation indicating it is destructive or whether repeated calls with same input are safe. LLM cannot reason about retry safety.
No output schema documented. Callers cannot predict return type structure. read_doc_contents returns a string, edit_document returns nothing, neither is formally declared.
Error handling is bare. ValueError('Doc with id X not found') gives no recovery guidance. Should suggest: 'Doc not found. Call list_docs resource to see available documents.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | <=2025-11-25 | v2 |
edit_document parameter 'old_str' has no constraint on length or special characters. LLM may pass multi-paragraph strings or regex patterns, causing silent failures if exact match fails.