figma_motion_apply_style
Applies a Figma or custom motion style to a node with a dry-run plan and verified transaction, rolling back on any mismatch.
Instructions
Apply a Figma or custom animation style to a node (Motion Beta). dryRun defaults to TRUE and returns a planId plus the node's current styles/timelines. Apply with dryRun:false and that planId: the plugin re-reads the node, refuses a changed state, then verifies the applied style id, duration, offset and props by reading them back; any mismatch rolls the transaction back. A custom style accepts only timelineOffset, not duration or props.
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": {
"styleId": "<styleId>"
},
"name": "figma_motion_apply_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Style family; usually inferred from styleId, but explicit is safer | |
| props | No | FIGMA style only: values keyed by animation-style property | |
| dryRun | No | TRUE (default): plan only, no document write. FALSE: apply in one undo transaction. | |
| nodeId | No | Defaults to the current single selection | |
| planId | No | The planId returned by the dry run. Apply is refused if the arguments or the node's Motion state changed. | |
| fileKey | No | Which connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them. | |
| styleId | Yes | Figma styleId or custom style id from figma_motion_styles | |
| duration | No | FIGMA style only: duration in seconds | |
| timelineOffset | No | Offset in seconds |