Skip to main content
Glama

set_keyframe

Add or update an element's keyframe segment for a property at a given time in seconds, frames, or beats, enabling precise motion changes in a composition.

Instructions

Add a keyframe segment to an element, or update the one with the same prop and index. "at" is the time from the element's start: seconds, "12f" or "1b"; it snaps to a whole frame. ease must be a {md.sys.motion.spring.*} token. Prefer set_motion with a named preset: a hand-keyed move is a review finding.

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": {
      "composition": "<composition>",
      "layer": "<layer>",
      "prop": "<prop>",
      "to": "<to>",
      "at": "<at>"
    },
    "name": "set_keyframe"
  }
}

Input Schema

NameRequiredDescriptionDefault
atYesSeconds (2.5), frames ("75f") or beats ("4b", needs meta.bpm). Snapped to a whole frame.
toYesValue at its end
easeNoA spring token{md.sys.motion.spring.standard.spatial.default}
fromNoValue at the start of the segment
propYesThe prop to move, e.g. x, opacity, scale
basisNoWhat you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it.
indexNoUpdate this segment (index in layer.anim) instead of adding one
layerYesThe element id
messageNoOne line saying why, kept with the change in the history
feedbackNoIds of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again.
confidenceNoHow sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.
compositionYesComposition name (file in compositions/ without .json)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.2
    • addedInput schema / properties / confidence
      Added value: +{
      +  "description": "How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change.",
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low"
      +  ]
      +}
    • addedInput schema / properties / ease / description
      Added value: +"A spring token"
    • addedInput schema / properties / from / description
      Added value: +"Value at the start of the segment"
    • addedInput schema / properties / layer / description
      Added value: +"The element id"
    • addedInput schema / properties / prop / description
      Added value: +"The prop to move, e.g. x, opacity, scale"
    • removedInput schema / properties / scene
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / to / description
      Added value: +"Value at its end"
    • changedInput schema / required
      Previous value: -[
      -  "composition",
      -  "scene",
      -  "layer",
      -  "prop",
      -  "to",
      -  "at"
      -]New value: +[
      +  "composition",
      +  "layer",
      +  "prop",
      +  "to",
      +  "at"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, non-idempotent mutation. The description adds behavior beyond them: 'at' is measured from the element's start, it snaps to a whole frame, and 'ease' must be a valid spring token. It doesn't say what happens on an invalid token or a frame-snapped collision, so it isn't exhaustive, but it adds real operational context.

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?

Three sentences, each carrying a distinct payload: the operation, the 'at' semantics, and the sibling redirect. The warning about hand-keyed moves is placed last where it lands as a final constraint. No filler.

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

Completeness4/5

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

For a 12-parameter mutation tool with no output schema, the definition covers the two parameters that carry hidden semantics ('at' and 'ease') and the add-vs-update decision. The remaining parameters (basis, confidence, feedback, message) are fully documented in the schema, so nothing critical is missing, though the description doesn't acknowledge the provenance fields an agent is expected to supply.

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 description coverage is 100%, so the baseline is 3, and the description clears that bar by explaining that 'at' is relative to the element's start (not captured in the schema) and that prop+index together select an update rather than an add. That semantic link between two parameters is not stated in the schema and meaningfully changes how they are used.

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?

The description states a specific verb and resource ('Add a keyframe segment to an element') and immediately covers the second mode ('update the one with the same prop and index'), which is a real distinction an agent must understand. It also names the sibling tool set_motion as the preferred path, so the tool is distinguishable without consulting another 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?

It explicitly routes the agent away from this tool: 'Prefer set_motion with a named preset: a hand-keyed move is a review finding.' That names the alternative, the condition that selects it, and the consequence of choosing wrong. That is as clear as guidance gets.

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