Skip to main content
Glama

Search a knowledge base

workbench_kb_search
Read-only

Retrieves the most relevant chunks from one knowledge base — the core RAG primitive. mode:"semantic" (default) embeds the query and ranks by meaning (spends a small amount of workspace credit); mode:"keyword" is a free case-insensitive substring match. Each hit carries the chunk text, its document, and a score (cosine similarity 0-1 for semantic, match count for keyword). Get a kbId from workbench_kb_list.

Input Schema

NameRequiredDescriptionDefault
kbIdYesKnowledge base id (from workbench_kb_list).
modeNosemantic (embed + rank by meaning, default) or keyword (free substring match).
limitNoMax hits to return, 1-50. Default 10.
queryYesWhat to search for.
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this. Ignored for workspace API keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations by disclosing the credit cost of semantic mode versus the free keyword mode, and by describing the return payload and scoring semantics (cosine 0-1 vs match count). These are operational traits an agent cannot infer from the schema or annotations.

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?

Leads with the core purpose, then mode behavior, then return shape, then the prerequisite for obtaining kbId. Every sentence carries distinct information and the ordering follows how an agent would reason about invoking it.

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?

With no output schema, the description explicitly covers return values (chunk text, document, score) and their interpretation, and covers the two meaningful invocation choices (mode, kbId source). Nothing an agent needs to call it correctly is missing.

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%, so the baseline is 3, but the description adds meaning beyond the schema by tying mode to cost ('spends a small amount of workspace credit' vs 'free') and by clarifying the score interpretation per mode. The workspace parameter is left to the schema, keeping it from a 5.

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 and resource ('Retrieves the most relevant chunks from one knowledge base'), and further anchors it as 'the core RAG primitive'. It is clearly distinguishable from siblings like workbench_kb_documents_list or workbench_kb_get, which enumerate or fetch rather than rank-retrieve.

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 routing context: 'Get a kbId from workbench_kb_list', and explains the semantic-vs-keyword tradeoff (credit cost vs free substring match) that governs mode choice. It lacks an explicit statement of when NOT to use this in favor of another retrieval tool, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources