scan_components
Scan a project directory to identify existing UI components by AST signature, enabling reuse across React, Vue, or Svelte files. Returns a list of components and the detected framework profile.
Instructions
Scan the local project for existing UI components so they can be reused instead of regenerated. Runs on the server filesystem, not in Figma. Identifies components by AST signature (exported, PascalCase, function-ish) rather than by folder layout, so any structure works. React (.tsx/.jsx) is parsed for name + props; Vue/Svelte derive the name from the file and parse props from the block (defineProps / export let / $props). extensions defaults to the detected profile's; rootDir defaults to the server cwd. Returns { components, profile }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootDir | No | Project root to scan; defaults to the server cwd | |
| extensions | No | Component file extensions to scan; defaults to the detected profile |