Skip to main content
Glama

Add mask

add_mask

Create rectangular, elliptical, or free-path masks on any After Effects layer, with mode, feather, opacity, expansion, and inversion controls for precise selective transparency.

Instructions

Add a mask to any layer (solid, footage, precomp, shape, text...): rect (optional rounded corners), ellipse (true bezier circle) or free path, in LAYER pixel coordinates (origin = layer top-left). Defaults to the full layer bounds. Sets mode (default add), feather, opacity, expansion, inverted, motion blur, color and name.

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": {
      "layer": "<layer>"
    },
    "name": "add_mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
modeNoMask mode.
nameNoMask name (default 'Mask N').
sizeNorect/ellipse [w,h] in layer pixels. Default: full layer size (shape/text layers: their content bounds).
typeNoMask shape (default rect, or path when vertices are given).
colorNoMask outline color in the UI.
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
boundsNoAlternative to position/size: [left, top, width, height] in layer pixels.
closedNoClosed path (default true).
lockedNoLock the mask.
featherNoMask feather px: number or [x,y].
opacityNoMask opacity 0-100.
invertedNoInvert the mask.
positionNorect/ellipse center in LAYER pixels (origin = layer top-left). Default: center of the layer.
verticesNoPath points [[x,y],...] (type 'path'). Coordinates relative to the group origin.
expansionNoMask expansion px (negative shrinks).
roundnessNorect corner radius px.
inTangentsNoIncoming bezier handles per vertex, RELATIVE to each vertex. Default all [0,0] (straight lines).
motionBlurNoMask motion blur.
rotoBezierNoUse RotoBezier for the path.
outTangentsNoOutgoing bezier handles per vertex, relative to each vertex. Default all [0,0].
featherFalloffNoFeather falloff.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the write/no-destroy profile is already given; the description adds genuinely new behavioral context — the LAYER pixel coordinate origin (top-left), that size/position default to the full layer bounds, and that mode defaults to 'add'. It does not mention what is returned (mask index/name) or whether an existing mask list is affected, which keeps it below 5.

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?

A single dense but well-ordered sentence group: resource and layer kinds first, then shape types, then the coordinate-space caveat, then defaults and settable properties. No filler, though the packed parenthetical list of properties is close to restating the schema field names.

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 22-parameter creation tool with no output schema and thin annotations, the description covers the highest-risk ambiguities — coordinate space, default size/position, and default mode. Missing are the return value (e.g., created mask index) and any note on layer/comp prerequisites, which leaves a small but real gap.

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?

Schema coverage is 100%, so the baseline is 3, and the description still adds meaning beyond the schema: it names the coordinate space (layer pixels, origin at layer top-left), states the default extent (full layer bounds) and the default mode, and enumerates the property families (feather, opacity, expansion, inverted, motion blur, color, name) so the agent knows the full surface it can set in one call.

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 a specific verb and resource ("Add a mask to any layer") and immediately enumerates the supported layer kinds and mask types (rect with rounded corners, true-bezier ellipse, free path). This clearly separates it from siblings such as set_mask_path and set_mask_properties, which modify an existing mask rather than create one.

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 creation framing plus the note that coordinates are in layer pixels and the shape defaults to full layer bounds, which tells the agent what it gets if it supplies nothing else. However, there is no explicit statement of when to prefer this over set_mask_path/set_mask_properties or of any prerequisites (active comp, unlocked layer).

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