Skip to main content
Glama

Sort layers

sort_layers

Reorder selected or all After Effects layers by name, in/out point, start time, duration, label, or type, producing a contiguous stack block from the topmost layer.

Instructions

Reorder layers in the stack by name, inPoint, outPoint, startTime, duration, label or type. The sorted layers form a contiguous block starting at the topmost one's index. Default: all layers by name.

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

Input Schema

NameRequiredDescriptionDefault
byNo
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
layersNoLayers to sort (default all).
descendingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare a non-read-only, non-destructive mutation; the description adds the genuinely non-obvious outcome that sorted layers form a contiguous block anchored at the topmost layer's index, which tells the agent how surrounding layers shift. It doesn't say whether untouched layers are pushed down or whether the operation is undoable, keeping it below 5.

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 short sentences, front-loaded with the core action and sort keys, then the ordering side effect, then the default. No filler and nothing buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter mutation with no output schema, the definition covers the main sort key and defaults but is silent on scope selection via `comp` and on ordering direction (`descending`), leaving the agent to infer both from the schema. Adequate but with clear gaps.

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 50%, and the description effectively restates the `by` enum and supplies the default for `layers` (all) and `by` (name). The `comp` parameter and `descending` flag are left entirely to the schema, so the description only marginally exceeds structured data.

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 ("Reorder") and resource ("layers in the stack") plus the seven sort keys, so an agent knows exactly what the tool does. It doesn't name or contrast with adjacent stack-manipulation siblings like align_layers or distribute_layers, so it falls short of 5.

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?

Gives a useful default ("all layers by name") and implies usage when the stacking order needs normalizing, but never says when to pick this over align_layers, distribute_layers, or sequence_layers, which are plausible substitutes. Guidance is implied rather than explicit.

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