Skip to main content
Glama

localize-comp

Duplicate a composition and replace specified text layers with translated strings, preserving all other layers, effects, and animations. Supports nested precompositions and auto-applies right-to-left alignment for Arabic text.

Instructions

Create a localized duplicate of a composition: swap in translated text for one or more text layers, auto-detecting Arabic and applying right-to-left direction/alignment (same logic as create-text-layer). Every other layer, effect, and animation is preserved unchanged because the whole composition is duplicated first. Text layers nested inside precompositions are reachable too via path: every precomposition on the path is safely duplicated the first time it's encountered (and reused if referenced again from another path), so the original precomps are never modified. Translation itself is the caller's job; pass the already-translated strings in translations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compNameNoSource composition name (or the active comp if omitted).
compIndexNo1-based index among compositions, if compName is omitted.
newCompNameNoName for the new localized composition (default: '<source name> (localized)').
translationsYesOne entry per text layer to localize, each targeting a layer by layerIndex/layerName (top level) or by path (nested inside precompositions).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.7.4
    • changedInput schema / properties / translations / description
      Previous value: -"One entry per text layer to localize, each targeting a layer by layerIndex or layerName."New value: +"One entry per text layer to localize, each targeting a layer by layerIndex/layerName (top level) or by path (nested inside precompositions)."
    • changedInput schema / properties / translations / items / properties / layerIndex / description
      Previous value: -"1-based index of the text layer to replace, in the source composition."New value: +"1-based index of the text layer to replace, in the source composition's top level. Ignored if `path` is given."
    • changedInput schema / properties / translations / items / properties / layerName / description
      Previous value: -"Name of the text layer to replace (used if layerIndex is omitted)."New value: +"Name of the text layer to replace, in the source composition's top level. Ignored if `path` is given."
    • addedInput schema / properties / translations / items / properties / path
      Added value: +{
      +  "description": "Full path to a text layer nested inside one or more precompositions: every segment but the last must resolve to a precomposition layer, and the last segment must be the text layer itself. Omit to target a top-level layer with layerIndex/layerName instead.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "layerIndex": {
      +        "description": "1-based layer index at this nesting level.",
      +        "exclusiveMinimum": 0,
      +        "type": "integer"
      +      },
      +      "layerName": {
      +        "description": "Layer name at this nesting level.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. Addedv1.7.3

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the whole composition is duplicated first, preserving all layers/effects/animations, details how nested precomps are handled without modifying originals, and mentions auto-detection of Arabic with RTL. It falls short of explicitly stating whether the source composition itself is modified, but overall it is highly transparent.

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?

The description is a single dense paragraph that front-loads the primary purpose and uses every sentence to add value (duplication behavior, nested precomp handling, RTL logic, caller responsibility). It is appropriately sized for the tool's complexity, though slightly long.

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?

The description covers the tool's core functionality well: duplication, text swapping, path handling, and RTL detection. It does not explicitly mention return values or what happens after creation, but given the complexity and rich schema, the description is largely complete. Slight gaps exist around source comp modification and any side effects.

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 adds meaningful context beyond the schema, especially for the complex `path` parameter (explaining precomposition duplication/reuse) and clarifying that `translations` should contain already-translated strings. This extra guidance enhances understanding of the parameters.

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?

The description clearly states the tool creates a localized duplicate of a composition by swapping in translated text for text layers. It uses a specific verb ('Create') and specifies the resource ('localized duplicate of a composition'), and the mention of 'same logic as create-text-layer' helps distinguish it from that sibling tool.

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 description implies when to use the tool (localizing a composition) and notes that translation is the caller's job, but it does not explicitly state when not to use it or compare it to alternatives like create-text-layer or duplicate-layer. Usage context is clear but without explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.