semantic_search
Find relevant code snippets by searching your codebase with natural language queries to locate functions, classes, or implementations.
Instructions
Perform semantic search across the codebase to find relevant code snippets.
Use this tool when you need to:
Find specific functions, classes, or implementations
Locate code that handles a particular concept
Quickly explore what exists in the codebase
For comprehensive context with file summaries and related files, use get_context_for_prompt instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language description of what you're looking for (e.g., "user authentication", "database connection", "API error handling") | |
| top_k | No | Number of results to return (default: 10, max: 50) | |
| mode | No | Search mode: "fast" (default) uses cached results and moderate expansion; "deep" increases expansion/budget for better recall at higher latency. | fast |
| bypass_cache | No | When true, bypass caches for this call (useful for benchmarking or ensuring freshest results). | |
| timeout_ms | No | Max time to spend on the retrieval pipeline in milliseconds. 0/undefined means no timeout. |