Skip to main content
Glama

ae_set_expression

Set or clear a JavaScript expression on a layer property in After Effects; supply expression code or null to remove it.

Instructions

Set or clear an expression on a layer property. Pass expression string, or empty string/null to clear. Example: wiggle(2, 30).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
propertyYese.g. "Transform/Position"
comp_nameNoComposition name. Prefer this over index.
comp_indexNo1-based project item index if name is ambiguous.
expressionYesExpression code, or null/empty to clear
layer_nameNoLayer name (preferred).
layer_indexNo1-based layer index in the comp.
Behavior3/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 disclose the clear behavior and a valid expression format. However, it omits behavioral traits like overwriting existing expressions, potential failure if the property doesn't support expressions, or any side effects. This is adequate but not rich.

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 sentences and an example with zero filler. The main action is front-loaded, and the clear behavior is stated in the second sentence. Every word adds value.

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 mutation tool with no annotations and no output schema, the description covers the core invocation and clearing behavior, but leaves out important context such as whether the expression overwrites existing expressions and what happens on failure. It is functional but not fully complete for an agent attempting first-time correct invocation.

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 parameter descriptions already document all six fields, including the null/empty clear semantics. The description adds only a usage example (wiggle(2, 30)) that clarifies expression syntax but does not significantly supplement the schema definitions.

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 uses a specific verb ('Set or clear') and identifies the exact resource ('expression on a layer property'), making the tool's function immediately clear. It also provides a concrete example (wiggle(2, 30)), which helps distinguish it from siblings like ae_set_keyframes or ae_set_effect_property.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives operational guidance (pass empty string/null to clear) but no contextual guidance on when to use this tool instead of alternatives such as ae_set_keyframes or ae_set_layer_properties. There is no mention of exclusions, prerequisites, or scenarios that would favor a sibling tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HeroicSwan/after-effects-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server