Skip to main content
Glama

evaluate_retrieval

Measure retrieval system accuracy by comparing search results against expected documents using MRR@5 and Recall@5 metrics.

Instructions

Evaluate retrieval quality with test queries.

Args:
    test_cases: JSON string of test cases. Format: [{"query": "search term", "expected_filepath": "path/to/doc.md"}, ...]

Returns:
    JSON string with MRR@5, Recall@5, and per-query results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_casesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool evaluates retrieval quality and returns metrics (MRR@5, Recall@5), which gives some insight into output behavior. However, it lacks details on performance aspects (e.g., computational cost, rate limits), error handling, or side effects, leaving significant gaps for a tool that processes test data.

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 highly concise and well-structured: a brief purpose statement followed by clear 'Args' and 'Returns' sections. Every sentence adds value—defining the tool, parameter format, and output—with no wasted words, making it easy to scan and understand quickly.

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

Completeness4/5

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

Given the tool's moderate complexity (evaluating retrieval with test cases), no annotations, and an output schema present, the description is fairly complete. It covers the purpose, parameter semantics, and return values adequately. However, it lacks behavioral details like error conditions or performance implications, slightly reducing completeness for a tool that involves data processing.

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

Parameters4/5

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

The description adds substantial meaning beyond the input schema, which has 0% coverage. It explains that 'test_cases' is a 'JSON string of test cases' and provides a specific format example with 'query' and 'expected_filepath'. This clarifies the parameter's purpose and structure, compensating well for the schema's lack of description, though it doesn't cover all possible edge cases.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Evaluate retrieval quality with test queries.' This specifies the verb ('evaluate') and resource ('retrieval quality'), making it distinct from sibling tools like 'search_knowledge' or 'get_document' that perform retrieval rather than evaluation. However, it doesn't explicitly differentiate from potential evaluation siblings, though none are listed, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing test data), exclusions, or comparisons to other tools like 'search_knowledge' for actual retrieval. The usage is implied through the purpose but lacks explicit context, scoring 2 for minimal guidance.

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/lyonzin/knowledge-rag'

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