rebind_variable_usages
Replace one variable binding with another across matching fields under a Figma root, using a required dry run to preview changes before writing.
Instructions
Replace one variable binding by another everywhere under rootId (default: every page): every node field bound to fromVariableId is bound to toVariableId (same variable type required). fields (optional) limits to the fields of bind_variable_field, plus fills, strokes (paint colors) and effects; default all. dryRun is required: true counts and writes nothing, false writes. Returns nodesChanged, bindingsChanged, byField, sample [[nodeId, field]] (20), failures [{nodeId, name, field, error}] (200 at most, failuresTotal gives the real count). Instance children are skipped unless includeInstanceChildren. Variable aliases, local styles and text range fills are not touched (find_variable_usages lists them). Time budget: if reached, the answer is PARTIAL with nextCursor; counts are per call, add them up.
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": {
"fromVariableId": "<fromVariableId>",
"toVariableId": "<toVariableId>",
"dryRun": "<dryRun>"
},
"name": "rebind_variable_usages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | nextCursor of a previous PARTIAL answer, to continue where it stopped | |
| dryRun | Yes | ||
| fields | No | ||
| rootId | No | Limit to this node (default: every page) | |
| maxNodes | No | Nodes changed per call (default 20000) | |
| timeBudgetMs | No | Time budget of the plugin for this call in ms (default 60000, max 100000). When it is reached the answer says it is PARTIAL and gives nextCursor. | |
| toVariableId | Yes | ||
| fromVariableId | Yes | ||
| includeInstanceChildren | No |