Get variable definitions
figma_local_get_variable_defsRetrieves the variables and styles applied to a Figma node and its children, returning mapped names and values for colors, sizes, spacing, and fonts.
Instructions
Get the variables and styles used by a node and its children, e.g. {'icon/default/secondary': '#949494'}. Variables are reusable values for colors, sizes, spacing and fonts. Extract nodeId from the URL (node-id=1-2 -> 1:2); do not pass an empty or guessed nodeId. Variable names resolve through the companion plugin when it is running in the file, or through the REST variables API on Enterprise plans. For branch URLs 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_variable_defs"
}
}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. | |
| 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`. |