Skip to main content
Glama

Add shape to shape layer

add_shape

Adds parametric rectangles, ellipses, stars, polygons, or bezier paths to an After Effects shape layer, returning group and property paths for follow-up edits.

Instructions

Add a parametric rectangle, ellipse, star or polygon, or a free-form bezier path, to a shape layer. The shape gets its own Vector Group (path + stroke + fill; stroke drawn above fill). Default fill is white unless only a stroke is given. Returns groupPath (use with add_fill/add_stroke/add_shape_modifier/set_shape_path) and the AE propertyPath for generic property tools.

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>",
      "type": "<type>"
    },
    "name": "add_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
fillNoFill color. Default: white when no stroke is given; no fill when only a stroke is given. false/'none' = no fill.
sizeNorect/ellipse: [w,h] or number px (default 100). star/polygon: diameter when outerRadius is omitted.
typeYesShape kind.
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
closedNoClosed path (default true).
dashesNoStroke dash pattern [dash, gap, dash, gap, ...] px (max 6 values).
pointsNostar/polygon: number of points/sides (default 5 star, 6 polygon).
strokeNoStroke color (omit for no stroke).
lineCapNoStroke line cap.
fillRuleNoFill rule for overlapping paths / holes (default nonzero).
lineJoinNoStroke line join.
positionNoCenter of the shape in layer coordinates relative to the layer origin (stored as the group's Transform Position). Default [0,0].
rotationNostar/polygon rotation in degrees.
verticesNoPath points [[x,y],...] (type 'path'). Coordinates relative to the group origin.
groupNameNoName of the new Vector Group (default: the type, made unique, e.g. 'Rect 2').
groupPathNoExisting group to add the new shape group INTO (default: Contents root).
roundnessNorect: corner radius px. polygon/star: outer roundness %.
inTangentsNoIncoming bezier handles per vertex, RELATIVE to each vertex. Default all [0,0] (straight lines).
fillOpacityNoFill opacity 0-100.
innerRadiusNostar inner radius px (default outerRadius/2).
outTangentsNoOutgoing bezier handles per vertex, relative to each vertex. Default all [0,0].
outerRadiusNostar/polygon outer radius px (default size/2 or 50).
strokeWidthNoStroke width px (default 2).
groupOpacityNoOpacity of the whole group 0-100.
groupRotationNoRotation of the whole group in degrees (group Transform).
strokeOpacityNoStroke opacity 0-100.
innerRoundnessNostar inner roundness %.
outerRoundnessNostar/polygon outer roundness %.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare a non-destructive, non-read-only, closed-world write, and the description adds genuinely useful structure: the shape becomes its own Vector Group of path+stroke+fill with stroke above fill, and default fill is white unless only a stroke is supplied. However it omits failure modes (wrong layer type, invalid layer reference), whether existing contents are touched, and undo implications for a mutation tool with 29 parameters.

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?

Three tight sentences with the action front-loaded, followed by the resulting object structure and then the return contract. Every sentence carries information an agent needs; nothing is padding or restatement of the title.

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 large 29-parameter mutation tool with no output schema, the description supplies the return contract (groupPath and propertyPath) that structured data does not, which is the key gap filled. It is slightly thin on error behavior and layer prerequisites, but the exhaustive schema covers parameter-level detail.

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

Parameters3/5

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

Schema description coverage is 100%, so all 29 parameters are already self-documenting; the description adds only the fill/stroke default interplay and the meaning of the returned groupPath. It does not clarify cross-parameter relationships not already in the schema, so the baseline 3 is appropriate.

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+resource ('Add a parametric rectangle, ellipse, star or polygon, or a free-form bezier path, to a shape layer') and enumerates the supported shape kinds exactly matching the 'type' enum. It also implicitly distinguishes itself from siblings by naming add_fill/add_stroke/add_shape_modifier/set_shape_path as downstream tools rather than alternatives.

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 chaining context: the returned groupPath is what you feed to add_fill, add_stroke, add_shape_modifier, and set_shape_path, and the propertyPath is for generic property tools. It does not address when to prefer this over siblings like create_shape_from_svg or text_to_shapes, nor any prerequisites such as the target layer needing to be a shape layer, so no explicit exclusions.

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