Skip to main content
Glama

Crop comp to region

crop_comp_to_region

Crops a composition to a pixel rectangle while resizing the comp and shifting unparented layers to keep content in place; layers with position expressions are reported.

Instructions

Crop a composition to a rectangle given in current comp pixels (left, top, width, height): the comp is resized and every unparented layer (including keyframes, cameras' points of interest) is shifted by -left/-top so the content stays in place. Layers driven by position expressions are reported in notes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "width": "<width>",
      "height": "<height>"
    },
    "name": "crop_comp_to_region"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoTop edge of the region in px (default 0).
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
leftNoLeft edge of the region in px (default 0).
widthYesRegion width in px = new comp width.
heightYesRegion height in px = new comp height.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the agent knows this is a mutation; the description adds substantial context beyond that: the comp is resized, every unparented layer including keyframes and camera points of interest is shifted by -left/-top, and expression-driven layers are reported in notes. It could still be read as contradicting destructiveHint=false, since it permanently resizes the comp and repositions layers, but nothing is deleted, so the declaration holds. What is missing is the treatment of parented layers and precomps, which the "unparented" qualifier raises but never resolves.

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?

A single dense sentence front-loads the action, then the coordinate convention, then the side effects, then the report caveat — an efficient ordering with no filler. It is long, but each clause carries distinct information an agent needs.

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 five-parameter mutating tool with no output schema, the description covers the mechanics, side effects and one reporting behavior (notes), which is enough to call it correctly. Gaps remain around parented layers, precomps, and failure modes, but nothing essential to invocation is absent.

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 all five parameters already carry descriptions, and the baseline is 3. The description adds real meaning for width/height ("= new comp width/height" is already in the schema) and clarifies that left/top drive a -left/-top shift rather than a crop-only offset, but it repeats rather than extends the schema on most fields.

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?

The description names a specific verb and resource ("Crop a composition to a rectangle") and immediately pins the coordinate space ("given in current comp pixels") with the argument order. It implies the distinction from resize_comp by describing the crop-and-shift mechanics, but never states the alternative explicitly, so it stops short of full sibling differentiation.

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?

Usage is implied: the description makes clear this is for extracting a sub-rectangle of a comp, and the note about expression-driven layers hints at a caveat to check. There is no explicit when-to-use versus when-not, no mention of prerequisites (e.g. comp must be open or specified), and no routing to fit_layer_to_comp or resize_comp.

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