MCP server that audits RAG retrieval — logs what chunks the model saw, scores, queries, and sources before any answer was generated.
retrieval-lens defines 4 tools with reasonable structure but exhibits significant gaps in output schema documentation and parameter descriptions. Tool names follow verb_noun convention (retrieval_observe, retrieval_query, retrieval_diff, retrieval_stats) which is clear, but descriptions lack LLM optimization and several parameters are under-documented. Input schemas are present for all tools with proper type definitions, but output schemas are entirely absent from the tool definitions, critical for agent planning. Error handling and recovery guidance is not visible in the codebase. The LlamaIndex adapter example shows practical integration but doesn't improve tool definition quality.
Compare two retrieval runs side by side to find missing chunks, shared chunks, and score movement between runs.
Capture a RAG retrieval run, including query, chunks, scores, sources, and ranks, for later audit and diff workflows.
Replay stored retrieval runs so agents can inspect exactly which chunks, scores, sources, and ranks reached the model.
Aggregate retrieval quality and volume metrics across stored runs, including score distributions, top sources, and daily trends.
Output schemas completely undocumented. No tool defines what it returns, field names, or types. LLMs cannot plan downstream actions or validate responses.
Error handling and recovery guidance absent. No indication how tools fail, what errors mean, or what the agent should do next (retry? try alternative? ask user?).
retrieval_query 'limit' parameter lacks min/max bounds. Description says '0-100, default 10' in natural language but not enforced in schema. Schema should have minimum: 0, maximum: 100.
retrieval_diff 'match_by' enum is documented but schema shows enum values without explicit description of what 'source' vs 'content_hash' matching means in practice.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2025-06-18+ | v2 |
retrieval_observe description mentions 'audit and diff workflows' but does not state clearly that this tool WRITES/MODIFIES state (inserts records). Risk classification (WRITE) is present but not explained in description text.