search_code
Search a codebase using keyword, semantic, or hybrid queries to find relevant code chunks with file paths, line numbers, and relevance scores.
Instructions
Search the codebase using keyword, semantic, or hybrid search.
Args: query: Search query string (natural language or code). mode: Search mode - "semantic" for vector search, "keyword" for BM25, or "hybrid" for RRF fusion of both (default). top_k: Number of results to return (default: 10). path: Optional path prefix filter (e.g., "src/", "apps/ui/").
Returns: List of concise chunk results with file_path, language, start_line, end_line, definitions, preview, and relevance score.
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 | |
| path | No | ||
| query | Yes | ||
| top_k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |