Skip to main content
Glama

Add shape

ae_add_shape

Draws rectangles, ellipses, polygons, stars, or custom paths with fill or stroke as a new shape group in After Effects, either on a new layer or an existing shape layer.

Instructions

Draw a shape (rectangle, ellipse, polygon, star, or custom path) with fill and/or stroke, as a new shape group on a new shape layer or added to an existing shape layer (its other groups are kept). Positions are relative to the layer (new layers are centered in the comp, so [0,0] is the comp center). Returns the layer and the new group. To cut out part of a layer use ae_add_mask (via ae_call).

Input Schema

NameRequiredDescriptionDefault
compNoComposition: item id (number) or exact name. Omit (or "active") for the active/open composition.
fillNoFill color; omit for no fill (unless no stroke either: defaults to white).
nameNoName of the new shape group, and of a new layer (default "Shape Layer").
sizeNo[w,h] in pixels for rectangle/ellipse (default [400,400]); polygon/star radii default from its width.
layerNoExisting shape layer to add to (other layer types fail); omit to create a new one.
shapeYes
closedNoFor 'path': close the path (default true).
pointsNoPolygon/star: number of points (default 5).
strokeNoStroke color; omit for no stroke.
positionNoShape center within the layer (default [0,0]); not used for 'path'.
verticesNoFor 'path' (required): points [[x,y],...] in layer coordinates.
roundnessNoRectangle corner roundness in pixels (default 0).
inTangentsNoFor 'path': incoming Bezier handle per vertex, [[x,y],...] relative to the vertex (default: straight segments).
innerRadiusNoStar: inner radius in pixels (default size[0]/4).
outTangentsNoFor 'path': outgoing Bezier handle per vertex, relative to the vertex.
outerRadiusNoPolygon/star: outer radius in pixels (default size[0]/2).
strokeWidthNoStroke width in pixels (default 4); only with stroke.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.1.3
    • addedInput schema / properties / closed / description
      Added value: +"For 'path': close the path (default true)."
    • addedInput schema / properties / inTangents / description
      Added value: +"For 'path': incoming Bezier handle per vertex, [[x,y],...] relative to the vertex (default: straight segments)."
    • addedInput schema / properties / innerRadius / description
      Added value: +"Star: inner radius in pixels (default size[0]/4)."
    • changedInput schema / properties / layer / description
      Previous value: -"Existing shape layer; omit to create a new one."New value: +"Existing shape layer to add to (other layer types fail); omit to create a new one."
    • addedInput schema / properties / name / description
      Added value: +"Name of the new shape group, and of a new layer (default \"Shape Layer\")."
    • addedInput schema / properties / outTangents / description
      Added value: +"For 'path': outgoing Bezier handle per vertex, relative to the vertex."
    • addedInput schema / properties / outerRadius / description
      Added value: +"Polygon/star: outer radius in pixels (default size[0]/2)."
    • changedInput schema / properties / points / description
      Previous value: -"Polygon/star points."New value: +"Polygon/star: number of points (default 5)."
    • changedInput schema / properties / position / description
      Previous value: -"Shape position within the layer (default [0,0])."New value: +"Shape center within the layer (default [0,0]); not used for 'path'."
    • changedInput schema / properties / roundness / description
      Previous value: -"Rectangle corner roundness."New value: +"Rectangle corner roundness in pixels (default 0)."
    • changedInput schema / properties / size / description
      Previous value: -"[w,h] for rectangle/ellipse (default 400x400)."New value: +"[w,h] in pixels for rectangle/ellipse (default [400,400]); polygon/star radii default from its width."
    • changedInput schema / properties / stroke / description
      Previous value: -"Color as \"#rrggbb\" or [r,g,b] (0-1 or 0-255)."New value: +"Stroke color; omit for no stroke."
    • addedInput schema / properties / strokeWidth / description
      Added value: +"Stroke width in pixels (default 4); only with stroke."
    • changedInput schema / properties / vertices / description
      Previous value: -"For 'path': [[x,y],...]."New value: +"For 'path' (required): points [[x,y],...] in layer coordinates."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the annotations, it explains that a new shape group is created, existing groups are preserved, coordinate positions are layer-relative, new layers are centered in the comp, and it returns the layer and new group. It does not elaborate on non-idempotency or permission requirements, but the annotations already establish the mutation and safety profile.

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

Conciseness5/5

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

The description is front-loaded with the core operation, then adds coordinate semantics, return values, and the mask alternative in a compact sequence. Every sentence contributes actionable information without redundant restatement of schema defaults.

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 17-parameter mutation tool with high schema coverage and no output schema, the description covers layer targeting, coordinate behavior, return values, and the key alternative tool. Nothing essential about invoking it correctly appears to be missing.

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?

The schema already documents 94% of the 17 parameters, so the baseline is 3. The description adds useful semantic context about coordinate positioning relative to the layer and the comp-center convention for new layers, which is not fully captured by the schema alone.

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?

It names the specific action (draw a shape) and enumerates the shape types, fill/stroke support, and whether it creates a new shape layer or adds to an existing one. It also explicitly distinguishes itself from ae_add_mask for cut-out operations.

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?

The description states when to use an existing layer versus creating a new one, notes that existing groups are kept, and names ae_add_mask as the alternative for cutting out part of a layer. This gives clear routing guidance without leaving the agent to infer alternatives.

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