Skip to main content
Glama

ae_set_expression

Set or clear an After Effects expression on a layer or effect property; returns expressionError if rejected and keeps the change to one undo step.

Instructions

Set an expression on a layer or effect property, or remove it with an empty string. Reports expressionError if AE rejects it. One undo step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compNoComposition name or numeric item id. Omit to use the active composition.
layerYesLayer name or 1-based index.
propertyYesProperty path: 'Transform/Position', 'Opacity', 'Source Text', 'Effects/Gaussian Blur/Blurriness' (names, matchNames or 1-based indices, '/'-separated or as an array).
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the burden and it does add genuine behavior: it reports expressionError when AE rejects the expression, and the operation collapses into one undo step. It still omits whether partial application can occur or whether the property must already exist, but the error and undo semantics are valuable disclosure.

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?

Three short sentences, zero filler, with the action and the removal semantics front-loaded ahead of the error and undo notes.

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 4-param mutation tool with no annotations and no output schema, the description covers the operation, the removal path, error signaling, and undo scope. Only minor gaps remain (preconditions on the target property, what the result payload contains).

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 75% and the schema documents comp/layer/property paths well. The description adds semantics the schema lacks for the undocumented 'expression' parameter: an empty string is the removal sentinel, which an agent cannot infer otherwise.

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 ('Set an expression on a layer or effect property') plus the removal mode, which separates it from the sibling ae_set_property. It does not name the sibling explicitly, but the resource ('expression') is distinct enough that an agent can route correctly.

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?

Conveys how to remove an expression (empty string), which is real usage guidance, but gives no explicit when-to-use vs ae_set_property or ae_run_jsx, nor prerequisites (e.g., property must exist, comp/layer resolution context). Usage is implied rather than framed.

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