Search Code
search_codeFind relevant code chunks across indexed repositories using hybrid semantic and keyword retrieval. Filter by language, path, or repo to answer coding questions and locate symbols or errors.
Instructions
Search indexed repositories for relevant code chunks using hybrid RAG.
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_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "hybrid" (vector + BM25 RRF, recommended), "vector" (semantic only), or "keyword" (instant BM25). | hybrid |
| query | Yes | Natural language question, symbol name, error message, or code pattern. | |
| repos | No | Optional list of repo_ids or filesystem paths to restrict search. Omit to search all repos. | |
| top_k | No | Maximum results to return (1-50, default 8). | |
| languages | No | Optional language filter (e.g. ["tsx", "typescript", "python", "kotlin", "java", "dart"]). | |
| path_prefix | No | Optional relative path prefix filter (e.g. "src/auth/"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||