Skip to main content
Glama

setLayerExpression

Set or remove an After Effects expression on a layer property (Position, Scale, Rotation, or Opacity) to control animation like wiggle motion; pass an empty string to clear it.

Instructions

Set or remove an After Effects expression on a layer property (e.g. wiggle(2,20) for gentle handheld motion).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compIndexYes1-based index of the composition in the Project panel (see getProjectInfo / listCompositions).
layerIndexYes1-based index of the layer within the composition.
propertyNameYesProperty: 'Position', 'Scale', 'Rotation' or 'Opacity'.
expressionStringYesThe expression. Use "" to remove it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0-ibintec.1

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It does not say whether an existing expression is overwritten, whether the bridge/AE instance must be running, whether the change is undoable, or how errors surface for an invalid expression string. For a mutation tool with zero annotation coverage this is a real gap.

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?

A single front-loaded sentence that states the action, the target, and an example, with no filler or redundancy.

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 4-parameter mutation tool with no output schema and no annotations, the description covers the core action adequately but omits return behavior and operational prerequisites. It is minimally sufficient rather than complete.

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 description coverage is 100%, including the "" removal convention and the accepted property names, so the schema does the heavy lifting and 3 is the baseline. The description's wiggle example adds mild illustrative value but no syntax or format detail beyond the schema.

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 pair (set/remove) and resource (After Effects expression on a layer property), with a concrete example (wiggle(2,20)). It is clearly distinguishable from siblings like setLayerKeyframe and apply-effect, though it never names them to draw the boundary 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?

'Set or remove' implies the two usage modes and the example shows a typical expression, but there is no explicit when-to-use vs alternatives (e.g. setLayerKeyframe for static values) and no prerequisites such as a running After Effects instance or bridge connection.

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