convertFigmaToCode
Transform Figma designs into React/Tailwind code by extracting node structure and visual context, then generating clean, semantic components with AI instructions.
Instructions
Convert Figma design to React/Tailwind code. Fetches node structure and rendered image, returns simplified design data with AI instructions for generating clean, semantic code. Focuses on React components with Tailwind CSS styling.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileKey": "<fileKey>",
"nodeId": "<nodeId>"
},
"name": "convertFigmaToCode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Frame/component ID (formats: '123:456' or '123-456') | |
| fileKey | Yes | File key | |
| framework | No | Target framework (default: react) | |
| figmaToken | No | API token (optional) | |
| includeComments | No | Include comments (default: true) |