analyze_jsx_props
Scan directories and files to analyze React component props, filter by component name or prop, and retrieve TypeScript type information.
Instructions
Analyze JSX/React component prop usage across files and directories.
Use this tool when you need to:
Understand what props a component accepts
Find all components in a codebase and their props
Analyze prop usage patterns in a project
Get TypeScript interface information for components
EXAMPLES:
Analyze all components in current directory: { "includeTypes": true }
Analyze all components in src/components: { "path": "src/components", "includeTypes": true }
Find all props for Button component in current directory: { "componentName": "Button", "includeTypes": true }
Find all usages of onClick prop in current directory: { "propName": "onClick", "includeTypes": false }
Analyze specific file with type info: { "path": "src/App.tsx", "includeTypes": true }
Returns:
Component names and their props
Prop types (when includeTypes is true)
File locations where components are defined
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute or relative path to file or directory to analyze (e.g., "src/components" or "src/App.tsx", defaults to current directory) | . |
| componentName | No | Filter: analyze only this specific component name (e.g., "Button") | |
| propName | No | Filter: search only for this specific prop name (e.g., "onClick") | |
| includeTypes | No | Include TypeScript type information in results |