Skip to main content
Glama
adyoi
by adyoi

knowledge_search

Search stored documents using hybrid semantic and keyword ranking to retrieve relevant chunks with scores; tune alpha or enable explain to diagnose and balance results.

Instructions

Hybrid semantic + keyword search over stored documents. Returns chunks ranked by relevance with scores. Set explain to see per-leg scores (vector cosine, keyword BM25, RRF contribution) and diagnose ranking. Optional alpha (0..1) tips the balance: 0 = keyword-only, 1 = vector-only, in between blends 'alpha * cosine + (1-alpha) * BM25'. Default uses Reciprocal Rank Fusion.

Input Schema

NameRequiredDescriptionDefault
alphaNoDirectional blend 0..1 (0 = keyword, 1 = vector); omit for default RRF hybrid
queryYes
top_kNo
doc_idNoOnly search within this document
sourceNoOnly search documents with this source (e.g. 'opencode-db', 'session-log')
explainNoInclude per-leg vector/keyword/RRF scores on every hit
min_scoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does reasonably well: it discloses the default ranking strategy (Reciprocal Rank Fusion), the alternative scoring path, and that hits are returned as ranked chunks with scores. It stops short of permissions, failure modes, or pagination/result-size behavior, but the core behavioral mechanics are stated.

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?

Dense and front-loaded: purpose first, then return shape, then the two tuning knobs. Every sentence carries information, though the inline formula is slightly heavy for a description and could be tightened.

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?

For a 7-parameter retrieval tool with no output schema and no annotations, the description covers the return format, the default ranking behavior, and the two most important tuning controls. The gaps (top_k, min_score semantics, sibling disambiguation) are moderate but the essential information an agent needs to call it correctly is present.

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 57%, so the description should compensate. It adds real meaning for alpha (the explicit blend formula) and explains is covered in both places, but top_k and min_score receive no semantics in either the schema or the description. That leaves two numeric tuning parameters undocumented, limiting the value added.

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 opens with a specific verb and resource: 'Hybrid semantic + keyword search over stored documents,' immediately telling an agent this is a retrieval tool combining two search modes. It is clear on its own, but it never distinguishes itself from close siblings like knowledge_retrieve or memory_recall, leaving sibling selection to inference.

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?

It explains how to tune a search (explain for diagnosis, alpha for balance) but never states when to reach for this tool versus knowledge_retrieve, memory_recall, or retrieve_exemplars. There is no when-not-to-use guidance or prerequisite context, so routing among the many retrieval siblings rests entirely on the caller.

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