Get motion (keyframe animation)
figma_get_motion_contextReads Figma timeline animation data—keyframe tracks, easing, timelines, cohorts, and motion plans—so agents can implement layer animations in code.
Instructions
The timeline animation of layers, for implementing it in code: per animated layer its keyframe tracks ({ field, keyframes: [{ t (s), value, easing }] }, the same strings figma_set_keyframes takes), animation styles, its top-level frame and timeline, plus timelineCohorts (layers that play together) and motionPlans (each frame's figma_set_motion_plan). topLevelFrameId is the frame on the page, found through the parents; a cohort is keyed by that frame and lists every timelineIds seen — a timeline id is never a node id. Inside an animated frame, address layers by the ids your create calls returned: an id read from a listing there can be temporary. This is Motion, not prototype interactions — those are figma_get_reactions. Defaults to the selection, then the page, and reads descendants: a screen never animates itself, its layers do. limits says what the Plugin API cannot tell (loop mode, pivot). Motion is a Figma beta: UNSUPPORTED means this account does not have it. Editors: Design only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | The nextCursor of a truncated call, unchanged. | |
| nodeId | No | Layer or frame (id or Figma link). Defaults to the selection, then the current page. | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| maxNodes | No | Layers inspected per call. Default 500. | |
| recursive | No | Include descendants. Default true; false reads only the given layers (a page is always walked). |