Skip to main content
Glama

safe_rename

Rename After Effects layers or comps while updating name-based expression references to prevent broken links. Use dry run to preview affected expressions before applying changes.

Instructions

Expression-safe rename of a LAYER (or a comp). A plain rename silently breaks name-based expression references — this runs the 5-step: (1) scan every comp for expressions referencing layer("oldName"), (2) build the update map, (3) rewrite oldName->newName in those expressions FIRST, (4) rename the layer, (5) force re-enable any expression AE disabled during the change. dryRun (default false) reports which expressions WOULD change without touching anything. For a comp rename pass renameComp instead of layer; the comp is renamed but cross-comp comp("oldName") references are NOT auto-updated (called out in the result note). Returns { renamed, from, to, kind, expressionsUpdated:[{comp,layer,prop}], reEnabled:[...], dryRun, note? }.

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": {
      "newName": "<newName>"
    },
    "name": "safe_rename"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
layerNoLayer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing.
dryRunNoReport affected expressions without changing anything.
newNameYesThe new name.
instanceNoTarget a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances.
renameCompNoRename a COMP (by name, id, or { id: N }) instead of a layer. Mutually exclusive with `layer`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it enumerates the ordered 5-step mutation (scan, map, rewrite expressions first, rename, re-enable disabled expressions), discloses that dryRun changes nothing, and flags a real limitation (cross-comp comp("oldName") references are not auto-updated). This is unusually rich side-effect disclosure for a mutation tool.

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?

Front-loaded with purpose and the mechanism in numbered form, with no filler sentences. The trailing return-shape enumeration is long but earns its place since no output schema exists; the paragraph could still be split for scanability.

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

Completeness5/5

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

For a 6-parameter mutation tool with no annotations and no output schema, the description supplies the change sequence, the preview mode, mode exclusivity, a known limitation, and the return payload. An agent has what it needs to call this safely and interpret the result.

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 adds meaning beyond the schema: dryRun's exact effect (report which expressions WOULD change) and the layer-vs-renameComp switch framed as a semantic choice with a documented caveat. It does not explain `instance` addressing or name vs id ambiguity, which the schema covers alone.

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+resource ("Expression-safe rename of a LAYER (or a comp)") and immediately contrasts it with the naive alternative ("A plain rename silently breaks name-based expression references"), which is exactly what distinguishes it from the sibling rename_layers.

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 clear selection logic between its own modes: use renameComp instead of layer for comps, and dryRun to preview. It does not explicitly say when to prefer the plain sibling rename_layers (e.g. when no expressions exist) or state an exclusion, so it falls short of full when/when-not coverage.

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