Skip to main content
Glama

Set transform

clip.set_transform
Idempotent

Position, scale, rotate, fade, flip, crop or fit a video clip over the tracks below (picture-in-picture, overlays, punch-ins). fit none shows a graphic at its own pixel size, so scale 1 is its real size; the default contain scales it to touch the frame edges. Any number takes a constant or {keyframes: [{frame, value, ease}]} with frames from the clip start; a keyframe's ease shapes the move from it to the next one (sine_in_out, cubic_out, back_out, hold and more). Overlays that must follow a zoom or pan: put the clip and its overlays in a timeline of the same shape, nest it with clip.add {nested_timeline_id} and transform the nested clip, so everything moves together. Omitted fields keep their value; null resets one. To pin an overlay to a moving subject, use media.analyze track boxes as keyframes: for each box, frame = timeline frame of the box time (where the tracked clip plays that media second) minus this clip's start, x = box x + w/2 and y = box y + h/2 (add your offset). That holds when the tracked clip fills the frame as is; if it is scaled, moved or cropped, map the box through its transform first. Skip boxes with found false. The result's placements say where the clip now shows, in sequence pixels: its picture box, the part visible after crop and mask inside the frame, and the source pixels that show there. corners pins the picture's four corners to four points in the frame instead (a screen, sign or page seen at an angle, or a tilt in 3D), keyframable the same way; it replaces x, y, scale, scale_x, scale_y, rotation and fit, while opacity, flip, crop and masks still apply. Returns the new timeline_id (edit that one next), what changed, and where each changed clip now sits.

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": {
      "clip_id": "<clip_id>",
      "timeline_id": "<timeline_id>"
    },
    "name": "clip.set_transform"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoCentre x, 0 = left edge, 1 = right edge (default 0.5); -4 to 5
yNoCentre y, 0 = top, 1 = bottom (default 0.5); -4 to 5
fitNo
cropNo
flipNo
scaleNoSize relative to the fit (default 1); 0 to 20
clip_idYes
cornersNoCorner pin: where the picture's four corners land, as [x, y] in fractions of the frame (-1 to 2), in the order top left, top right, bottom right, bottom left; or {keyframes: [{frame, corners, ease}]}. Replaces x, y, scale, scale_x, scale_y, rotation and fit; null removes it
opacityNoOpacity (default 1); 0 to 1
previewNoinline: image in the result; link: URI that renders on read; nonelink
scale_xNoExtra horizontal stretch (default 1); 0 to 20
scale_yNoExtra vertical stretch (default 1); 0 to 20
rotationNoDegrees clockwise (default 0); -36000 to 36000
timeline_idYesTimeline handle; every edit returns a new one

Output Schema

