Skip to main content
Glama
admin0330

KnowledgeBase MCP

by admin0330

kb_search

Search a personal knowledge base and retrieve relevant text chunks using keyword, semantic, or hybrid retrieval; use hybrid for natural-language questions.

Instructions

Search the knowledge base and return the most relevant text chunks.

:param query: Natural-language question or keywords (Chinese/English). :param top_k: Number of chunks to return (1-30). :param mode: "keyword" (BM25/substring), "semantic" (embeddings), or "hybrid" (both, rank-fused). "hybrid" is recommended.

Input Schema

NameRequiredDescriptionDefault
modeNohybrid
queryYes
top_kNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 disclosure burden. It does explain what each retrieval mode actually does internally (BM25/substring, embeddings, rank-fused), which is real behavioral value, but it never states that the operation is read-only, says nothing about result ordering/limits beyond top_k, or what happens on an empty or stale index.

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?

Purpose is front-loaded in the first sentence, then each parameter gets one compact line with no filler. The Sphinx :param markup is slightly noisy but does not waste the reader's attention.

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?

An output schema exists, so return-value documentation is not required, and all three inputs are covered including their semantics. The only shortfall is procedural context: no note on whether the index must be refreshed first or how this relates to document-reading siblings.

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?

Schema coverage is 0%, so the description must supply all parameter meaning — and it does: query is a natural-language question or keywords with Chinese/English support, top_k is bounded 1–30, and mode's three values are enumerated with their underlying mechanics plus a recommendation. Only minor gaps remain (no default values restated, no query-length or performance caveats).

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?

States a specific verb and resource — 'Search the knowledge base' — plus the return shape ('most relevant text chunks'). It is clearly distinguishable from siblings like kb_reindex or kb_read_document, though it never names them explicitly.

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?

The only guidance is the recommendation that 'hybrid' is the preferred mode. There is no statement of when to search versus reading a document directly via kb_read_document, nor any prerequisite about index freshness that the presence of kb_reindex/kb_scan_inbox implies.

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