Skip to main content
Glama

Fit layer to comp

fit_layer_to_comp

Scale layers to a composition's size based on their content bounds with fit, fill, stretch, width, or height modes, and optionally center them.

Instructions

Scale layers to the comp size based on their content rectangle: fit (contain), fill (cover), stretch (non-uniform), fit_width or fit_height, then center them (center=false to skip).

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

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
modeNoDefault fit.
timeNoComp time at which content bounds and transforms are measured (default: current time).
centerNoCenter in the comp after scaling (default true).
layersNoLayers: array of layer refs, or 'selected' (default) or 'all'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false with destructiveHint=false, so the agent knows this is a non-destructive mutation; the description adds that scaling is derived from each layer's content rectangle and that centering follows unless suppressed. It does not disclose whether existing scale keyframes are overwritten, whether transforms are relative or absolute, or how layers with zero-size bounds are handled.

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?

A single front-loaded sentence with the operation first and the mode/centering qualifiers as compact parentheticals. No redundant restatement of the title or schema.

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 five optional parameters, no output schema, and annotations covering the safety profile, the description supplies the missing behavioral core: the measurement basis and the mode/centering semantics. Only edge-case behavior (keyframes, zero-size layers, selection defaults already in schema) is absent, which is acceptable.

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; the description earns more by explaining what each mode enum value actually means geometrically (contain, cover, non-uniform) and by clarifying that centering is a post-scale step that can be turned off. It does not add anything about comp/time/layers semantics beyond the schema.

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 and resource (scale layers to the comp size) and enumerates the five scaling modes with geometric glosses (contain, cover, non-uniform). It is clearly distinct from resize_comp or fit_text_to_width by naming layers and the content-rectangle basis, though it never explicitly contrasts itself with a sibling.

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 mode glosses tell an agent which parameter value to pick and 'center=false to skip' covers one option, but there is no explicit when-to-use vs when-not-to-use guidance and no mention of alternatives such as resize_comp or fit_text_to_width. Usage is implied rather than 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