Skip to main content
Glama

component_map

Read-only

Map Figma component instances to existing local code components for reuse. Joins grounded Figma names with project AST to find matches and reports missing props.

Instructions

Map the Figma component instances in a selection/subtree to existing local code components, so they can be reused instead of regenerated. Joins the grounded Figma component names (and their variant axes) against an AST scan of the project; an explicit docs/figma-component-map.md row overrides the fuzzy match. Each distinct component is mapped once with all its instance ids. A mapped candidate also reports matchedProps (Figma axes the component already has) and unmatchedProps (axes it lacks → component-extension TODOs). Returns { mappings (candidate + confidence + status high/medium/low/unmapped), unmapped, profile }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoRoot node id; omit to use the selection or current page
rootDirNoProject root to scan; defaults to the server cwd
thresholdNoConfidence at/above which a match counts as a reliable reuse (default 0.7)
Behavior5/5

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

Annotations indicate readOnlyHint=true, and the description confirms no modifications. It details return fields (mappings, unmatched, profile), matching logic (fuzzy match with override), and behavior (each distinct component mapped once). No contradiction with annotations.

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

Conciseness4/5

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

Description is a single dense paragraph but front-loads the core action and key details. Slightly long but every sentence adds value. Could be split into more structured bullet points.

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?

Given 3 optional parameters with thorough schema descriptions and readOnlyHint annotation, the description covers behavior, inputs, outputs, and exception (override file). It provides sufficient context for an AI agent to understand and use the tool effectively.

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

Parameters3/5

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

Schema description coverage is 100% with clear parameter descriptions. The description does not add additional meaning beyond the schema, focusing on the overall process. For high coverage, baseline 3 is appropriate.

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?

Description clearly states the tool maps Figma component instances to local code components for reuse, with a specific verb ('Map') and resource ('component instances'). It distinguishes from sibling tools like scan_components (which likely only scans) and icon_map.

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?

Description explains the purpose (reuse instead of regenerate) and mentions an override mechanism, implying when to use it. However, it does not explicitly state when not to use it or compare with alternatives like find_replace_text or get_local_components.

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