A search and ranking utility that simulates enterprise search functionality with semantic similarity scoring, reranking, and grounded answer generation using Cohere-like patterns.
This server exposes a single tool 'search' with a non-standard implementation that simulates semantic search via word overlap rather than actual embedding. The tool definition itself has a description and parameter annotations visible in client.py, but critical quality gaps exist: (1) The input schema shows parameter names and types (query: string, documents: list, top_k: integer) but lacks proper JSON Schema structure with individual parameter descriptions embedded in the schema definition, what is visible appears to be a Python docstring interpretation rather than a formal MCP tool schema registration. (2) The tool description is present (50+ chars) but generic: 'Search documents with semantic ranking and grounded answer generation.' It does not explain when to use this vs other search patterns, what 'grounded' means, or how the output should be interpreted by an LLM. (3) Parameter descriptions are minimal: 'documents' is described as 'List of documents to search (dicts with text and optional title keys, or strings)', adequate but not LLM-optimized; 'top_k' lacks guidance on the impact of different values (3 vs 10 vs 100). (4) No output schema is documented, the return dict includes 'ranked_results' (list of dicts with rank, title, text[:100], embed_score) and 'generated_answer' (string), but there is no formal schema definition visible in the code. (5) The 'text' field is hardcoded to return only the first 100 characters (text[:100]), which truncates information and may confuse LLMs expecting full text. (6) No error handling is visible, what happens if documents is empty? If top_k > len(documents)? The code would silently return fewer results. (7) No validation of inputs, top_k could be negative or zero; query could be null. (8) The 'embed_score' algorithm is a trivial word-overlap heuristic, not actual semantic embedding, which is misrepresented by the tool description claiming 'semantic ranking.' This is a reliability and trust issue. (9) No explicit tool registration visible, the tool definition appears to be inferred from the method signature, not registered via an MCP ToolDefinition structure with proper schema. Code review shows example_usage.py demonstrates calling the client directly, not through an MCP protocol layer.
Search documents with semantic ranking and grounded answer generation. Returns ranked results with embed scores and a generated answer based on the top result.
Tool schema is not formally defined in MCP ToolDefinition format. Only Python method signature is visible. Lack of explicit JSON Schema with parameter type definitions and constraints.
Tool description is generic and does not explain LLM decision criteria. Missing guidance on when to use this tool, what 'grounded answer' means, or expected output structure.
Output schema not documented. Return structure (ranked_results array, generated_answer string, embed_score range, text truncation to 100 chars) is invisible to LLM planning.
Parameter descriptions are minimal. 'documents' format is explained but lacks constraints (max items, required fields). 'top_k' lacks guidance on typical values or performance impact.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 33 | 2026-07-28+ | v2 |
Text field hardcoded to return only first 100 characters (text[:100]). Truncation is not documented and will confuse LLMs expecting full document text.
No input validation or error handling. Missing guards for empty documents, negative top_k, null query. No recovery guidance for common failure cases.
Embedding algorithm is word-overlap heuristic, not actual semantic embedding. Tool description claims 'semantic ranking' but implementation is naive term-frequency similarity. Misleading to LLMs expecting true semantic search.
No access control, audit logging, or permission gates. Tool description does not declare required scopes (e.g., 'read:documents').