execute_plugin_command
Send single or batched Figma plugin commands to create, modify, and export nodes on the canvas, with queuing and progress tracking.
Instructions
Send a command envelope to the companion Figma plugin over the local bridge. Commands: create_frame, create_text, create_rectangle, set_fills, set_effects, set_auto_layout, insert_image, move_node, resize_node, delete_node, get_selection, get_file_info, get_page_children, export_node. Use commands for a batch executed sequentially in the plugin. Commands sent while the plugin is disconnected are queued (bounded) unless queue=false. Batches emit per-command progress heartbeats: the call fails only after idleTimeoutMs of silence or the total timeoutMs cap, and timeout errors list the command indexes confirmed applied on the canvas. export_node accepts an absolute params.outPath to save bytes to disk and return { path, bytes } instead of inline base64.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queue | No | Queue while disconnected (default true); false = fail immediately. | |
| params | No | Parameters for the single command. | |
| command | No | Single command name. | |
| commands | No | Batch of commands; executed sequentially inside the plugin. | |
| timeoutMs | No | Total cap in ms for the whole call once sent (default 300000 = 5 min). Batch heartbeats keep the call alive within this cap. | |
| stopOnError | No | Batch: stop on first error. | |
| idleTimeoutMs | No | Max silence in ms with no progress/result before failing (default 20000). Reset by every batch progress heartbeat. |