Search Code
search_codeLocate where a function, variable, string, or regex pattern appears across .js, .ts, .tsx, and .jsx files under a project directory.
Instructions
Searches for a text pattern (plain substring or regex) across all .js, .ts, .tsx, and .jsx files under a directory. Use this to find where a function, variable, string, or pattern is used in the codebase.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Text or regex pattern to search for. | |
| directory | No | Directory to search, relative to project root. Defaults to ".". |