Skip to main content
Glama

Layer bounds

ae_get_layer_bounds
Idempotent

Measure exact on-screen bounding boxes of After Effects layers at a specific time—including transforms, 3D, and camera—and report visibility, frame status, and safe-area fit for alignment checks.

Instructions

Exact on-screen bounding boxes of layers in composition pixels at a time, after all transforms, parenting, 3D and the active camera (via AE's own toComp()). Also reports whether each layer is visible at that time, fully/partly/not in frame, and inside action-safe (5% margin) and title-safe (10% margin). Use it to check alignment, spacing, overlaps and safe areas with numbers; to move layers by these bounds use ae_align_layers (via ae_call). It measures through a temporary probe layer removed in the same undo step; your layers are left as they were.

Input Schema

NameRequiredDescriptionDefault
compNoComposition: item id (number) or exact name. Omit (or "active") for the active/open composition.
timeNoSeconds (default: the comp's current time).
frameNoWhole frame number from the comp's start (frame 0 = time 0), instead of time.
layersNoLayers to measure (default: all layers, up to 300).
selectedOnlyNoMeasure only the layers selected in After Effects.
includeExtentsNoInclude stroke widths, effects and other extents (default false = content box).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Critical context the annotations cannot convey: readOnlyHint=false is surprising for a measuring tool, and the description explains exactly why — it inserts a temporary probe layer and removes it in the same undo step, leaving the user's layers untouched. That resolves the apparent mutation risk and confirms the destructiveHint=false claim in prose.

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?

Front-loaded with the core definition, then usage and alternative, then the side-effect disclosure. Every sentence carries information — the toComp reference, the safe-area margins, and the undo behavior all matter to a caller.

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?

No output schema exists, and the description names the reported categories (bounds, visibility, in-frame status, action-safe and title-safe) which is enough to interpret the result at a high level. It stops short of describing the actual response shape, so an agent still has to inspect the return value to learn field names.

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 every parameter (comp, time, frame, layers, selectedOnly, includeExtents) is already documented in structured data. The description clarifies the semantics of the measurement (post-transform, camera-aware) but adds no per-parameter meaning such as layer-name vs index behavior or default-time resolution.

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 and resource ('Exact on-screen bounding boxes of layers in composition pixels') and pins down the measurement pipeline (after transforms, parenting, 3D and the active camera via toComp()). It is clearly distinguishable from measurement-adjacent siblings like ae_get_layer_info and from the mutation path ae_align_layers.

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?

Gives concrete use cases ('check alignment, spacing, overlaps and safe areas with numbers') and explicitly routes the related mutation to ae_align_layers via ae_call. It lacks an explicit when-not clause (e.g., versus ae_get_layer_info or ae_get_comp_map), so it falls just short of full routing guidance.

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