Skip to main content
Glama
sankalp51

figma-to-react-mcp

by sankalp51

Generate a React component from a frame

generate_component

Converts a Figma frame into a ready-to-use React .tsx component with Ant Design, Tailwind CSS, AG Grid for tables, and ApexCharts for charts.

Instructions

Turn a Figma frame/node into a ready-to-use .tsx component: antd components by role, Tailwind for layout, AG Grid for tables (with columnDefs derived from headers), ApexCharts for charts (type + labels derived from the design), and repeated rows expanded to .map(). If outDir is set the file is written to disk (kept out of context); otherwise the code is returned. This is the heavy lifting — refine the result rather than writing from scratch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
outDirNoIf set, write the .tsx here (e.g. <project>/src/pages). Otherwise return the code.
figmaUrlYesFigma URL targeting a frame (?node-id=...) or a file key.
componentNameNoComponent name; defaults to a PascalCase of the frame name.
Behavior3/5

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

With no annotations, the description discloses key behaviors: file writing when outDir is set, code return otherwise, and that it's 'heavy lifting'. However, it does not mention potential side effects like file overwriting or authentication requirements, which would be valuable for a mutation-capable tool.

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?

The description is two sentences long, front-loading the core purpose in the first sentence. Every clause adds value (libraries, file writing behavior, usage hint). No redundancy or filler.

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

Completeness3/5

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

No output schema is provided, so the description should clarify the return type. It says 'code is returned' but not the format (string, object?). It also does not mention error cases (invalid frames) or performance implications. Given the tool's complexity (4 params, writes to disk), completeness is adequate but not thorough.

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 coverage is 75% (3 of 4 parameters have descriptions). The description adds context like defaulting componentName to PascalCase, but does not explain the 'depth' parameter (missing from schema). The added value over the schema is moderate but not exceptional.

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?

The description clearly states the tool turns a Figma frame into a .tsx component, specifying the exact frameworks and libraries used (antd, Tailwind, AG Grid, ApexCharts). It distinguishes from siblings like 'convert_figma_to_react' and 'scaffold_react_project' by detailing the complex output.

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?

The description implies when to use the tool ('refine the result rather than writing from scratch') and contrasts with sibling tools listed in context. However, it lacks explicit exclusions or when not to use, but the provided context signals (siblings) help fill the gap.

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/sankalp51/figma-to-react-mcp'

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