Skip to main content
Glama

Set animation

clip.set_animation
Idempotent

Entrance, exit and loop presets layered over the clip transform (video://catalog/animations): e.g. in {name: "pop", duration_frames: 12}, loop {name: "float"}; a loop runs the whole clip, or only from_frame to to_frame of it (loop {name: "shake", from_frame: 30, to_frame: 45} for a jolt). null removes one. Returns the edit result (see the server instructions).

Input Schema

NameRequiredDescriptionDefault
inNoEntrance, from the clip start
outNoExit, ending at the clip end
loopNoRepeats over the clip, or over from_frame to to_frame of it
clip_idYes
previewNoinline: image in the result; link: URI that renders on read; nonelink
timeline_idYesTimeline handle; every edit returns a new one

Output Schema

NameRequiredDescriptionDefault
parentYesTimeline handle; every edit returns a new one
changedYes
clip_idNo
previewYes
clip_idsNo
track_idNo
warningsYes
placementsNoWhere each clip the edit moved, cropped, masked or animated shows, sequence pixels
timeline_idYesTimeline handle; every edit returns a new one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / loop / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "name": {
      -        "enum": [
      -          "pulse",
      -          "sway",
      -          "shake",
      -          "float",
      -          "spin",
      -          "flicker"
      -        ],
      -        "type": "string"
      -      },
      -      "period_frames": {
      -        "exclusiveMinimum": 0,
      -        "maximum": 100000,
      -        "type": "integer"
      -      },
      -      "strength": {
      -        "default": 1,
      -        "maximum": 5,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "from_frame": {
      +        "description": "Frame from the clip start where it begins, its first repeat starting there; like keyframes it stays on that moment of the source through trims and splits. Default the clip start",
      +        "maximum": 10000000,
      +        "minimum": -10000000,
      +        "type": "integer"
      +      },
      +      "name": {
      +        "enum": [
      +          "pulse",
      +          "sway",
      +          "shake",
      +          "float",
      +          "spin",
      +          "flicker"
      +        ],
      +        "type": "string"
      +      },
      +      "period_frames": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 100000,
      +        "type": "integer"
      +      },
      +      "strength": {
      +        "default": 1,
      +        "maximum": 5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "to_frame": {
      +        "description": "Frame from the clip start it stops before, back at rest. Default the clip end",
      +        "maximum": 10000000,
      +        "minimum": -10000000,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / loop / description
      Previous value: -"Repeats for the whole clip"New value: +"Repeats over the clip, or over from_frame to to_frame of it"
    • addedOutput schema / properties / placements
      Added value: +{
      +  "description": "Where each clip the edit moved, cropped, masked or animated shows, sequence pixels",
      +  "items": {
      +    "properties": {
      +      "clip_id": {
      +        "type": "string"
      +      },
      +      "complete": {
      +        "description": "true: values move in straight lines between entries; false: evenly sampled",
      +        "type": "boolean"
      +      },
      +      "frames": {
      +        "items": {
      +          "properties": {
      +            "frame": {
      +              "description": "From the clip start",
      +              "type": "number"
      +            },
      +            "opacity": {
      +              "type": "number"
      +            },
      +            "picture": {
      +              "description": "The whole picture, before crop and mask and rotation",
      +              "properties": {
      +                "h": {
      +                  "type": "number"
      +                },
      +                "w": {
      +                  "type": "number"
      +                },
      +                "x": {
      +                  "type": "number"
      +                },
      +                "y": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "x",
      +                "y",
      +                "w",
      +                "h"
      +              ],
      +              "type": "object"
      +            },
      +            "rotation": {
      +              "type": "number"
      +            },
      +            "source": {
      +              "anyOf": [
      +                {
      +                  "properties": {
      +                    "h": {
      +                      "type": "number"
      +                    },
      +                    "w": {
      +                      "type": "number"
      +                    },
      +                    "x": {
      +                      "type": "number"
      +                    },
      +                    "y": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "x",
      +                    "y",
      +                    "w",
      +                    "h"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The part of the source that shows, source pixels"
      +            },
      +            "visible": {
      +              "anyOf": [
      +                {
      +                  "properties": {
      +                    "h": {
      +                      "type": "number"
      +                    },
      +                    "w": {
      +                      "type": "number"
      +                    },
      +                    "x": {
      +                      "type": "number"
      +                    },
      +                    "y": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "x",
      +                    "y",
      +                    "w",
      +                    "h"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "What it shows: crop and mask applied, rotated, inside the frame; null: nothing"
      +            }
      +          },
      +          "required": [
      +            "frame",
      +            "picture",
      +            "rotation",
      +            "opacity",
      +            "visible",
      +            "source"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "clip_id",
      +      "frames",
      +      "complete"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-destructive, idempotent, closed-world. The description adds real behavioral content beyond them: null clears a preset, a loop can be confined to a frame range, and the call returns an edit result. It does not restate that each edit yields a new timeline_id (left to the schema).

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?

One front-loaded sentence carries the purpose, three inline examples, the removal rule and the return note — no wasted lines. It is dense to the point of being a run-on with stacked parentheticals, which slightly hurts scannability.

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?

With an output schema present and the return value deferred to server instructions, the description need only cover intent and slot semantics, which it does. Minor gaps: no mention of preview behavior or how in/out interact with loop on the same clip.

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 83%, yet the description still earns credit by explaining loop scope semantics (whole clip vs from_frame–to_frame) with a concrete jolt example, and by naming null as the removal value for each slot. The only untouched parameter is clip_id, which is self-evident.

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 exactly what is set — entrance, exit and loop animation presets — and anchors them as layered over the clip transform, which separates this from clip.set_transform and transition.add. The catalog reference (video://catalog/animations) makes the resource concrete.

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

Usage Guidelines4/5

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

Shows the calling patterns for each slot and, critically, states that passing null removes an animation — the only removal path given there is no clip.remove_animation sibling. It does not explicitly contrast with clip.set_transform or transition.add, so the routing guidance is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.