Skip to main content
Glama

add_keyframes

Animate layer properties by adding keyframes for opacity, position, scale, rotation, color, stroke, text, and blur; missing timelines and tracks are created automatically.

Instructions

Add keyframes to animate a layer property. Auto-creates timeline + track if missing.

TRACK TARGET FORMAT: "layers.{layerId}.{property}"

AVAILABLE PROPERTIES: opacity → 0.0 - 1.0 transform.x → pixels (horizontal position) transform.y → pixels (vertical position) transform.scaleX → 1.0 = 100% transform.scaleY → 1.0 = 100% transform.rotationDeg → degrees style.fill.color → "#rrggbb" hex string (SNAP — does NOT interpolate) style.fill.opacity → 0.0 - 1.0 style.stroke.width → pixels style.cornerRadius → pixels text.fontSize → pixels text.letterSpacing → pixels effects.blur → 0 - 100

EXAMPLES: target: "layers.bg_circle.opacity" target: "layers.title_text.transform.y" target: "layers.logo.transform.scaleX"

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": {
      "timelineId": "<timelineId>",
      "target": "<target>",
      "keyframes": "<keyframes>"
    },
    "name": "add_keyframes"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesTrack target e.g. "layers.bg_circle.opacity"
keyframesYesArray of keyframes. Minimum 2 keyframes for animation.
requestIdNo
sessionIdNo
timelineIdYesID of the timeline
expectedRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and openWorldHint=false; the description adds genuine behavioral context beyond that — the write auto-creates a timeline and track when missing, and `style.fill.color` is explicitly SNAP and does NOT interpolate, which is a non-obvious rendering trait. It stops short of stating what happens to existing keyframes at the same timeMs, whether calls are idempotent, or how `expectedRevision` conflicts surface.

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?

The purpose is front-loaded in sentence one, followed by clearly labeled reference blocks (TRACK TARGET FORMAT, AVAILABLE PROPERTIES, EXAMPLES) that an agent can scan rather than parse. It is long, but the property table with units and the snap warning each earn their space; a few examples repeat the same format and could be trimmed.

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

Completeness3/5

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

For a mutation tool with no output schema, the description covers the input contract thoroughly but says nothing about the return value (created track/keyframe ids, resulting revision) or the concurrency role of `expectedRevision`. The most consequential unknown for an animator agent — whether adding keyframes overwrites existing ones at the same timeMs — is unaddressed.

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?

With only 50% schema coverage, the description carries the load and does so well: it defines the `layers.{layerId}.{property}` target grammar, enumerates every valid property with units and value ranges, and gives three concrete target examples. It leaves `requestId`, `sessionId`, and `expectedRevision` entirely unexplained in both schema and prose, which keeps it off a 5.

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

Purpose4/5

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

"Add keyframes to animate a layer property" is a specific verb+resource statement, and the target-format and property blocks make the scope concrete. It does not distinguish itself from the sibling `set_keyframes` (or `update_track`/`remove_track`), so an agent cannot tell from this text alone which of the two keyframe-writing tools to pick.

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

Usage Guidelines3/5

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

Usage is implied by the opening sentence and the note that a timeline + track are auto-created if missing, which helps an agent decide it can call this on a fresh scene. There is no explicit when-not guidance and no reference to the near-duplicate `set_keyframes` sibling, which is the most likely mis-selection risk here.

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