Java-based MCP server with RAG capabilities using LangChain4j and Lucene BM25
Single tool with solid fundamentals but moderate limitations. Tool name 'query_knowledge_base' follows verb_noun convention. Description is present (107 chars, within 10-1024 baseline) and explains the function. Input schema has proper types and descriptions for all parameters. However, output schema is not documented in visible source, and error handling guidance is absent. Tool follows read-only safety pattern appropriately.
Query the knowledge base using hybrid search (BM25 + Vector) to find relevant documents
Output schema not documented. Tool description lacks information about return structure (fields, types, pagination behavior). LLM cannot predict downstream tool compatibility or plan result processing.
No error handling guidance. Tool description does not explain failure modes (empty results, invalid query syntax, timeout behavior) or recovery steps. LLM has no context for retry logic.
topK parameter default value (5) is stated in description but not enforced in schema. If LLM omits parameter, behavior depends on implementation, should be explicit in type system.
No range constraints on topK. Unbounded integer could allow LLM to pass absurd values (topK=10000) causing performance issues or timeouts. Should specify min/max (e.g., 1-100).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 6 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 52 | - | v1 |
Parameter naming inconsistency: 'useHybrid' uses camelCase while tool name uses snake_case. Following MCP conventions, should be 'use_hybrid' for consistency across the interface.