search_context
Search documents and retrieve results with adjacent context chunks to provide full context for accurate answers.
Instructions
Search with parent/sibling/child context expansion.
For each result, includes surrounding chunks (context_chunks before and after) so the LLM has full context.
Args: query: Natural language query. k: Number of primary results (max 20). context_chunks: Number of adjacent chunks to include (0-5). source_type: Optional filter: "code", "markdown", or "text".
Returns: List of results, each with a "context" field containing surrounding chunks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| source_type | No | ||
| context_chunks | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |