search_context
Find relevant code snippets in your project using natural language queries. Automatically indexes code changes and returns formatted results with file paths and line numbers for semantic matches.
Instructions
Search for relevant code context based on a query within a specific project. This tool automatically performs incremental indexing before searching, ensuring results are always up-to-date. Returns formatted text snippets from the codebase that are semantically related to your query. IMPORTANT: Use forward slashes (/) as path separators in project_root_path, even on Windows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root_path | Yes | Absolute path to the project root directory. Use forward slashes (/) as separators. Example: C:/Users/username/projects/myproject | |
| query | Yes | Natural language search query to find relevant code context. This tool performs semantic search and returns code snippets that match your query. Examples: 'logging configuration setup initialization logger' (finds logging setup code), 'user authentication login' (finds auth-related code), 'database connection pool' (finds DB connection code), 'error handling exception' (finds error handling patterns), 'API endpoint routes' (finds API route definitions). The tool returns formatted text snippets with file paths and line numbers showing where the relevant code is located. |