---
title: Tool: search_knowledge_base
url: https://docs.kaltura.com/docs/tools-skills-mcp/conversational-agents-mcp/conversational-agents-mcp-search-knowledge-base
---

## Tool: search_knowledge_base

Semantic search over the knowledge indexed for the intellect.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | string | Required | What to search for |
| `top_n` | integer | 5 | Maximum number of results |
| `margins_in_seconds` | integer | 15 | Seconds of context added before and after each matching video segment |
| `include_sources` | boolean | false | `false`: one merged block of text. `true`: one block per result, with its entry ID and time range. |

### What It Returns

The result is always text:

* By default: the matching content merged into one block of text.
* With `include_sources: true`: one block per result, headed `[<entry ID> <start>s-<end>s]`.
* `No relevant information found in the knowledge base.` when nothing is relevant enough.
* `Sorry, I couldn't find relevant information in the knowledge base.` on any server error, including a KS that matches no active intellect. If every query returns this, check the KS privileges first.

### Example Call

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "search_knowledge_base",
    "arguments": { "query": "adaptive bitrate streaming", "top_n": 3, "include_sources": true }
  }
}
```

### Example Prompts

Once it is connected to Claude:

* "Search the knowledge base for how SSO login is configured. Cite the entry IDs and timestamps."
* "What do our training videos say about adaptive bitrate streaming?"
