Skip to main content
Glama

set_keyframe

Idempotent

Insert or update a keyframe on a layer parameter at a specific timeline time, with typed values and easing control. Animate position, scale, opacity, color, audio, or effect params.

Instructions

Insert or update a keyframe on a layer param; t_us is timeline-absolute. A Static track is lifted to Keyframed; a key at the same frame is updated in place. Returns the key (keyframe_id, t_us). value is typed by param_key: a number for scalars, {r,g,b,a} (0..255) for "color"; an effect param must sit in its catalogued range (effects://catalog). interp (optional) eases the segment LEAVING this key (Hold | Linear | Bezier {p1,p2} | Elastic | Bounce); omitted, it inherits the preceding segment's. A Bezier on the LAST key is refused — its p2 lands on the next key, so add that key first. One side, the continuity or a preset: update_keyframe; Auto tangents: smooth_keyframes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
t_usYesKey time, timeline-absolute, µs.
valueYesTyped by `param_key`: a number for scalar params (x, y, path_progress, scale_x, scale_y, rotation_deg, anchor_x, anchor_y, opacity, gain_db, pan, effect params), {r,g,b,a} (0..255) for "color". Path mode takes path_progress (a fraction) instead of x/y.
interpNoEasing: {"kind":"Hold"} | {"kind":"Linear"} | {"kind":"Bezier","p1":[x,y],"p2":[x,y]} | {"kind":"Elastic","dir",amplitude?,period?} | {"kind":"Bounce","dir"}.
layer_idYesLayer id.
param_keyYesAnimatable param: visual kinds x, y (path_progress in Path mode), scale_x, scale_y, rotation_deg, anchor_x, anchor_y, opacity; Text and Color color; Audio gain_db, pan; or an effect param as effects[<effect_id>].params[<key>].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.9
    • addedInput schema / properties / interp / properties / kind / description
      Added value: +"Easing kind of the segment leaving the key."
    • addedInput schema / properties / layer_id / description
      Added value: +"Layer id."
    • addedInput schema / properties / param_key / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "x",
      +      "y",
      +      "path_progress",
      +      "scale_x",
      +      "scale_y",
      +      "rotation_deg",
      +      "anchor_x",
      +      "anchor_y",
      +      "opacity",
      +      "color",
      +      "gain_db",
      +      "pan"
      +    ]
      +  },
      +  {
      +    "pattern": "^effects\\[[0-9a-fA-F-]{36}\\]\\.params\\[[A-Za-z0-9_]+\\]$"
      +  }
      +]
    • addedInput schema / properties / param_key / description
      Added value: +"Animatable param: visual kinds x, y (path_progress in Path mode), scale_x, scale_y, rotation_deg, anchor_x, anchor_y, opacity; Text and Color color; Audio gain_db, pan; or an effect param as effects[<effect_id>].params[<key>]."
    • addedInput schema / properties / t_us / description
      Added value: +"Key time, timeline-absolute, µs."
    • changedInput schema / properties / value / description
      Previous value: -"Typed by `param_key`: a number for every scalar param (x, y, path_progress, scale_x, scale_y, rotation_deg, anchor_x, anchor_y, opacity, gain_db, pan, effect params); an {r,g,b,a} colour (integers 0..255) for \"color\" — the Text and Color layers' colour. Path mode rejects independent x/y writes; use path_progress (a fraction, not a percentage); XY mode has no path_progress. A mismatch is refused naming the type the param takes."New value: +"Typed by `param_key`: a number for scalar params (x, y, path_progress, scale_x, scale_y, rotation_deg, anchor_x, anchor_y, opacity, gain_db, pan, effect params), {r,g,b,a} (0..255) for \"color\". Path mode takes path_progress (a fraction) instead of x/y."
    • removedInput schema / properties / value / oneOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "properties": {
      -      "a": {
      -        "type": "integer"
      -      },
      -      "b": {
      -        "type": "integer"
      -      },
      -      "g": {
      -        "type": "integer"
      -      },
      -      "r": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "r",
      -      "g",
      -      "b",
      -      "a"
      -    ],
      -    "type": "object"
      -  }
      -]
  2. First observedv0.1.8

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that a Static track is lifted to Keyframed, that same-frame keys are updated in place, what the return value contains, and that a Bezier on the last key is refused. Annotations only convey idempotence and non-destructiveness, so the description carries the behavioral burden effectively. No contradiction with annotations.

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

Conciseness5/5

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

Every clause adds distinct information: operation, timeline semantics, upsert behavior, value typing, interpolation rules, constraints, and sibling routing. It is dense but not bloated, and front-loads the core action before details.

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 the returned key fields (`keyframe_id`, `t_us`). It covers the key behaviors, constraints, typing rules, and alternative tools, making the tool safely callable without external documentation.

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 already 100%, so the baseline is 3, but the description adds meaningful semantics: effect params must sit in their catalogued range, omitted `interp` inherits from the preceding segment, and Bezier control-point behavior is constrained. It does not need to restate the schema, so these additions justify the higher score.

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 operation: 'Insert or update a keyframe on a layer param', and clarifies timeline semantics with `t_us` is timeline-absolute. The upsert behavior and explicit contrast with `update_keyframe` and `smooth_keyframes` make it clearly distinguishable from sibling tools.

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?

Provides explicit routing guidance: use `update_keyframe` for one-sided continuity or presets and `smooth_keyframes` for auto tangents. It also gives a concrete precondition for Bezier keys: the last key cannot have one until the next key exists.

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