Skip to main content
Glama

Add layer

ae_add_layer

Adds a new layer—solid, text, shape, null, adjustment, camera, light, or project item—to an After Effects composition, returning its index, id, and name.

Instructions

Add one new layer to a composition: solid, text, shape (empty, use ae_add_shape to draw), null, adjustment, camera, light, or an existing project item (footage/comp). Each call adds another layer, on top unless moveToIndex is given. Returns the new layer's index, id and name. Text options apply to text layers only. To edit existing text use ae_set_text, for switches, timing or parent ae_set_layer_attributes (both via ae_call).

Input Schema

NameRequiredDescriptionDefault
compNoComposition: item id (number) or exact name. Omit (or "active") for the active/open composition.
fontNoPostScript font name, e.g. "Arial-BoldMT", "Helvetica", "Montserrat-Bold".
itemNoFor type 'item' (required there): project item to add.
nameNoLayer name (default: After Effects' name, e.g. "Solid", "Camera").
textNoFor type 'text': the text (default empty).
typeYesLayer kind; 'item' adds the project item given in item.
colorNoSolid/adjustment color, or light color.
widthNoSolid/adjustment width in pixels (default: comp width).
heightNoSolid/adjustment height in pixels (default: comp height).
threeDNoMake the layer 3D.
allCapsNoText: all caps.
boxSizeNoParagraph (box) text size [w,h]; omit for point text.
leadingNoText: line spacing in pixels (turns auto leading off).
durationNoLayer duration in seconds (default comp duration).
fauxBoldNoText: faux bold.
fontSizeNoText: font size in pixels.
positionNoLayer position [x,y] or [x,y,z] in comp pixels (cameras and lights default to the comp center).
trackingNoText: tracking (After Effects units, 1/1000 em).
directionNoParagraph direction (AE 24+). Default: text without Hebrew/Arabic characters is set left to right whatever the user's AE type preference is.
fillColorNoText: fill color, "#rrggbb" or [r,g,b].
lightTypeNoFor type 'light' (default: After Effects' default).
startTimeNoLayer start time in seconds (comp time).
fauxItalicNoText: faux italic.
moveToIndexNoMove the new layer to this 1-based index (new layers are added on top).
strokeColorNoText: stroke color, "#rrggbb" or [r,g,b].
strokeWidthNoText: stroke width in pixels.
justificationNoText: paragraph alignment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv0.1.3
    • addedInput schema / properties / allCaps / description
      Added value: +"Text: all caps."
    • addedInput schema / properties / fauxBold / description
      Added value: +"Text: faux bold."
    • addedInput schema / properties / fauxItalic / description
      Added value: +"Text: faux italic."
    • changedInput schema / properties / fillColor / description
      Previous value: -"Color as \"#rrggbb\" or [r,g,b] (0-1 or 0-255)."New value: +"Text: fill color, \"#rrggbb\" or [r,g,b]."
    • addedInput schema / properties / fontSize / description
      Added value: +"Text: font size in pixels."
    • addedInput schema / properties / height / description
      Added value: +"Solid/adjustment height in pixels (default: comp height)."
    • changedInput schema / properties / item / description
      Previous value: -"For type 'item': project item to add."New value: +"For type 'item' (required there): project item to add."
    • addedInput schema / properties / justification / description
      Added value: +"Text: paragraph alignment."
    • addedInput schema / properties / leading / description
      Added value: +"Text: line spacing in pixels (turns auto leading off)."
    • addedInput schema / properties / lightType / description
      Added value: +"For type 'light' (default: After Effects' default)."
    • addedInput schema / properties / name / description
      Added value: +"Layer name (default: After Effects' name, e.g. \"Solid\", \"Camera\")."
    • addedInput schema / properties / position / description
      Added value: +"Layer position [x,y] or [x,y,z] in comp pixels (cameras and lights default to the comp center)."
    • addedInput schema / properties / startTime / description
      Added value: +"Layer start time in seconds (comp time)."
    • changedInput schema / properties / strokeColor / description
      Previous value: -"Color as \"#rrggbb\" or [r,g,b] (0-1 or 0-255)."New value: +"Text: stroke color, \"#rrggbb\" or [r,g,b]."
    • addedInput schema / properties / strokeWidth / description
      Added value: +"Text: stroke width in pixels."
    • changedInput schema / properties / text / description
      Previous value: -"For text layers."New value: +"For type 'text': the text (default empty)."
    • addedInput schema / properties / threeD / description
      Added value: +"Make the layer 3D."
    • addedInput schema / properties / tracking / description
      Added value: +"Text: tracking (After Effects units, 1/1000 em)."
    • addedInput schema / properties / type / description
      Added value: +"Layer kind; 'item' adds the project item given in item."
    • changedInput schema / properties / width / description
      Previous value: -"Solid size (default comp size)."New value: +"Solid/adjustment width in pixels (default: comp width)."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare non-readonly and non-idempotent; the description reinforces this by saying each call adds another layer and where it lands (on top unless moveToIndex). It also discloses the return payload (new layer's index, id and name), which the annotations cannot express. It stops short of noting undo/recovery or that the target comp must be open.

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?

Four sentences, front-loaded with the layer-kind enumeration before the placement and return behavior. Dense but every clause carries information (sibling routing, defaults, return shape); the parenthetical asides are the only minor clutter.

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 27-param creation tool with no output schema, the description covers the return value, default placement, and conditional parameter applicability. Missing only ancillary context such as permission/open-project prerequisites or the undo path, which is a modest gap rather than a blocker.

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 100% and all 27 parameters are individually documented, so the baseline is 3. The description adds cross-parameter semantics the schema cannot: text options apply only to text layers, moveToIndex overrides default top placement, and shape layers are created empty. That grouping genuinely helps the agent pick valid parameter subsets for a 27-param tool.

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 (add) and resource (one layer to a composition) and enumerates the supported layer kinds: solid, text, shape, null, adjustment, camera, light, item. It explicitly carves out the empty-shape case to ae_add_shape, so an agent can separate this from the shape sibling without opening a schema.

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

Usage Guidelines5/5

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

Names the alternatives and the conditions that select them: use ae_add_shape to draw into an empty shape, ae_set_text to edit existing text, ae_set_layer_attributes (via ae_call) for switches/timing/parent. It also tells the agent that each call adds exactly one layer and lands on top unless moveToIndex is given, which is the key routing decision between repeat calls.

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