replace_all_instances
Replace every Figma component instance whose main component key matches a source key with a target key. Limit the scope with a root node and preview changes using dry-run.
Instructions
Swap every instance whose main component key matches sourceComponentKey to targetComponentKey. Supports dryRun and a rootNodeId scope.
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": {
"sourceComponentKey": "<sourceComponentKey>",
"targetComponentKey": "<targetComponentKey>"
},
"name": "replace_all_instances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | ||
| rootNodeId | No | ||
| sourceComponentKey | Yes | ||
| targetComponentKey | Yes |