A FastAPI-based MCP server that provides document retrieval and question-answering capabilities using vector embeddings, Pinecone vector database, and Hugging Face inference API
Two tools present with basic schemas but significant quality gaps. RetrieverTool has a schema with 'query' and 'k' parameters, but descriptions are minimal (under 100 chars). DocumentSearchTool lacks visible schema definition in provided code. Both tools have generic descriptions that don't explain WHEN to use them or what distinguishes them. No parameter descriptions beyond the query field. No output schema documentation. Error handling is absent from tool definitions. The code shows retriever_tool instantiation but DocumentSearchTool is referenced but not defined in the provided source.
Searches documents using FAISS index and returns relevant results with similarity scores
Retrieves relevant documents from the vector database
DocumentSearchTool schema not visible in source code. Tool is referenced in TOOLS list but no explicit schema definition found in mcp/tools/document_search.py excerpt or mcp_server.py. Cannot verify input parameters, types, or constraints.
Parameter descriptions missing. RetrieverTool's 'k' parameter has no description explaining what 'top results' means or why an LLM should adjust it. 'query' parameter description is empty. LLMs cannot infer parameter semantics from names alone.
Output schema not documented. Neither tool specifies what fields are returned or their types. RetrieverTool returns Document objects with 'content' and 'metadata' fields, but this is inferred from code, not declared in the tool definition. LLMs cannot plan downstream calls without knowing response structure.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 29 | <=2025-11-25 | v2 |
Tool descriptions lack context for selection. 'Retrieves relevant documents from the vector database' does not explain when to use RetrieverTool vs DocumentSearchTool, what 'relevant' means, or what the user gets back. Descriptions should be 50-200 chars and answer WHAT, WHEN, and WHY.
No error handling guidance in tool definitions. The code shows try-catch blocks that print errors and raise exceptions, but tool definitions do not document error cases or recovery steps. An LLM receiving a generic exception has no guidance on what to do next.