find_hook_usages
Search a React project for every usage of a specific hook, returning a summary, file distribution, and up to 10 code locations. Filter results by file path or component to pinpoint relevant usages.
Instructions
Find all usages of a React hook across the codebase. Returns summary (totalUsages, filesCount), distribution by path, and limited usages (default: 10). Use filePath/component filters to drill down.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max usages to return (default: 10, max: 50) | |
| exclude | No | File patterns to exclude | |
| include | No | File patterns to include | |
| filePath | No | Filter to specific file or folder path (e.g., "src/app/sections/") | |
| hookName | Yes | Hook name to search for (e.g., "useState", "useQuery", "useAuth") | |
| component | No | Filter to usages within specific component | |
| projectPath | Yes | Root path of the project |