Skip to main content
Glama

Replace layer source

replace_layer_source

Replace a footage, solid, or precomp layer's source with another project item—like Alt-drag replace—while keeping effects, masks, and keyframes; optionally update expressions that referenced the old source.

Instructions

Replace the source of a footage/solid/precomp layer with another project item (like Alt-drag replace), keeping effects, masks and keyframes. fixExpressions (default true) updates expressions that referenced the old source name.

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": {
      "layer": "<layer>",
      "item": "<item>"
    },
    "name": "replace_layer_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComposition name, 'Folder/Name' path, or item id. Omit to use the active composition.
itemYesProject item name, 'Folder/Name' path, or item id.
layerYesLayer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer.
fixExpressionsNoDefault true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only cover safety flags (not read-only, not destructive, closed-world), so the description carries real weight and delivers: it states that effects, masks and keyframes survive the swap, and that fixExpressions rewrites expressions referencing the old source name. It doesn't say what happens on a type mismatch or whether the change is undoable, which would round this out.

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?

Two tight sentences with the core action and preservation guarantee front-loaded, followed by the one parameter whose default behavior is non-obvious. No redundant restatement of the tool name or schema fields.

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 four-parameter mutation with no output schema and full schema coverage, the definition covers purpose, preservation semantics and the tricky default. It could mention the return value or the failure condition (e.g., incompatible item type) but is otherwise sufficient to call correctly.

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 comp, item, layer and fixExpressions are already documented by the schema, making 3 the baseline. The description does add a little meaning for fixExpressions beyond the schema's bare 'Default true' by explaining that it updates expressions pointing at the old source name, but it says nothing extra about layer or item resolution.

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?

Names a specific verb and resource (replace a layer's source) and constrains the layer types it applies to: footage, solid, or precomp. The 'like Alt-drag replace' analogy plus 'keeping effects, masks and keyframes' makes the operation concrete and distinguishable from a plain footage relink, though it never names the nearest sibling (replace_footage) explicitly.

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 by the Alt-drag analogy and the note that effects/masks/keyframes are preserved, which tells an agent when this is preferable to a destructive re-add. There is no explicit when-not guidance or routing to an alternative such as replace_footage or add_layer_from_item.

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