Skip to main content
Glama

ZeroWidth

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

TableJSON 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.3/5.0
Behavior4/5

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

Annotations already cover read-only and non-destructive status, and the description adds genuinely new context: semantic mode spends workspace credit, keyword is free and case-insensitive, and hits carry text, document, and score. It stops short of describing limits on behavior such as indexing freshness or empty-result handling.

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?

Three dense sentences with no filler; the core primitive statement, mode behavior, and kbId source are all front-loaded and each sentence earns its place.

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 compensates by describing the return shape (chunk text, document, score, and score scale per mode). Combined with the workspace-credential note in the schema, an agent has everything needed to call it correctly.

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 description coverage is 100%, so the schema already documents kbId, mode, limit, query, and workspace. The description restates mode defaults and clarifies score semantics, but adds little parameter detail beyond what the schema provides, so baseline 3 applies.

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 (retrieves) and resource (most relevant chunks from one knowledge base) and frames it as the core RAG primitive. The scoping to 'one knowledge base' distinguishes it from the broader search_docs/search_workspace siblings.

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?

Explicitly explains the mode tradeoff (semantic embeds and ranks by meaning, keyword is free substring match) and points to workbench_kb_list for obtaining a kbId. It does not, however, say when to prefer this tool over search_docs or search_workspace, leaving that boundary to inference.

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