Skip to main content
Glama

Set keyframes (Motion)

figma_set_keyframes
Idempotent

Animate a Figma layer by applying or replacing per-field keyframes on its frame timeline, with optional duration control and validation of landed tracks.

Instructions

Animate a layer on its frame's timeline: each track replaces that field's keyframes; other tracks stay. Every track is read back and re-applied if it did not land: tracks[].status is written or rewritten, timeline is { id, duration, topLevelFrameId }, and a track that never lands fails INTERNAL with partial.notApplied. The timeline grows to fit the last key and never shrinks unless timelineDuration says so (tracks: [] + timelineDuration only sets it). Refused before any change: a top-level frame (animate a child), WIDTH/HEIGHT on a group or vector, a missing or non-SOLID paint, EASE_IN_OUT (Figma spells it EASE_IN_AND_OUT); under BRIDGE_PROCESS=strict (the default) PROCESS_REQUIRED until this session read the motion skill (figma_get_guide) and the frame has a plan (figma_set_motion_plan). Not prototype transitions (figma_set_reactions). Check keys with figma_check_motion. UNSUPPORTED means stop, not retry. Skill: motion. Editors: Design; unverified: FigJam, Slides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe layer to animate — inside a top-level frame, not the frame itself.
tracksNoOne entry per field.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.
timelineDurationNoSeconds. Applied as given, even if shorter than the keyframes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare safety profile (readOnly=false, idempotent=true, destructive=false); the description adds far more: read-back/re-apply semantics, tracks[].status values, timeline object shape, INTERNAL + partial.notApplied failure mode, timeline growth/shrink rules, and the exact refusal list (top-level frame, WIDTH/HEIGHT on group/vector, non-SOLID paint, EASE_IN_OUT spelling). This is exceptional behavioral disclosure beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then failure modes, refusals, prerequisites, and cautions in roughly priority order. It is dense – a long run-on with semicolon-joined clauses – but nearly every clause earns its place. Slightly overpacked for a single paragraph.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description supplies the return contract (tracks[].status, timeline {id, duration, topLevelFrameId}) plus failure contract and the full refusal/prerequisite list. Nothing an agent needs to invoke or recover correctly appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema carries the field-level detail, but the description still adds real meaning the schema doesn't state: the 'replace vs. other tracks stay' semantics, the timelineDuration behavior ('Applied as given, even if shorter'), and the tracks:[] + timelineDuration-only edge case. Baseline 3 would understate the added semantics, but it stops short of 5 since most parameter syntax lives in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Animate a layer on its frame's timeline') and immediately scopes the semantics ('each track replaces that field's keyframes; other tracks stay'). It explicitly distinguishes from figma_set_reactions, figma_check_motion, and figma_set_motion_plan, so an agent can select it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-not rules ('Not prototype transitions (figma_set_reactions)'), explicit prerequisites (BRIDGE_PROCESS=strict PROCESS_REQUIRED until motion skill read and figma_set_motion_plan called), and explicit post-call check (figma_check_motion). Also states 'UNSUPPORTED means stop, not retry'. Alternatives and conditions are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools