search_code
Search indexed code repositories with BM25 ranking, supporting substring and word prefix matches, returning ranked results with code snippets.
Instructions
Search indexed code using FTS5 with BM25 ranking. Supports substring (trigram, min 3 chars) and word (prefix) modes. Returns ranked results with code snippets.
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 | Search mode (default: "substring") | |
| repo | No | Limit to a specific repo (owner/repo) | |
| query | Yes | Search query | |
| file_type | No | File type filter (default: "all") | |
| max_results | No | Max results (1-50, default: 10) |