Skip to main content
Glama

Align layers

align_layers

Align After Effects layers by edges or centers relative to the composition, selected layers, or a reference layer, including rotated and 3D layers.

Instructions

Align layers like the Align panel: left/right/top/bottom edges or hcenter/vcenter/center, relative to the comp frame, the bounding box of the given layers ('selection', default for 2+ layers) or one reference layer. Bounds = axis-aligned box of the layer's content (sourceRectAtTime) after scale/rotation/parenting, in comp pixels. Rotated layers are aligned by their rotated bounding box. 3D layers are measured through the active camera and moved iteratively (approximate). Animated positions are shifted as a whole (all keyframes). Cameras/lights are not allowed.

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": {
      "edge": "<edge>"
    },
    "name": "align_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
edgeYeshcenter = align horizontal centers (same x).
timeNoComp time at which content bounds and transforms are measured (default: current time).
layersNoLayers: array of layer refs, or 'selected' (default) or 'all'.
toLayerNoReference layer when relativeTo='layer' (it does not move).
relativeToNoDefault: 'selection' for 2+ layers, else 'comp'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=false), the description discloses substantial behavioral context: bounds are measured from sourceRectAtTime after scale/rotation/parenting in comp pixels, 3D layers are measured through the active camera and moved iteratively (approximate), and animated positions shift as a whole across all keyframes. The main omissions are the return value and behavior on locked/hidden layers.

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 alignment modes and reference frames are front-loaded in the first sentence, followed by progressively finer semantics (bounds, rotation, 3D, animation, exclusions). Every sentence carries distinct information and none is padding.

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 6-parameter mutating tool with no output schema and full schema coverage, the description covers coordinate semantics, defaults, edge cases (rotated and 3D layers, animated positions) and an explicit disallowed-layer constraint. It stops short of stating the response shape or interaction with locked layers, which keeps it from being fully complete.

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 the schema already documents comp, edge, time, layers, toLayer and relativeTo, including the 'selection' default and that toLayer 'does not move'. The description largely restates those defaults rather than adding new per-parameter meaning; its genuinely new content (rotated bounding boxes, iterative 3D movement) is behavioral rather than parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (align) and resource (layers), and enumerates the exact modes (left/right/top/bottom/hcenter/vcenter/center) plus the three reference frames, so the agent knows precisely what operation is performed. It does not name or distinguish itself from siblings such as center_layers or distribute_layers, which overlap conceptually with the 'center' and multi-layer modes.

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 through defaults ('selection' default for 2+ layers, else 'comp') and an explicit exclusion ('Cameras/lights are not allowed'), which tells the agent when the call will fail. There is no explicit guidance on when to prefer this over a dedicated sibling like center_layers or distribute_layers, so the agent must infer that choice.

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