Skip to main content
Glama
phillipkaraya

rageval-mcp

evaluate_retrieval

Read-onlyIdempotent

Score retrieval methods against labeled questions by averaging four ranking metrics (recall@k, precision@k, MRR@k, nDCG@k) to quantify retrieval quality.

Instructions

Score one retrieval method against the labeled question set.

Runs every labeled question through the chosen retriever and averages four ranking
metrics, so you can put a number on retrieval quality instead of eyeballing it.

Args:
    method: Which retrieval strategy to score (default 'hybrid').
    k: The cutoff for recall@k, precision@k, and nDCG@k (1 to 20, default 3).

Returns:
    MetricsOut with fields: method, k, n_questions, recall_at_k, precision_at_k,
    mrr_at_k, ndcg_at_k. Each metric is in the range 0.0 to 1.0.

Raises:
    A tool error if method='dense' and the optional dense extra is not installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoRetrieval strategy to score: 'bm25', 'tfidf', 'dense', or 'hybrid'.hybrid
kNoCutoff k for recall@k, precision@k, and nDCG@k.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYes
kYes
n_questionsYes
recall_at_kYesFraction of relevant docs found in the top k.
precision_at_kYesFraction of the top k that are relevant.
mrr_at_kYesMean reciprocal rank of the first relevant doc within k.
ndcg_at_kYesNormalized discounted cumulative gain at k.
Behavior4/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true. The description adds that it raises a tool error if the dense extra is missing, which is a behavioral disclosure beyond annotations.

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 concise with no unnecessary words, front-loaded with the main purpose, and includes Args and Returns sections for clarity.

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

Completeness5/5

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

The tool has only 2 parameters, complete schema coverage, and the description explains the return fields, error conditions, and metrics. It is fully complete for its complexity.

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 coverage is 100% and the description repeats the parameter defaults and ranges without adding new semantics. Baseline 3 is appropriate because the schema already provides full details.

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 starts with 'Score one retrieval method against the labeled question set,' which uses a specific verb and resource, clearly distinguishing it from siblings 'compare_methods' and 'retrieve'.

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 explains that the tool evaluates a single method and provides default parameters, and it warns about a potential error when method='dense' without the optional extra. However, it does not explicitly contrast with siblings or state when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phillipkaraya/rageval-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server