Skip to main content
Glama

Set mask

clip.set_mask
Idempotent

Select part of a video clip, then show, hide or fill it: rectangle (rounded), ellipse, linear, mirror, heart, star, polygon or matte (a media's alpha, e.g. a create.cutout), with feather and invert. Several shapes: add. A fill paints the selection from the picture around it and from earlier frames where that area showed, so something that never moves against its background leaves a smudge: nothing ever shows what is behind it. It is a job of its own (job.list shows its progress); a render that needs it names the job until it is done, and an export waits for it. Position, size and rotation animate like transform values. Coordinates are fractions of the clip's fitted frame: a sequence-shaped box with the picture fitted inside (bars where the shapes differ), before the clip's scale and position. A narrower picture fills k = (its aspect / the sequence's) of the box width, centred, so a picture-fraction box maps to x = 0.5 + (x - 0.5) * k, width * k (a wider picture: the same on y and height, with k = the sequence aspect / its). null removes the mask. 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>",
      "mask": "<mask>",
      "timeline_id": "<timeline_id>"
    },
    "name": "clip.set_mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
maskYesnull removes the mask
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
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
    • 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"
  2. 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)"
  3. Changed2 schema fields changed
    • 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"
  4. Changed1 schema field changed
    • changedInput schema / properties / mask / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "add": {
      -        "description": "More shapes in the same selection, e.g. two panels; feather, invert and mode apply to all",
      -        "items": {
      -          "$ref": "#/$defs/MaskShape"
      -        },
      -        "maxItems": 8,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "corner_radius": {
      -        "description": "rectangle: corner radius as a fraction of its short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "feather": {
      -        "description": "Soft edge as a fraction of the picture short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "height": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      -      },
      -      "invert": {
      -        "description": "Select the outside instead",
      -        "type": "boolean"
      -      },
      -      "media_id": {
      -        "description": "matte: media whose alpha (or brightness) selects",
      -        "pattern": "^m_[0-9a-z]{26}$",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "description": "show (default) only the selection, hide it, or fill it: painted in from its surroundings",
      -        "enum": [
      -          "show",
      -          "hide",
      -          "fill"
      -        ],
      -        "type": "string"
      -      },
      -      "points": {
      -        "anyOf": [
      -          {
      -            "$ref": "#/$defs/MaskPoints"
      -          },
      -          {
      -            "properties": {
      -              "keyframes": {
      -                "items": {
      -                  "properties": {
      -                    "ease": {
      -                      "type": "string"
      -                    },
      -                    "frame": {
      -                      "maximum": 100000000,
      -                      "minimum": -1000000,
      -                      "type": "integer"
      -                    },
      -                    "points": {
      -                      "$ref": "#/$defs/MaskPoints"
      -                    }
      -                  },
      -                  "required": [
      -                    "frame",
      -                    "points"
      -                  ],
      -                  "type": "object"
      -                },
      -                "maxItems": 1000,
      -                "minItems": 1,
      -                "type": "array"
      -              }
      -            },
      -            "required": [
      -              "keyframes"
      -            ],
      -            "type": "object"
      -          }
      -        ],
      -        "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      -      },
      -      "rotation": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      -      },
      -      "shape": {
      -        "enum": [
      -          "rectangle",
      -          "ellipse",
      -          "linear",
      -          "mirror",
      -          "heart",
      -          "star",
      -          "polygon",
      -          "matte"
      -        ],
      -        "type": "string"
      -      },
      -      "width": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      -      },
      -      "x": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      -      },
      -      "y": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      -      }
      -    },
      -    "required": [
      -      "shape"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "add": {
      +        "description": "More shapes in the same selection, e.g. two panels; feather, invert and mode apply to all",
      +        "items": {
      +          "$ref": "#/$defs/MaskShape"
      +        },
      +        "maxItems": 8,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "corner_radius": {
      +        "description": "rectangle: corner radius as a fraction of its short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "feather": {
      +        "description": "Soft edge as a fraction of the picture short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "height": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      +      },
      +      "invert": {
      +        "description": "Select the outside instead",
      +        "type": "boolean"
      +      },
      +      "media_id": {
      +        "description": "matte: media whose alpha (or brightness) selects",
      +        "pattern": "^m_[0-9a-z]{26}$",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "description": "show (default) only the selection, hide it, or fill it (painted in from around it and from earlier frames)",
      +        "enum": [
      +          "show",
      +          "hide",
      +          "fill"
      +        ],
      +        "type": "string"
      +      },
      +      "points": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/MaskPoints"
      +          },
      +          {
      +            "properties": {
      +              "keyframes": {
      +                "items": {
      +                  "properties": {
      +                    "ease": {
      +                      "type": "string"
      +                    },
      +                    "frame": {
      +                      "maximum": 100000000,
      +                      "minimum": -1000000,
      +                      "type": "integer"
      +                    },
      +                    "points": {
      +                      "$ref": "#/$defs/MaskPoints"
      +                    }
      +                  },
      +                  "required": [
      +                    "frame",
      +                    "points"
      +                  ],
      +                  "type": "object"
      +                },
      +                "maxItems": 1000,
      +                "minItems": 1,
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "keyframes"
      +            ],
      +            "type": "object"
      +          }
      +        ],
      +        "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      +      },
      +      "rotation": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      +      },
      +      "shape": {
      +        "enum": [
      +          "rectangle",
      +          "ellipse",
      +          "linear",
      +          "mirror",
      +          "heart",
      +          "star",
      +          "polygon",
      +          "matte"
      +        ],
      +        "type": "string"
      +      },
      +      "width": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      +      },
      +      "x": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      },
      +      "y": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      }
      +    },
      +    "required": [
      +      "shape"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  5. Changed2 schema fields changed
    • addedInput schema / $defs / MaskShape
      Added value: +{
      +  "properties": {
      +    "corner_radius": {
      +      "description": "rectangle: corner radius as a fraction of its short side",
      +      "maximum": 0.5,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "height": {
      +      "$ref": "#/$defs/Animatable",
      +      "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      +    },
      +    "media_id": {
      +      "description": "matte: media whose alpha (or brightness) selects",
      +      "pattern": "^m_[0-9a-z]{26}$",
      +      "type": "string"
      +    },
      +    "points": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/MaskPoints"
      +        },
      +        {
      +          "properties": {
      +            "keyframes": {
      +              "items": {
      +                "properties": {
      +                  "ease": {
      +                    "type": "string"
      +                  },
      +                  "frame": {
      +                    "maximum": 100000000,
      +                    "minimum": -1000000,
      +                    "type": "integer"
      +                  },
      +                  "points": {
      +                    "$ref": "#/$defs/MaskPoints"
      +                  }
      +                },
      +                "required": [
      +                  "frame",
      +                  "points"
      +                ],
      +                "type": "object"
      +              },
      +              "maxItems": 1000,
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "keyframes"
      +          ],
      +          "type": "object"
      +        }
      +      ],
      +      "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      +    },
      +    "rotation": {
      +      "$ref": "#/$defs/Animatable",
      +      "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      +    },
      +    "shape": {
      +      "enum": [
      +        "rectangle",
      +        "ellipse",
      +        "linear",
      +        "mirror",
      +        "heart",
      +        "star",
      +        "polygon",
      +        "matte"
      +      ],
      +      "type": "string"
      +    },
      +    "width": {
      +      "$ref": "#/$defs/Animatable",
      +      "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      +    },
      +    "x": {
      +      "$ref": "#/$defs/Animatable",
      +      "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +    },
      +    "y": {
      +      "$ref": "#/$defs/Animatable",
      +      "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +    }
      +  },
      +  "required": [
      +    "shape"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / mask / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "corner_radius": {
      -        "description": "rectangle: corner radius as a fraction of its short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "feather": {
      -        "description": "Soft edge as a fraction of the picture short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "height": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      -      },
      -      "invert": {
      -        "description": "Select the outside instead",
      -        "type": "boolean"
      -      },
      -      "media_id": {
      -        "description": "matte: media whose alpha (or brightness) selects",
      -        "pattern": "^m_[0-9a-z]{26}$",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "description": "show (default) only the selection, hide it, or fill it from its surroundings",
      -        "enum": [
      -          "show",
      -          "hide",
      -          "fill"
      -        ],
      -        "type": "string"
      -      },
      -      "points": {
      -        "anyOf": [
      -          {
      -            "$ref": "#/$defs/MaskPoints"
      -          },
      -          {
      -            "properties": {
      -              "keyframes": {
      -                "items": {
      -                  "properties": {
      -                    "ease": {
      -                      "type": "string"
      -                    },
      -                    "frame": {
      -                      "maximum": 100000000,
      -                      "minimum": -1000000,
      -                      "type": "integer"
      -                    },
      -                    "points": {
      -                      "$ref": "#/$defs/MaskPoints"
      -                    }
      -                  },
      -                  "required": [
      -                    "frame",
      -                    "points"
      -                  ],
      -                  "type": "object"
      -                },
      -                "maxItems": 1000,
      -                "minItems": 1,
      -                "type": "array"
      -              }
      -            },
      -            "required": [
      -              "keyframes"
      -            ],
      -            "type": "object"
      -          }
      -        ],
      -        "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      -      },
      -      "rotation": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      -      },
      -      "shape": {
      -        "enum": [
      -          "rectangle",
      -          "ellipse",
      -          "linear",
      -          "mirror",
      -          "heart",
      -          "star",
      -          "polygon",
      -          "matte"
      -        ],
      -        "type": "string"
      -      },
      -      "width": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      -      },
      -      "x": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      -      },
      -      "y": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      -      }
      -    },
      -    "required": [
      -      "shape"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "add": {
      +        "description": "More shapes in the same selection, e.g. two panels; feather, invert and mode apply to all",
      +        "items": {
      +          "$ref": "#/$defs/MaskShape"
      +        },
      +        "maxItems": 8,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "corner_radius": {
      +        "description": "rectangle: corner radius as a fraction of its short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "feather": {
      +        "description": "Soft edge as a fraction of the picture short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "height": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      +      },
      +      "invert": {
      +        "description": "Select the outside instead",
      +        "type": "boolean"
      +      },
      +      "media_id": {
      +        "description": "matte: media whose alpha (or brightness) selects",
      +        "pattern": "^m_[0-9a-z]{26}$",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "description": "show (default) only the selection, hide it, or fill it: painted in from its surroundings",
      +        "enum": [
      +          "show",
      +          "hide",
      +          "fill"
      +        ],
      +        "type": "string"
      +      },
      +      "points": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/MaskPoints"
      +          },
      +          {
      +            "properties": {
      +              "keyframes": {
      +                "items": {
      +                  "properties": {
      +                    "ease": {
      +                      "type": "string"
      +                    },
      +                    "frame": {
      +                      "maximum": 100000000,
      +                      "minimum": -1000000,
      +                      "type": "integer"
      +                    },
      +                    "points": {
      +                      "$ref": "#/$defs/MaskPoints"
      +                    }
      +                  },
      +                  "required": [
      +                    "frame",
      +                    "points"
      +                  ],
      +                  "type": "object"
      +                },
      +                "maxItems": 1000,
      +                "minItems": 1,
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "keyframes"
      +            ],
      +            "type": "object"
      +          }
      +        ],
      +        "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      +      },
      +      "rotation": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      +      },
      +      "shape": {
      +        "enum": [
      +          "rectangle",
      +          "ellipse",
      +          "linear",
      +          "mirror",
      +          "heart",
      +          "star",
      +          "polygon",
      +          "matte"
      +        ],
      +        "type": "string"
      +      },
      +      "width": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      +      },
      +      "x": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      },
      +      "y": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      }
      +    },
      +    "required": [
      +      "shape"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  6. 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"
      +  }
      +]
    • addedInput schema / $defs / MaskPoints
      Added value: +{
      +  "items": {
      +    "items": false,
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "prefixItems": [
      +      {
      +        "maximum": 5,
      +        "minimum": -4,
      +        "type": "number"
      +      },
      +      {
      +        "maximum": 5,
      +        "minimum": -4,
      +        "type": "number"
      +      }
      +    ],
      +    "type": "array"
      +  },
      +  "maxItems": 64,
      +  "minItems": 3,
      +  "type": "array"
      +}
    • changedInput schema / properties / mask / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "corner_radius": {
      -        "description": "rectangle: corner radius as a fraction of its short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "feather": {
      -        "description": "Soft edge as a fraction of the picture short side",
      -        "maximum": 0.5,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "height": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the picture height (default 0.5); band thickness for mirror; 0 to 10"
      -      },
      -      "invert": {
      -        "description": "Keep the outside instead",
      -        "type": "boolean"
      -      },
      -      "points": {
      -        "description": "polygon: [x, y] corners in the clip picture, 0–1",
      -        "items": {
      -          "items": false,
      -          "maxItems": 2,
      -          "minItems": 2,
      -          "prefixItems": [
      -            {
      -              "maximum": 5,
      -              "minimum": -4,
      -              "type": "number"
      -            },
      -            {
      -              "maximum": 5,
      -              "minimum": -4,
      -              "type": "number"
      -            }
      -          ],
      -          "type": "array"
      -        },
      -        "maxItems": 64,
      -        "minItems": 3,
      -        "type": "array"
      -      },
      -      "rotation": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      -      },
      -      "shape": {
      -        "enum": [
      -          "rectangle",
      -          "ellipse",
      -          "linear",
      -          "mirror",
      -          "heart",
      -          "star",
      -          "polygon"
      -        ],
      -        "type": "string"
      -      },
      -      "width": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Fraction of the picture width (default 0.5); 0 to 10"
      -      },
      -      "x": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre x in the clip picture, 0–1 (default 0.5); -4 to 5"
      -      },
      -      "y": {
      -        "$ref": "#/$defs/Animatable",
      -        "description": "Mask centre y in the clip picture, 0–1 (default 0.5); -4 to 5"
      -      }
      -    },
      -    "required": [
      -      "shape"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "corner_radius": {
      +        "description": "rectangle: corner radius as a fraction of its short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "feather": {
      +        "description": "Soft edge as a fraction of the picture short side",
      +        "maximum": 0.5,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "height": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame height (default 0.5); band thickness for mirror; 0 to 10"
      +      },
      +      "invert": {
      +        "description": "Select the outside instead",
      +        "type": "boolean"
      +      },
      +      "media_id": {
      +        "description": "matte: media whose alpha (or brightness) selects",
      +        "pattern": "^m_[0-9a-z]{26}$",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "description": "show (default) only the selection, hide it, or fill it from its surroundings",
      +        "enum": [
      +          "show",
      +          "hide",
      +          "fill"
      +        ],
      +        "type": "string"
      +      },
      +      "points": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/MaskPoints"
      +          },
      +          {
      +            "properties": {
      +              "keyframes": {
      +                "items": {
      +                  "properties": {
      +                    "ease": {
      +                      "type": "string"
      +                    },
      +                    "frame": {
      +                      "maximum": 100000000,
      +                      "minimum": -1000000,
      +                      "type": "integer"
      +                    },
      +                    "points": {
      +                      "$ref": "#/$defs/MaskPoints"
      +                    }
      +                  },
      +                  "required": [
      +                    "frame",
      +                    "points"
      +                  ],
      +                  "type": "object"
      +                },
      +                "maxItems": 1000,
      +                "minItems": 1,
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "keyframes"
      +            ],
      +            "type": "object"
      +          }
      +        ],
      +        "description": "polygon: [x, y] corners in the fitted frame, 0–1, or {keyframes: [{frame, points, ease}]}"
      +      },
      +      "rotation": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Degrees clockwise; for linear, the edge angle; -36000 to 36000"
      +      },
      +      "shape": {
      +        "enum": [
      +          "rectangle",
      +          "ellipse",
      +          "linear",
      +          "mirror",
      +          "heart",
      +          "star",
      +          "polygon",
      +          "matte"
      +        ],
      +        "type": "string"
      +      },
      +      "width": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Fraction of the fitted frame width (default 0.5); 0 to 10"
      +      },
      +      "x": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre x in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      },
      +      "y": {
      +        "$ref": "#/$defs/Animatable",
      +        "description": "Mask centre y in the fitted frame, 0–1 (default 0.5); -4 to 5"
      +      }
      +    },
      +    "required": [
      +      "shape"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "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"
      +}
  7. 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 (idempotentHint, destructiveHint=false), the description discloses non-obvious behavior: the mask operation is an asynchronous job whose progress is visible via job.list, renders and exports block on it, and each call returns a NEW timeline_id that must be used for subsequent edits. It also warns about the fill mode's smudge artifact when an object never moves against its background, which is exactly the kind of consequence an agent cannot derive from schema alone.

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 and every paragraph addresses a distinct concern (shapes, fill caveat, async job, coordinate system, return value). The aspect-ratio mapping sentence is dense and formula-heavy, but it is load-bearing information rather than filler.

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 four-parameter mutation tool with an output schema, this covers everything an agent needs: shape vocabulary, mode semantics, coordinate reference frame, animation behavior, asynchronous job lifecycle, return contract, and mask removal. Nothing material is left to guesswork.

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 75%, but the description adds real meaning the schema lacks: coordinates are fractions of the clip's fitted-frame box before the clip's scale/position, and it supplies the letterbox mapping formula (k = picture aspect / sequence aspect, x' = 0.5 + (x-0.5)*k) for non-matching aspect ratios. It also clarifies that position/size/rotation are animatable like transform values, though it does not elaborate on the 'preview' parameter.

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 opening clause gives a concrete verb and resource ('Select part of a video clip, then show, hide or fill it') and immediately enumerates the supported shape kinds (rectangle, ellipse, linear, mirror, heart, star, polygon, matte). It further separates this tool from related siblings by pointing at create.cutout as a matte source and job.list for progress tracking.

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 explains the selection modes (show/hide/fill), that additional shapes belong in 'add', and that null removes the mask, which tells an agent how to invoke it in different intents. What it does not do is explicitly contrast this tool with the nearby create.matte or create.cutout siblings, so the agent must infer when a matte-based mask is preferable to a dedicated matte job.

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.