Skip to main content
Glama

brain_quality

Pin a known-good baseline and report retrieval health from query logs—zero-hit rate, average hits, latency, bad-answer feedback, and drift—to detect when answer quality declines.

Instructions

Retrieval health from the query log: zero-hit rate, average hits and latency, bad-answer rate from feedback, plus drift against a pinned baseline. Use action=pin on a known-good day, then action=report to see whether quality slid.

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": {
      "action": "<action>"
    },
    "name": "brain_quality"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesreport = compare to baseline; pin = set it
windowNoqueries per window (default 200)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A3.8/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 burden, and it does disclose what is measured and that drift is computed against a pinned baseline. However, it never states that action=pin writes persistent state, whether pinning overwrites an existing baseline, or whether the operation is read-only for report. Those are the behaviors an agent most needs before mutating a baseline.

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?

Two sentences, front-loaded with the metric list so the agent knows what it gets before the workflow hint. No redundant phrasing and nothing that restates the tool name.

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?

Even without an output schema, the description enumerates the returned measures well enough for an agent to know what to expect. The main gap is the absence of any note on baseline persistence or overwrite semantics, which matters for a tool whose pin action changes stored state.

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%, so both parameters are already documented, including the enum meanings and the window default. The description adds the contextual relationship between pin and report but says nothing about what window actually affects in the output. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

Names a concrete resource (retrieval health from the query log) and enumerates the specific metrics produced: zero-hit rate, average hits, latency, bad-answer rate, and drift against a pinned baseline. An agent can distinguish this diagnostics tool from generic siblings like brain_stats. It stops short of explicitly contrasting itself with any named alternative.

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?

Gives clear operational sequencing: pin on a known-good day first, then report to detect degradation. That tells an agent when each action applies. It does not state when to prefer this tool over sibling diagnostics tools, or what to do when no baseline has ever been pinned.

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