Skip to main content
Glama

kb_search

Find answers in a knowledge base using lexical, semantic, or hybrid search. Filter by topic and set result count for targeted retrieval.

Instructions

Search knowledge base. Lexical FTS5 (or LIKE fallback) by default; set semantic=true / hybrid=true / search_mode=hybrid to use vector embeddings + RRF fusion (requires LORE_SEMANTIC_SEARCH=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
topicNoFilter by topic
top_kNoNumber of results to return (default 20).
semanticNoForce semantic (vector) search only. Shortcut for search_mode='semantic'.
hybridNoForce hybrid (FTS5 + vector + RRF). Shortcut for search_mode='hybrid'.
search_modeNoExplicit search mode. Overrides semantic/hybrid flags. Falls back to FTS when semantic is unavailable.
session_idNoOptional opaque id linking related searches in one session (retrieval telemetry, issue #5). No effect unless LORE_HARD_NEGATIVE_MINING=true on a PostgreSQL backend.
parent_query_idNoOptional query_id of the search this one re-queries/refines (retrieval telemetry, issue #5).
required_requeryNoOptional hint that this search was a re-query after an unsatisfying prior result (retrieval telemetry, issue #5).
caller_agentNoOptional name of the agent/user issuing the search (retrieval telemetry, issue #5).
Behavior4/5

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

With no annotations, the description fully covers the search algorithm (FTS5, LIKE fallback, vector embeddings, RRF fusion) and conditions for modes. It discloses fallback behavior when semantic is unavailable. Missing details on output format or pagination.

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?

The description is a single, well-structured paragraph that starts with the core purpose and progressively details modes. Every sentence adds necessary information without redundancy.

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?

Despite no output schema, the description effectively covers the tool's multi-modal search capability and telemetry parameters. It lacks mention of error handling or result format, but core functionality is well-covered.

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 100%, baseline 3. Description adds value by explaining default search behavior, the relationship between semantic/hybrid flags and search_mode, and the LORE_SEMANTIC_SEARCH requirement—details not 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?

The description clearly states 'Search knowledge base' and distinguishes default lexical FTS5/LIKE from semantic and hybrid modes. It differentiates from sibling tools like search_local and search_corpora by specifying the knowledge base scope.

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?

The description explains when to use default vs semantic/hybrid modes and mentions the LORE_SEMANTIC_SEARCH requirement. It does not explicitly contrast with alternatives like search_local, but the context makes the scope clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidgut1982/lore-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server