NameRequiredDescriptionDefault
parentYesThe version this edit started from
changedYesWhat the edit added, removed or modified; a clip or transition says its track and where it now sits (frames, end exclusive)
clip_idNoThe clip this edit made or acted on (each tool says which)
previewYes
clip_idsNoEvery clip this edit made or acted on, linked ones included (each tool says which)
track_idNo
warningsYes
placementsNoWhere each clip the edit moved, cropped, masked or animated shows, sequence pixels; for a title or caption, the area it can draw in, not the text itself
timeline_idYesThe new version: edit this one next (older ids stay valid)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / crop / anyOf
      Previous value: -[
      -  {
      -    "description": "Hidden from each edge, in fractions of the clip's fitted frame (the sequence-shaped box with the picture fitted inside, bars included, as for masks); the rest stays where it was",
      -    "properties": {
      -      "bottom": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "left": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "right": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "top": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Hidden from each edge, as fractions (see of); the rest stays where it was. The placements in the result give the source pixels that show",
      +    "properties": {
      +      "bottom": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "left": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "of": {
      +        "description": "What the fractions are of. frame (default): the clip's fitted frame, the sequence-shaped box with the picture fitted inside, bars included, as for masks. source: the source picture's own width and height, whatever the fit, scale, flip or sequence shape, so a box in source pixels ÷ the source size crops exactly",
      +        "enum": [
      +          "frame",
      +          "source"
      +        ],
      +        "type": "string"
      +      },
      +      "right": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "top": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / properties / placements / description
      Previous value: -"Where each clip the edit moved, cropped, masked or animated shows, sequence pixels"New value: +"Where each clip the edit moved, cropped, masked or animated shows, sequence pixels; for a title or caption, the area it can draw in, not the text itself"
  3. Changed5 schema fields changed
    • addedOutput schema / properties / changed / description
      Added value: +"What the edit added, removed or modified; a clip or transition says its track and where it now sits (frames, end exclusive)"
    • addedOutput schema / properties / clip_id / description
      Added value: +"The clip this edit made or acted on (each tool says which)"
    • addedOutput schema / properties / clip_ids / description
      Added value: +"Every clip this edit made or acted on, linked ones included (each tool says which)"
    • changedOutput schema / properties / parent / description
      Previous value: -"Timeline handle; every edit returns a new one"New value: +"The version this edit started from"
    • changedOutput schema / properties / timeline_id / description
      Previous value: -"Timeline handle; every edit returns a new one"New value: +"The new version: edit this one next (older ids stay valid)"
  4. Changed4 schema fields changed
    • addedInput schema / $defs / CornerPoints
      Added value: +{
      +  "items": {
      +    "items": false,
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "prefixItems": [
      +      {
      +        "maximum": 2,
      +        "minimum": -1,
      +        "type": "number"
      +      },
      +      {
      +        "maximum": 2,
      +        "minimum": -1,
      +        "type": "number"
      +      }
      +    ],
      +    "type": "array"
      +  },
      +  "maxItems": 4,
      +  "minItems": 4,
      +  "type": "array"
      +}
    • addedInput schema / properties / corners
      Added value: +{
      +  "anyOf": [
      +    {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/CornerPoints"
      +        },
      +        {
      +          "properties": {
      +            "keyframes": {
      +              "items": {
      +                "properties": {
      +                  "corners": {
      +                    "$ref": "#/$defs/CornerPoints"
      +                  },
      +                  "ease": {
      +                    "type": "string"
      +                  },
      +                  "frame": {
      +                    "maximum": 100000000,
      +                    "minimum": -1000000,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "frame",
      +                  "corners"
      +                ],
      +                "type": "object"
      +              },
      +              "maxItems": 1000,
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "keyframes"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Corner pin: where the picture's four corners land, as [x, y] in fractions of the frame (-1 to 2), in the order top left, top right, bottom right, bottom left; or {keyframes: [{frame, corners, ease}]}. Replaces x, y, scale, scale_x, scale_y, rotation and fit; null removes it"
      +}
    • addedOutput schema / properties / placements / items / properties / frames / items / properties / corners
      Added value: +{
      +  "description": "Corner pin: where the picture corners land, top left, top right, bottom right, bottom left",
      +  "items": {
      +    "properties": {
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "x",
      +      "y"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 4,
      +  "minItems": 4,
      +  "type": "array"
      +}
    • changedOutput schema / properties / placements / items / properties / frames / items / properties / picture / description
      Previous value: -"The whole picture, before crop and mask and rotation"New value: +"The whole picture, before crop and mask and rotation; for a corner pin, the box around its corners"
  5. Changed4 schema fields changed
    • changedInput schema / $defs / Animatable / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "properties": {
      -      "keyframes": {
      -        "description": "frame is relative to the clip start; ease from video://catalog/eases",
      -        "items": {
      -          "properties": {
      -            "ease": {
      -              "type": "string"
      -            },
      -            "frame": {
      -              "maximum": 100000000,
      -              "minimum": -1000000,
      -              "type": "integer"
      -            },
      -            "value": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "frame",
      -            "value"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "keyframes"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "keyframes": {
      +        "description": "frame is from the clip start; ease shapes the move from this keyframe to the next (default linear; hold waits, then jumps)",
      +        "items": {
      +          "properties": {
      +            "ease": {
      +              "enum": [
      +                "linear",
      +                "hold",
      +                "smooth",
      +                "sine_in",
      +                "sine_out",
      +                "sine_in_out",
      +                "quad_in",
      +                "quad_out",
      +                "quad_in_out",
      +                "cubic_in",
      +                "cubic_out",
      +                "cubic_in_out",
      +                "quart_in",
      +                "quart_out",
      +                "quart_in_out",
      +                "quint_in",
      +                "quint_out",
      +                "quint_in_out",
      +                "expo_in",
      +                "expo_out",
      +                "expo_in_out",
      +                "circ_in",
      +                "circ_out",
      +                "circ_in_out",
      +                "back_in",
      +                "back_out",
      +                "back_in_out",
      +                "elastic_in",
      +                "elastic_out",
      +                "elastic_in_out",
      +                "bounce_in",
      +                "bounce_out",
      +                "bounce_in_out"
      +              ],
      +              "type": "string"
      +            },
      +            "frame": {
      +              "maximum": 100000000,
      +              "minimum": -1000000,
      +              "type": "integer"
      +            },
      +            "value": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "frame",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "keyframes"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / crop / anyOf
      Previous value: -[
      -  {
      -    "description": "Fractions of the picture hidden from each edge; the rest stays where it was",
      -    "properties": {
      -      "bottom": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "left": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "right": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "top": {
      -        "default": 0,
      -        "maximum": 0.99,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Hidden from each edge, in fractions of the clip's fitted frame (the sequence-shaped box with the picture fitted inside, bars included, as for masks); the rest stays where it was",
      +    "properties": {
      +      "bottom": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "left": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "right": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "top": {
      +        "default": 0,
      +        "maximum": 0.99,
      +        "minimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / fit / anyOf
      Previous value: -[
      -  {
      -    "description": "contain: whole picture inside the frame, scaled up or down to touch its edges (default); cover: fill the frame, cropping; fill: stretch; none: its own pixels at sequence size, unscaled (a 300 px logo stays 300 px on a 1920 px sequence), for logos and graphics made to size",
      -    "enum": [
      -      "contain",
      -      "cover",
      -      "fill",
      -      "none"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "contain: whole picture inside the frame, scaled up or down to touch its edges (default); cover: fill the frame, cropping what overflows equally on both sides (move x or y off 0.5 to show another part); fill: stretch; none: its own pixels at sequence size, unscaled (a 300 px logo stays 300 px on a 1920 px sequence), for logos and graphics made to size",
      +    "enum": [
      +      "contain",
      +      "cover",
      +      "fill",
      +      "none"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • 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"
      +}
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses preservation and reset behavior ('Omitted fields keep their value; null resets one'), explains that corners replaces several transform fields while opacity, flip, crop and masks still apply, and states what the result contains. These are substantive behavioral details not available from the annotations alone.

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

Conciseness3/5

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

The description is front-loaded with the core operation, but it is one dense paragraph of long sentences and nested parentheticals. Most content is useful, yet the structure makes the advanced tracking and corner-pin guidance hard to scan.

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?

For a complex transform tool with 14 parameters, this covers the important conceptual behavior: nested timelines, overlay tracking, corner pinning, field preservation and reset, and result placements. An output schema exists, so the additional return-value summary is helpful rather than required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning well beyond the schema for many parameters: fit 'none' preserves source pixel size, the default 'contain' scales to the frame edges, keyframe frames are relative to clip start, ease shapes the move to the next keyframe, and corners pins four picture corners and replaces x, y, scale, scale_x, scale_y, rotation and fit. Given 14 parameters and only 71% schema coverage, this is a strong semantic supplement.

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 opens with a specific verb list and resource: position, scale, rotate, fade, flip, crop or fit a video clip. It names concrete use cases such as picture-in-picture, overlays and punch-ins, so an agent can identify the operation without opening the schema.

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?

It gives clear contextual guidance for advanced cases: use a nested timeline for overlays that must follow zoom or pan, and use media.analyze track boxes to pin an overlay to a moving subject. It also explains when to use corners instead of x/y/scale/rotation, but it does not explicitly distinguish this tool from the sibling clip.set_animation.

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.