figma_preload_variables
Batch import design system variables into cache using prefixes for team libraries or keys for community libraries, enabling consistent variable access in Figma builds.
Instructions
Batch import DS variables into the plugin cache. Two import modes:
Prefix-based (prefixes param): Walks team library collections and imports variables matching path prefixes. Works for team-published libraries. Does NOT find community library variables.
Key-based (keys param): Imports variables directly by their Figma key, bypassing collection enumeration. Use this for community library variables — get the keys from search_design_system (Figma MCP), then pass them here. Each key entry can be a string (just the key) or { key, name } for explicit name mapping. Both modes can be used together. Call at build start alongside preload_styles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefixes | No | Variable path prefixes to import from team libraries (e.g., ["Colors", "spacing", "radius"]). Empty array imports all. | |
| keys | No | Variable keys to import directly (bypasses collection enumeration). Use for community library variables. Get keys from search_design_system. |