Skip to main content
Glama

Set keyframes (Motion)

figma_set_keyframes
Idempotent

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…

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

NameRequiredDescriptionDefault
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
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. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Far beyond the annotations: it discloses that the write is verified and re-applied with a per-track status, that failure surfaces as INTERNAL with partial.notApplied, how the timeline grows/shrinks (and the special case of empty tracks plus timelineDuration), and a concrete list of pre-flight refusals. Annotations already fix the safety profile (non-read-only, idempotent), and the description adds the operational consequences the agent actually needs.

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 write semantics, then failure modes, then refusals, then routing — a sensible order. It is dense and semicolon-heavy with nested parentheticals, which costs some scannability, but essentially every clause carries distinct behavioral information rather than filler.

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?

With no output schema, the description still tells the agent what comes back (tracks[].status, timeline { id, duration, topLevelFrameId }) and how partial failure is signaled, so it can interpret results. Combined with the refusal list and editor support (Design verified; FigJam/Slides unverified), an agent has everything needed to call this correctly.

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% and the schema descriptions are themselves detailed, so the baseline is 3; the description earns above that by explaining cross-parameter behavior — that timelineDuration is applied as given even if shorter, and that tracks: [] with timelineDuration only sets the duration without shrinking. Remaining parameter detail (field/easing vocabulary) is already carried by 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 and resource — animate a layer on its frame's timeline — and immediately defines the write semantics (each track replaces that field's keyframes; other tracks stay). It also names the boundary against neighbors: 'Not prototype transitions (figma_set_reactions)' and points to figma_check_motion and figma_set_motion_plan for adjacent steps.

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 prerequisites and exclusions: PROCESS_REQUIRED under BRIDGE_PROCESS=strict until the session reads the motion skill and the frame has a plan, plus named alternatives for verification (figma_check_motion) and for transition work (figma_set_reactions). It also says 'UNSUPPORTED means stop, not retry', which is decisive when-to/when-not guidance.

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