MCP server for managing document operations including reading, editing, and viewing documents with support for prompts and resources
DocumentMCP has 2 tools with minimal descriptions and incomplete parameter documentation. Naming is clear (read_doc, edit_doc) and follows verb-noun convention, but descriptions are generic and lack actionable context. Input schemas are present but sparse, parameters have descriptions via Pydantic Field, but no enum constraints, ranges, or format guidance. No output schema documentation. Error handling is rudimentary (returns plain text strings like 'Document not found'). The tools operate on an in-memory dict and lack the robustness expected in production: no pagination support, no structured output, no recovery guidance. Resource and prompt definitions are present but underdeveloped (TODO comments suggest incomplete implementation). Overall quality places this at the bottom of 'fair' (C grade), approaching poor (D).
Edit the contents of a document.
Read the contents of a document.
Descriptions are too generic and lack context. 'Read the contents of a document.' and 'Edit the contents of a document.' do not explain WHEN to use these tools, what they return, or how they differ from resource endpoints. Descriptions should be 50-200 chars and include actionable guidance per pattern:tool-description.
No output schema documented. Callers cannot plan downstream operations or know what to extract from responses. Both tools return either a dict value (string) or a string message. Per pattern:tool, all tools must document their return structure.
Error handling is weak and non-actionable. Plain text responses like 'Document not found.' and 'Old content does not match.' do not guide the LLM on recovery. Per pattern:recovery-guide, errors must include suggestions: 'Document not found. Available docs: [list]. Use list_docs resource to discover doc IDs.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 44 | 2026-07-28+ | v2 |
edit_doc requires exact 'old_content' match, but provides no guidance on how LLMs should obtain the exact current content before editing. This is a hidden dependency that will cause failed edits. Per pattern:tool-description, document dependencies: 'Call read_doc first to get the exact current content, then pass it as old_content.'
No pagination, limits, or structured result. If 'docs' grows large, returning all content unbounded will blow context windows. Per pattern:paginated-result, even simple list tools should accept limit and offset. More critically, no structured output, responses are bare strings, not JSON objects with typed fields.
Parameter 'doc_id' lacks enum constraint. Should be: 'The ID of the document to read. Must be one of: deposition.md, report.pdf, financials.docx, outlook.pdf, plan.md, spec.txt'. Per pattern:constrained-input, enums prevent hallucinated values and are self-documenting.
Prompts (rewrite_doc, summarize_doc) are stubs that simply return the document content unchanged. They lack descriptions explaining their purpose or parameters. Rewrite_doc should describe: 'Takes doc_id and returns the document reformatted in markdown. Use this to prepare docs for structured processing.'
No idempotency or safety guarantees. edit_doc has no confirmation step or dry-run. Per pattern:confirmation-request, destructive operations (writes) should support a dry-run or require explicit confirmation to prevent accidental data loss.