Skip to main content
Glama

Pre-compose layers

precompose

Combine one or more layers into a new composition, optionally moving effects, masks, and transforms, and return the new comp with the layer that replaced them.

Instructions

Pre-compose layers into a new composition (Layer > Pre-compose). moveAllAttributes=true (default) moves effects/masks/transforms into the new comp, which gets the parent comp's size; false (single layer only) leaves attributes on the precomp layer and sizes the new comp to the layer. Returns the new comp and the precomp layer that replaced the 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": "precompose"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
nameNoName of the new comp (default '<first layer name> Comp').
folderNoProject folder name, 'A/B' path or id. A missing name/path is created at the project root.
layersNoLayers: array of layer refs, or 'selected' (default) or 'all'.
openNewNoOpen the new comp in the viewer (default false).
moveAllAttributesNoMove all attributes into the new comp (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description does add real behavioral value by spelling out that the source layers are replaced by a precomp layer and what the call returns, but it never addresses the inherent restructuring side effect (layers leave the parent comp) or any undo expectations, which is the main thing an agent would want to know here.

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 sentences, front-loaded with the action and resource, then the mode semantics, then the return value. No filler, no repetition of the title, and the parenthetical menu reference is short and useful.

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 correctly compensates by stating that it returns the new comp and the precomp layer. Remaining parameters (name, folder, openNew, layers) are fully documented in the schema, so the only real omission is a note on the destructive-feeling side effect of removing layers from the parent comp.

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 100%, so the baseline is 3, but the description goes beyond the schema's terse 'Move all attributes into the new comp (default true)' by explaining the consequences of each value: comp sizing follows the parent comp when true and follows the layer when false, and false only applies to a single layer. That is genuine semantics the schema does not carry.

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 ('Pre-compose layers into a new composition') and even anchors it to the host application menu path (Layer > Pre-compose). An agent can distinguish this from the layer-manipulation siblings like add_layer_from_item or align_layers without further reading.

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?

The description clearly explains the two operating modes via moveAllAttributes (whole-layer attribute move vs single-layer), which implicitly tells the caller which mode to choose. However, it gives no guidance on when to reach for this tool versus alternatives such as add_layer_from_item, and no preconditions or exclusions are stated.

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