exec_run
Run custom JavaScript against the full Figma Plugin API to handle tasks the standard tools cannot, such as targeted design edits or data extraction; requires the kit bridge plugin in the target file.
Instructions
Run JavaScript in the plugin with the full Figma Plugin API (figma), for what the other tools cannot do. The body of an async function: return a small JSON-serializable value, not nodes. Keep each call small (a few hundred nodes); build big designs in several calls. Needs the kit bridge plugin running in that file (read_bridge).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"code": "<code>"
},
"name": "exec_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| file | Yes | Figma file URL or key |