Skip to main content
Glama
southleft

figma-console-mcp

by southleft

figma_execute_across_files

Run the same JavaScript in parallel across multiple connected Figma files to check or fix cross-file design system consistency without switching active files.

Instructions

Run the same JavaScript against multiple Figma files connected via the Desktop Bridge plugin, IN PARALLEL, without touching the active file or target lock. Built for cross-file consistency work — e.g. running the same structural check or fix against every file in a multi-file design system and diffing the results — instead of switching the active file and running figma_execute once per file in sequence. Each file's code runs in that file's own plugin context (same 'figma' global as figma_execute). You must say which files to target: pass fileKeys (read them from figma_list_open_files first — strongly preferred for anything that writes), or pass allFiles: true to hit every connected file. Requires Desktop Bridge plugin open in each target file. Local Mode only.

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript code to execute in each targeted file. Has access to the 'figma' global object, same as figma_execute. Example: 'return { pageCount: figma.root.children.length };'
timeoutNoPer-file execution timeout in milliseconds (default: 10000, max: 30000). Applies independently to each file — one slow/unresponsive file does not delay the others.
allFilesNoRun against EVERY currently connected file. Opt-in on purpose: this executes the code in files the user may be actively working in, including any file pinned by target lock. Prefer naming fileKeys explicitly for anything that writes.
fileKeysNoWhich connected files to target, by fileKey. Get fileKeys from figma_list_open_files. Required unless allFiles is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full burden and does so: it discloses parallel execution, that the active file and target lock are untouched, that each file runs in its own plugin context with the same 'figma' global, the Desktop Bridge plugin requirement per file, and Local Mode only. These are non-obvious behavioral facts an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded with the key distinction first, then the alternative, then targeting rules. Some sentences restate what the schema already documents (fileKeys/allFiles semantics), which is mild redundancy rather than waste.

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?

For a complex, multi-file mutation tool with no output schema, the description covers execution semantics, targeting, and prerequisites well. The one gap is how per-file results are returned/aggregated with no output schema, leaving the agent to infer the shape.

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 the baseline is 3, but the description adds routing meaning beyond the schema: fileKeys is strongly preferred for anything that writes, allFiles is opt-in and hits files the user may be actively editing, and timeout applies independently per file. Only minor value-add over an already complete schema.

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?

States a specific verb (run the same JavaScript) across a specific resource (multiple Figma files) and names the scope (parallel, cross-file). It explicitly contrasts itself with figma_execute, so an agent can tell the two apart without opening either schema.

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?

Gives when-to-use (cross-file consistency work, running the same check/fix against every file in a multi-file design system) and the alternative it replaces (switching the active file and calling figma_execute per file in sequence). It also prescribes the prerequisite step: read fileKeys from figma_list_open_files first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools