BM25 Code Search
searchFind relevant code chunks in an indexed codebase using BM25 ranking, supporting Japanese, camelCase, and snake_case queries. Provides fallback suggestions when no matches occur.
Instructions
Search the indexed codebase with a SQLite FTS5 BM25 ranker. Returns the best-matching code chunks, ranked with the filepath column boosted 3.0x over the body. Works for Japanese (CJK) and camelCase/snake_case queries. When nothing matches, returns a structured zero-match fallback suggesting grep/glob.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | How query tokens are combined. 'OR' maximises recall; 'AND' requires every token to hit. | OR |
| query | Yes | The search query. Japanese, camelCase and snake_case are all tokenised the same way the index was built. | |
| top_k | No | Maximum number of results to return. |