Skip to main content
Glama

Batch rename layers

batch_rename_layers

Rename many After Effects layers at once with find/replace, pattern tokens, prefix/suffix, and case changes. Preview changes safely with a dry run before applying.

Instructions

Rename many layers of one comp at once. Order of operations: find/replace -> pattern (tokens) -> prefix/suffix -> case. Locked layers are renamed too (temporarily unlocked). Use dryRun=true to preview. Returns the from -> to list.

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

Input Schema

NameRequiredDescriptionDefault
caseNoChange letter case (applied last).
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
findNoText to find in the name (literal unless regex=true). Replaced by 'replace'.
stepNo{n} increment (default 1).
regexNoTreat 'find' as a JavaScript regular expression (default false).
startNoFirst {n} value (default 1).
dryRunNoOnly preview the from -> to list, change nothing (default false).
filterNoOnly rename names containing this text (case-insensitive), or matching '/regex/flags', e.g. '/^BG/i'.
layersNoLayers: array of layer refs, or 'selected' (default) or 'all'.
prefixNoText added before the name.
suffixNoText added after the name.
patternNoNew-name template. Tokens: {name} (current name after find/replace), {orig} (original name), {n} counter, {n:3} zero-padded counter, {type}, {id}; layers also {comp} and {index}; items also {folder}. Example: '{comp}_{type}_{n:2}'.
replaceNoReplacement for 'find' (default ''). With regex=true you can use $1, $2 groups.
caseSensitiveNoCase-sensitive find (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Adds meaningful behavior beyond the annotations: locked layers are renamed too via temporary unlocking, the transformation order is fixed, and the return value is a from -> to list. This exceeds the bare destructiveHint=false/openWorldHint=false signals, though it omits undo semantics and whether temp unlocking is reverted on failure.

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?

Four short sentences, each carrying non-redundant information: scope, ordering, side effect on locked layers, preview path, and return shape. Nothing is padded or repeated from the 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?

For a 14-parameter tool with no output schema, the description covers the pieces an agent would otherwise guess wrong: pipeline order, locked-layer handling, preview mode, and return value. Minor gaps remain around failure/rollback behavior and defaults resolution when 'comp' is omitted.

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 earns more by stating the evaluation order (find/replace -> pattern -> prefix/suffix -> case) and clarifying that {name} is the post-replace name — interaction semantics the schema cannot express per-parameter.

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 with scope ('Rename many layers of one comp at once'), which separates it from the single-layer sibling rename_layer by the plural 'many' and comp scoping. It stops short of naming the sibling it displaces (e.g., batch_rename_items for non-layer items), but the resource is unambiguous.

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 concrete operational guidance: use dryRun=true to preview, and the ordered pipeline indicates how the parameters combine. It does not state when to prefer this over rename_layer for a single layer or batch_rename_items, so a clear exclusion is missing.

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