MCP server providing knowledge base search, document ingestion, and management tools for multi-tenant RAG systems with vector embeddings
Five tools with complete schemas, descriptions, and proper parameter typing. All tools have verb-noun naming (search_, ingest_, reindex_, delete_, health). Descriptions are clear and action-oriented (avg ~120 chars). Input schemas use Pydantic with proper constraints (minLength, maxLength, pattern, format). Tool annotations present (readOnlyHint, destructiveHint, idempotentHint). Key gaps: output schemas not documented in code; error handling is generic (ToolError wrapping); no pagination support for search_documents despite potentially large result sets; health tool lacks parameter descriptions in schema.
Permanently delete one document and all its chunks from the tenant knowledge base. The document is treated as not found when it belongs to another tenant or scope.
Check the health status of the knowledge base and all dependencies.
Add plain text knowledge to one tenant and scope. Use this for small or already-extracted text documents only. Do not use this tool for PDF uploads, OCR, or large file ingestion.
Rebuild vector embeddings for one existing document inside the provided tenant and scope. Use this after vector-store repair or embedding configuration changes. The document is treated as not found when it belongs to another tenant or scope.
Search already-ingested internal knowledge for one tenant and scope. Use this tool when an agent needs evidence from the shared knowledge base before answering. This tool never searches outside the provided tenant_id and scope.
Output schemas not documented. search_documents returns dict with 'results' array, but structure of result items (fields, types) is not declared in tool definition. LLMs cannot plan downstream operations without knowing response shape.
search_documents lacks pagination. No limit/offset or cursor parameters visible; top_k defaults to settings.search_top_k but no max enforced. Large result sets risk context window exhaustion.
Error messages are generic. _raise_tool_error maps exceptions to codes (DOCUMENT_NOT_FOUND, VALIDATION_ERROR, STORAGE_ERROR) but does not include the invalid value or constraint violated. LLMs cannot self-correct without specifics.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2026-07-28+ | v2 |
health tool description is minimal (12 chars: 'Check the health status...'). No guidance on when to call it, what constitutes 'healthy', or what to do if unhealthy. Parameter descriptions missing entirely.
No dry-run or confirmation step for destructive operations (delete_document). Agents can permanently delete documents without a safety gate. Consider adding a 'confirm' parameter or separate confirm_delete tool.