use_figma
Execute JavaScript in the selected local Figma document to query and edit real canvas layers through the Figma Plugin API, returning affected IDs for follow-up operations.
Instructions
Run JavaScript using the figma-use 16 contract in the selected local Figma document. Read figma-workbench first. Top-level await/return, query/QueryResult, matches/set/tree, auto layout, screenshots and io.write are supported. Include description, fileKey and sessionId from create_session. Page context starts at the first page every call; switch at most once. Return affected IDs. Errors include safeToRetryWithoutCanvasRead. Requires companion featureVersion 3.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| fileKey | No | Must match the selected document fileKey from figma_status. Local-only documents use local:<connectionId>. | |
| sessionId | No | Task UUID returned by create_session; scoped to this DSH Work session. | |
| skillNames | No | Comma-separated loaded skill names; local task metadata only. | |
| description | No |