Get design context
figma_local_get_design_contextRetrieve a Figma node’s design context for design-to-code handoff, including reference React and Tailwind code, assets, design tokens, components, and a screenshot.
Instructions
Get design context for a Figma node — the primary tool for design-to-code workflows. Returns React + Tailwind reference code, asset download URLs, the design tokens and components used, and a screenshot of the node. The code is a reference: adapt it to the target project's components, design tokens and conventions. Use the nodeId parameter to specify a node id and the fileKey parameter to specify the file key. If given the URL https://figma.com/design/:fileKey/:fileName?node-id=1-2, the nodeId is 1:2 and the fileKey is :fileKey. If the URL does not include node-id, ask the user for a node-specific URL; do not pass an empty or guessed nodeId. For branch URLs (https://figma.com/design/:fileKey/branch/:branchKey/:fileName) use the branchKey as the fileKey.
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": "figma_local_get_design_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node in the Figma document, eg. "123:456" or "123-456". Extract it from the URL's node-id query parameter. Do not pass an empty or guessed nodeId. | |
| fileKey | Yes | The key of the Figma file to use. If a URL is provided, extract the file key from it: for https://figma.com/design/:fileKey/:fileName?node-id=1-2 the fileKey is `:fileKey`. For https://figma.com/design/:fileKey/branch/:branchKey/:fileName use the branchKey. A full URL is also accepted. | |
| forceCode | No | Whether code should always be returned, instead of just metadata when the output is too large. Only set when the user directly asks. | |
| clientLanguages | No | A comma separated list of programming languages used by the client in the current context, e.g. `javascript`, `html,css,typescript`. If you do not know, list `unknown`. | |
| clientFrameworks | No | A comma separated list of frameworks used by the client in the current context, e.g. `react`, `vue`, `django`. If you do not know, list `unknown`. | |
| excludeScreenshot | No | Whether to exclude the screenshot of the design from the response. Not recommended; only set when the user asks or to preserve context. | |
| disableCodeConnect | No | Whether to skip Code Connect (dev resource) lookups. Only set when the user asks. |