Skip to main content
Glama

scan_components

Read-only

Scan your local project for existing UI components and reuse them instead of regenerating. Identifies components by AST signature, supporting React, Vue, and Svelte.

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

TableJSON Schema
NameRequiredDescriptionDefault
rootDirNoProject root to scan; defaults to the server cwd
extensionsNoComponent file extensions to scan; defaults to the detected profile
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true, and description adds detailed behavioral traits: runs on server filesystem, AST signature parsing, per-framework logic for React/Vue/Svelte, and default behavior for parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Multiple sentences but all are necessary and informative. Front-loaded with main purpose, no redundant phrases.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Fully covers tool behavior: input parameters with defaults, parsing methodology, return shape ({components, profile}), and environment (server filesystem). No gaps for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds value by explaining defaults ('extensions defaults to detected profile', 'rootDir defaults to server cwd'), which is not in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it scans local project for UI components to reuse, distinguishes from Figma-based siblings like get_local_components by specifying server filesystem and AST-based identification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains when to use (reuse existing components) and context (local project, not Figma). Does not explicitly list alternatives but sibling names imply alternatives for Figma operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server