Skip to main content
Glama

figma_preload_variables

Idempotent

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:

  1. 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.

  2. 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

TableJSON Schema
NameRequiredDescriptionDefault
prefixesNoVariable path prefixes to import from team libraries (e.g., ["Colors", "spacing", "radius"]). Empty array imports all.
keysNoVariable keys to import directly (bypasses collection enumeration). Use for community library variables. Get keys from search_design_system.
Behavior4/5

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

Annotations already include idempotentHint=true and readOnlyHint=false. The description adds useful behavioral context: prefix-based mode does not find community library variables, and key-based mode bypasses collection enumeration. It does not contradict annotations.

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 well-structured with numbered modes, bold formatting, and concise sentences. It front-loads the main purpose and uses clear hierarchy, making it easy to scan.

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

Completeness4/5

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

Given no output schema, the description does not explain return values. However, it thoroughly covers both input modes, their limitations, and usage context. It could mention potential side effects of mixing modes, but overall it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds significant value beyond the schema by explaining the purpose of each mode, how keys can be formatted (string or {key, name}), and how to obtain keys from another tool.

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's action ('Batch import DS variables into the plugin cache') and details two distinct modes (prefix-based and key-based), differentiating it from siblings like 'figma_preload_styles' and 'search_design_system'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use each mode: prefix-based for team libraries and key-based for community library variables. It also advises to call at build start alongside 'preload_styles' and references 'search_design_system' for obtaining keys.

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/miapre/mimic-ai'

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