A MarkLogic MCP server for document management and search operations
This MCP server exhibits multiple definition quality gaps that significantly limit production readiness. All 5 tools are explicitly defined with registered names and basic descriptions, but lack rigor in critical areas. Tool descriptions average ~45 characters (far below the 194-char baseline), omitting key context like when to use each tool, error modes, and prerequisites. Parameter descriptions are minimal or absent in several cases. Output schemas are completely undocumented, callers have no way to predict response structure, forcing LLMs to parse unstructured string responses that could break downstream tool composition. Error handling returns plain error strings with no recovery guidance, violating the recovery-guide pattern. No input validation is visible, and sensitive operations (delete_document) lack confirmation or dry-run support. The 'content' parameter in create_document accepts 'any' type without schema constraints, inviting hallucinated values. The resource endpoint get_collections() is present but underutilized, no tools return collection metadata that would enable smarter searches. Naming is adequate (verb_noun convention) but descriptions fail to justify tool selection or explain failure modes.
Create a new document in MarkLogic Args: uri: Document URI content: Document content (will be converted to appropriate format) collection: Optional collection to add the document to
Delete a document from MarkLogic by URI
Read a document from MarkLogic by URI
Search for documents in MarkLogic Args: query: Search query string collection: Optional collection to search within
Update an existing document in MarkLogic Args: uri: Document URI content: New document content (JSON or string)
No output schema documentation. All tools return untyped strings (JSON-dumped or plain text), forcing LLMs to parse and guess structure. Downstream tools cannot rely on predictable response fields.
Descriptions severely undersized (20 - 50 chars). Most provide only what the tool does, not WHEN to call it, what it requires, or how it fails. Baseline for A+ tools is 194 chars. Example: 'Read a document from MarkLogic by URI' omits error conditions, URI format requirements, and distinction from search_documents.
Destructive operation (delete_document) has no confirmation, dry-run, or safety check. LLMs can permanently delete data without reversibility. No recovery guidance in error responses.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 41 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 43 | - | v1 |
Error handling returns raw exception strings (e.g., 'Error creating document: {str(e)}') with no actionable recovery guidance. LLMs cannot determine if errors are retryable, whether to ask the user, or what went wrong.
'content' parameter in create_document and update_document accepts type 'any' with minimal constraints. No schema, format, or size limit guidance. LLMs will hallucinate invalid payloads.
No pagination support in search_documents. Hardcoded pageLength=100 with no offset/limit parameters or total count in response. Large result sets blow context window; agent has no way to iterate.
Credentials (ML_HOST, ML_PORT, ML_USER, ML_PASSWORD) hardcoded in server.py with localhost defaults. While the Dockerfile shows env var support, the Python code does not read environment variables, it uses hardcoded values.
No logging or audit trail. Agent actions (who called what, when, outcome) are not tracked. Compliance and debugging severely hampered.
Parameter descriptions are missing or trivial. 'Document URI' tells the LLM nothing about format (e.g., must it be URL-encoded? what is the namespace?). 'Search query string' doesn't explain the query language (MarkLogic XPath? plain text?).