search_code
Find code snippets by meaning, not just text matching. Use natural language queries to locate relevant code functions, error handling, or setup logic without knowing exact variable names.
Instructions
Search for code semantically similar to the query.
Finds code by meaning, not just text matching. Use this when you want to find code related to a concept without knowing exact variable/function names.
Examples:
"authentication logic" - finds login, session handling, token validation
"error handling for API calls" - finds try/except blocks, error responses
"database connection setup" - finds connection pooling, ORM initialization
Automatically indexes the project if not already indexed, and re-indexes any files that have changed since the last search.
Args: query: Natural language description of what you're looking for. project_path: Absolute path to the project root directory. limit: Maximum number of results to return (default 10).
Returns: List of matching code chunks with file path, line numbers, content, and score.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| project_path | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |