Skip to main content
Glama

retrieve_qa_knowledge

Retrieves grounded QA knowledge chunks from a local Markdown knowledge base covering testing standards, methodologies, audit frameworks, and AI-SDLC case studies to support evidence-based answers.

Instructions

Retrieve grounding chunks from the local QA knowledge base (Markdown guides: testing methodologies, IEEE/ISO/OWASP Markdown standards, audit/evaluation frameworks, AI-SDLC case studies, the EU AI Act). NOT included: the ISTQB and OWASP PDF syllabi (licensing) - so fundamentals such as test design techniques (boundary value analysis), smoke vs sanity or test levels are often absent; the first call after server start may take ~30s while the index builds (usually done in the background by then). Returns {"chunks": [{"source", "category", "text", "score", "match"}], "kb_version", "best_score", "low_relevance"[, "note"][, "warnings"]}; "match" is strong (score >=0.55 AND the chunk contains most of the query's content terms), moderate (>=0.40) or weak, and when even the best chunk is not strong a note says to use only chunks that really answer the question (a 0.45 hit on an unrelated case study is vocabulary overlap). A query that names a source the KB does not ship (e.g. ISTQB) gets a note saying so; an out-of-range k is clamped and reported in "warnings". Chunks scoring below min_score (cosine similarity, default 0.40, 0 disables) are dropped; if nothing reaches it, chunks is empty, low_relevance is true and note says so - then answer from your own knowledge and tell the user the KB had no match (best_score shows how close the best miss was). Near-duplicate overlapping chunks of one document are collapsed. category, if given, must be one of: Standard, Methodology, Article, Expert Knowledge, Audit/Evaluation; an empty query, an unrecognized category or an out-of-range min_score returns a structured {"error": "invalid_argument", ...} rather than raising. k is clamped to [1, 20].

Input Schema

NameRequiredDescriptionDefault
kNo
queryYes
categoryNo
min_scoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / min_score
      Added value: +{
      +  "default": 0.4,
      +  "title": "Min Score",
      +  "type": "number"
      +}
  2. First observedv3.1.4

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: cold-start latency (~30s on first call after server start), a documented return shape including match-tier logic (strong >=0.55 plus content-term overlap, moderate >=0.40, weak), near-duplicate collapse, clamping of k and out-of-range min_score reported in warnings, and structured {error: invalid_argument} instead of raising. These are exactly the operational traits an agent cannot infer from the schema.

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

Conciseness4/5

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

The most important facts (what corpus, what is missing, cold start) are front-loaded before the return-shape detail, and nearly every clause conveys usable information. It is dense and parenthetical, however, and the return-shape/error discussion runs together rather than being segmented, which costs some scannability.

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?

There is no output schema and no annotations, so the description must explain return values and failure modes — it documents the chunk fields, best_score, low_relevance, note and warnings, plus the empty-result path. For a 4-parameter retrieval tool with no structured metadata, nothing an agent needs in order to call and interpret it is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and it does: k is clamped to [1,20], min_score is cosine similarity with default 0.40 where 0 disables filtering, category must be one of five enumerated values, and an empty query or bad category returns a structured error. This adds real semantics beyond the bare titles in the schema.

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?

States a specific verb+resource ('Retrieve grounding chunks from the local QA knowledge base') and immediately scopes the corpus by enumerating included guide types and explicitly excluded sources (ISTQB/OWASP PDFs). This tells an agent both what the tool returns and where its coverage boundary lies, which sets it apart from list_kb_sources.

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 conditional guidance: when no chunk clears min_score, 'answer from your own knowledge and tell the user the KB had no match', and when the best hit is not strong, use only chunks that really answer the question. It also warns that fundamentals like boundary value analysis are often absent, steering the agent away from futile queries. It does not explicitly contrast itself with list_kb_sources or the analysis siblings, which keeps it from a 5.

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