Skip to main content
Glama
23d1
by 23d1

Add a layer

ae_add_layer

Add any layer type to an After Effects composition—text, solid, shape, null, adjustment, camera, light, or footage—and receive the new layer's index.

Instructions

Add a layer to a composition: text, solid, shape, null, adjustment, camera, light, or existing footage/comp from the project. Returns the new layer's index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compNoComposition name, project item id, or index. Omit for the active comp.
fontNotext layers: PostScript font name, e.g. 'Helvetica-Bold'.
nameNoLayer name. Defaults to something sensible per type.
textNotext layers: the string to display. Use \n for line breaks.
typeYesWhat kind of layer to create.
colorNotext fill, solid color, or shape fill.
shapeNoshape layers: which primitive to draw. Default: rectangle.
widthNosolid/shape: width in px. Defaults to comp width.
heightNosolid/shape: height in px. Defaults to comp height.
sourceNofootage layers: project item name or id (from ae_project_info).
threeDNoEnable 3D for this layer.
boxTextNotext layers: [width, height] to create a paragraph text box instead of point text.
durationNoSeconds; trims the layer's out point.
fontSizeNotext layers: point size. Default: 72.
positionNo[x, y] or [x, y, z] in comp pixels.
lightTypeNolight layers: light type. Default: point.
startTimeNoSeconds to offset the layer's start.
strokeColorNoshape layers: stroke color. Omit for no stroke.
strokeWidthNoshape layers: stroke width in px. Default: 0.
cornerRadiusNoshape layers: rounded-rectangle radius.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, so the description does not need to re-state that it mutates. It does add value by disclosing that it returns the new layer's index, which is behavioral information. However, it does not mention potential side effects such as changing the active selection or requiring a specific project state. Given the annotations cover the core mutation trait, this is adequate but not rich.

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 two sentences and front-loads the core action ('Add a layer to a composition') followed by the allowed types and return value. It avoids repeating schema details and contains no filler, making every word purposeful.

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?

Given the tool's complexity (20 parameters) and a rich schema that documents all parameters, the description sufficiently conveys the tool's purpose and return value. It does not enumerate every edge case, but the schema covers those. The explicit return-value mention mitigates the lack of an output schema, making the definition complete enough for an agent to call it correctly.

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%, with each of the 20 parameters having a description that includes defaults, constraints, and examples (e.g., font format, default sizes). The tool description does not add parameter-specific guidance beyond the schema, so it receives the baseline score of 3.

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 states the verb 'Add' and the resource 'a layer to a composition' and enumerates the supported layer types (text, solid, shape, null, adjustment, camera, light, footage/comp). It also mentions the return value, the new layer's index, which distinguishes it from sibling tools like ae_set_layer (modifies existing layers) and ae_create_comp (creates compositions).

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?

The description clearly frames the tool as adding new layers, and the context of the sibling tools (especially ae_set_layer for modifications) implies the use case. However, it does not explicitly state when NOT to use this tool or mention alternatives like ae_import for footage-only scenarios. The context is clear but exclusions are not stated.

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