Skip to main content
Glama
chetan1521

grounded-rag-mcp

by chetan1521

evaluate_retrieval

Measure retrieval quality on labeled cases with hit rate, MRR, and recall@k. Quantify search performance and catch regressions before or after changing chunking or embedders.

Instructions

Measure retrieval quality on labeled cases: hit_rate, MRR, and recall@k.

Each case is {query, relevant_sources}. Use this to quantify quality and catch regressions — e.g. before and after changing chunking or switching embedders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNohybrid
casesYes
top_kNo
collectionNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry behavior disclosure. It conveys that the tool measures/evaluates rather than mutates, but it does not explicitly state whether it runs live retrievals against a collection, requires an existing collection, or has side effects. This is adequate but leaves some operational behavior implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two compact sentences: the first states purpose and metrics, the second defines the case structure and provides usage context. Every sentence earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values do not need to be described. The description covers purpose, case format, and usage context, but leaves mode/top_k/collection semantics and behavioral details to the schema or inference. This is adequate for a moderately complex tool, but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the shape of cases as `{query, relevant_sources}` and implicitly connects top_k to recall@k, but it does not explain mode (hybrid/dense/bm25) or collection beyond their enum/default values. The partial compensation keeps it at an adequate 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Measure retrieval quality on labeled cases' and names the concrete metrics hit_rate, MRR, and recall@k. This clearly distinguishes the tool from sibling tools like search (actual retrieval) or answer (generation), establishing it as an evaluation utility.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use it: 'Use this to quantify quality and catch regressions — e.g. before and after changing chunking or switching embedders.' It provides clear context and examples, though it does not mention when not to use it or name alternative tools explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.