Delete Variables
variable_deleteDeletes Figma variables or an entire collection after scanning the document for any consumers. Refuses the deletion if a variable is still in use or a page cannot be read, listing all consumers.
Instructions
Delete specific variables or an entire collection. Runs a full-document consumer check first, before any removal: if a target is still in use the call is refused with VARIABLE_IN_USE, whose details.variablesInUse lists every consumer; if any page cannot be loaded and read it is refused with DOCUMENT_SCAN_INCOMPLETE, because a page error can never mean zero consumers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variableIds | No | Array of variable IDs to delete. Mutually exclusive with collectionId. | |
| collectionId | No | ID of a variable collection to delete. Mutually exclusive with variableIds. | |
| variableNames | No | Array of variable names corresponding to variableIds, for safety verification. Required if variableIds is used. | |
| collectionName | No | Name of the collection to delete, for safety verification. Required if collectionId is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | Status message | |
| success | No | Whether variables were deleted successfully |