MCP server for searching documentation across multiple libraries (Django, PostgreSQL, LangChain, LLaMA Index, OpenAI) using web search and HTML extraction
Single tool (get_docs) with basic documentation but significant gaps in schema completeness, parameter descriptions, output structure, and error handling. Tool definition is directly visible in source code via @mcp.tool() decorator. Naming is acceptable (verb-noun pattern), but descriptions lack depth, parameter descriptions are minimal, and there is no documented output schema. Return type is a bare string (either unstructured text blob or 'No results found'), which violates structured output expectations. No error recovery guidance, no pagination support despite potentially large result sets, and hardcoded library list invites hallucination.
Search the docs for a given query and library. Supports django, postgreSQL, langchain, llama-index and openai.
Output schema is not documented. Function returns unstructured string (concatenated raw HTML text or 'No results found'). LLMs cannot plan downstream steps, extract metadata, or structure the response for the user. Violates pattern:response-shaper.
Parameter descriptions are too brief and lack actionable constraints. 'query' description says only 'The query to search for (e.g. "Chroma DB")', no guidance on format, length, or special characters. 'library' description merely lists supported values inline; should be an enum constraint in the schema. Examples ('Chroma DB', 'langchain') risk being reused literally by LLMs rather than treated as illustrative.
Library parameter should be declared as an enum (django, postgresql, langchain, llama-index, openai) rather than free-form string. Current implementation raises ValueError at runtime for unsupported values, but LLMs cannot discover valid options until they fail. Enums are self-documenting and eliminate guessing.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 41 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 38 | - | v1 |
No pagination support. Tool concatenates all fetched text into a single string returned to the LLM. If documentation pages are large, this can exhaust context windows. No limit parameter, no offset/page support, no indication of truncation. Pattern:paginated-result requires result limiting and pagination.
Tool description is generic and under-documents use cases and constraints. It does not explain when to call this vs. other documentation tools, what the output structure is, or what the LLM should do with the returned text. Also does not mention that results are capped at 2 pages (num=2 in search_web). Current 76-char description is borderline, closer to lower end of acceptable range (10 - 1024 chars baseline, ~194 chars average for A+ tools).
Error handling is minimal. ValueError for unsupported library is raised but does not provide recovery guidance to the LLM (e.g., 'Did you mean: django, postgresql, langchain, llama-index, openai?'). Timeout errors in fetch_url return bare 'Timeout error' string. No distinction between retryable vs. fatal errors. Pattern:recovery-guide requires actionable error messages.
SERPER_API_KEY is injected via environment variable (correct pattern), but no validation that it is present before the tool runs. If missing, httpx will fail with an authentication error. Should fail fast with a clear message: 'SERPER_API_KEY not configured' before attempting any search.
Result set is hardcoded to 2 pages (num=2 in search_web). This is arbitrary and not exposed as a parameter. LLM has no control over result depth. Should either be a tunable parameter with documented limits or clearly stated in the tool description as 'Returns up to 2 documentation pages.'