search_code
Search code semantically across indexed repositories, with optional fuzzy matching and filters for language, type, or file path.
Instructions
Semantic search across the indexed codebase with optional fuzzy matching and filters. Returns relevant code chunks with similarity scores.
Requires: index_repository must be called first.
Example: {"repo_path": "/path/to/repo", "query": "error handling"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the indexed repository | |
| query | Yes | Semantic search query | |
| limit | No | Maximum number of results (default: 10) | |
| language | No | Filter by programming language | |
| type | No | Filter by chunk type (e.g., function, class, method) | |
| path | No | Filter by file path pattern (e.g., 'src/**/*.py', 'tests/*') | |
| fuzzy | No | Enable fuzzy matching to improve results for exact name matches (default: false) | |
| fuzzy_weight | No | Weight for fuzzy matching score (0.0-1.0, default: 0.3). Higher values favor exact text matches over semantic similarity. |