Skip to main content
Glama

locus_benchmark

Measure retrieval quality by comparing search results against a JSON QA file, returning Recall@K and MRR to evaluate ranking accuracy.

Instructions

Measure retrieval quality against a JSON QA file. Returns Recall@K and MRR. QA format: [{"query": "...", "expected_docs": ["path/to/doc.md"]}]

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qa_file": "<qa_file>"
    },
    "name": "locus_benchmark"
  }
}

Input Schema

NameRequiredDescriptionDefault
qa_fileYesPath to JSON QA file.
k_valuesNo
store_pathNo.locus

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses the return metrics and the exact QA file format, which is useful. It does not state whether the operation is read-only, whether it runs retrieval against the store at store_path, whether it mutates anything, or what permissions or index state are required.

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?

Three short sentences, front-loaded with the purpose, then the return values, then the input format. Every sentence adds distinct information with no waste.

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?

There are no annotations and no output schema, and the tool has three parameters. The description covers purpose, outputs, and the QA file format, but it omits what store_path selects, how k_values affects the reported metrics, and any side-effect or performance context. It is adequate but leaves gaps an agent would need to guess at.

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 only 33%, so the description must compensate. It adds substantial meaning for qa_file by specifying the JSON array structure with query and expected_docs fields. It adds nothing for k_values (the schema only gives a default) or store_path (the schema only gives a default), leaving the role of the store being benchmarked and the meaning of K values unexplained.

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 states a specific verb and resource: 'Measure retrieval quality against a JSON QA file,' and names the metrics returned (Recall@K, MRR). This clearly separates it from retrieval siblings like locus_retrieve or locus_multi_retrieve, which fetch documents rather than evaluate them. It does not explicitly name an alternative, which keeps it just below a 5.

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

Usage Guidelines3/5

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

Usage is implied by 'measure retrieval quality': an agent can infer this is for evaluation, not routine retrieval. However, the description gives no explicit when-to-use or when-not-to-use guidance, and it does not reference any sibling tool or prerequisite (e.g., needing an indexed store).

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