Skip to main content
Glama

Layer bounds

get_layer_bounds
Read-only

Measure layer content bounds and comp-space bounding box at any time, including union box, before positioning or aligning. Returns exact 2D bounds and camera-projected 3D bounds.

Instructions

Measure layers' content rectangle (sourceRectAtTime, layer space) and their comp-space bounding box (left/top/right/bottom/center) at a time, plus the union box. Use before positioning/aligning. 2D layers are exact; 3D layers are projected through the camera. Read-only (a temporary helper layer may be created and removed for 3D layers).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_layer_bounds"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
timeNoComp time at which content bounds and transforms are measured (default: current time).
layersNoLayers: array of layer refs, or 'selected' (default) or 'all'.
cornersNoAlso return the 4 transformed corner points.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds real context: 2D results are exact while 3D layers are projected through the camera (i.e., approximate), and a temporary helper layer may be created and removed for 3D. That disclosure of a hidden side effect beyond the safety hints is valuable. It doesn't discuss cost or caveats around the union box.

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, front-loaded with what is measured and followed by when to use it and the 2D/3D behavioral caveat. No filler.

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?

With no output schema, the description does the necessary work of naming the returned fields (left/top/right/bottom/center and union box). The corners parameter's return shape is left to the schema, which is a minor gap for a read-only measurement tool.

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 coverage is 100%, so comp, time, layers, and corners are already documented in the schema. The description reinforces the time aspect ('at a time') and the measurement point of content bounds, but adds no syntax or edge-case detail beyond the schema. Baseline 3 applies.

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 measurement action (content rectangle via sourceRectAtTime plus comp-space bounding box with left/top/right/bottom/center and union) for a specific resource (layers). This is clearly distinguishable from siblings like get_layer_info or get_comp_layers_at_time, which don't return geometry.

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?

Explicitly says 'Use before positioning/aligning', giving a concrete triggering scenario. It doesn't name an alternative tool or a when-not-to-use condition, which keeps it below a 5.

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