Skip to main content
Glama

Distribute layers

distribute_layers

Space three or more layers evenly along a horizontal or vertical axis while keeping the outermost layers fixed, using equal centers, equal gaps, or a fixed pixel spacing.

Instructions

Space 3+ layers evenly along an axis, keeping the outermost ones in place: by centers (default) or equal gaps; or with an explicit pixel 'spacing' gap starting from the first layer (2+ layers). 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

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": "distribute_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
byNoEqual center distances or equal gaps between boxes (default center).
axisNoDefault horizontal.
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'.
spacingNoFixed gap in px between consecutive layers' boxes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Goes well past the annotations (which only mark it as a non-read-only, non-destructive mutation) by disclosing how bounds are computed (sourceRectAtTime after scale/rotation/parenting, in comp pixels), how rotated and 3D layers are handled (approximate, iterative through the active camera), and that animated positions shift as a whole. It does not describe the response or what happens when constraints fail, so a 4.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action and invariant are front-loaded in the first sentence, and every later sentence carries distinct technical content. It is dense, semicolon-chained and slightly run-on, which costs a point on readability, but there is little wasted text.

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 mutating, no-output-schema tool with 6 optional parameters this covers geometry, timing, 3D approximation, animation handling and excluded layer types. The remaining gap is that nothing tells the agent what a successful call returns or how partial failures are reported.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning: 'spacing' is measured as a gap starting from the first layer and raises the minimum layer count, 'by' defaults to centers, and 'time' controls when bounds are measured. It does not clarify how 'spacing' interacts with 'by' when both are supplied.

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 precise verb and resource ("Space 3+ layers evenly along an axis") plus the key invariant ("keeping the outermost ones in place") and the two modes. An agent can immediately distinguish this from a plain align operation without opening the schema.

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 clear when-to-use conditions: 3+ layers for even distribution, 2+ layers when an explicit pixel 'spacing' is supplied, and default center mode. It also excludes cameras/lights. It never names the closest alternative (align_layers) to route the agent between them, so a 4 rather than 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