figma_eval
Execute JavaScript in Figma's plugin sandbox using the full API to create, edit, or analyze nodes, variables, and styles when standard tools are insufficient.
Instructions
Execute JavaScript inside the connected Figma plugin sandbox with the full figma Plugin API in scope (create/edit any node, variables, styles, components, viewport, exports — everything). Code runs in an async IIFE: await works, the last expression (or return …) is the result. Figma nodes in the result come back as {id,name,type} stubs. Use the structured tools (create_node, set_node_properties, …) for common operations; reach for eval when you need something they don't cover. Each call is one Figma undo step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript to run, e.g. `figma.currentPage.selection.map(n => n.name)` | |
| timeoutMs | No |