Search a knowledge base
workbench_kb_searchRetrieves 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
| Name | Required | Description | Default |
|---|---|---|---|
| kbId | Yes | Knowledge base id (from workbench_kb_list). | |
| mode | No | semantic (embed + rank by meaning, default) or keyword (free substring match). | |
| limit | No | Max hits to return, 1-50. Default 10. | |
| query | Yes | What to search for. | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this. Ignored for workspace API keys. |