Skip to main content
Glama
23d1
by 23d1

Set or clear an expression

ae_set_expression

Attach or remove JavaScript expressions on After Effects properties to automate animations or clear existing ones.

Instructions

Attach an expression to a property, or clear it. Expressions are written in After Effects' JavaScript expression language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compNoComposition name, project item id, or index. Omit for the active comp.
layerNoLayer name or 1-based index. Omit to use the current selection.
propertyYesProperty path, e.g. "Transform.Position", "Position", "Effects.Gaussian Blur.Blurriness", or an array of names/matchNames for exact addressing.
expressionNoThe expression source. Omit or pass an empty string to remove it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, so the agent knows this is a mutating operation. The description adds the key behavioral detail that omitting or passing an empty string clears the expression, which is critical for correct invocation. However, it does not disclose potential side effects (e.g., whether setting an expression overrides an existing keyframe value, or whether the property must be animatable). With annotations covering the mutation safety profile, a 3 is appropriate.

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 with zero waste. The primary action is front-loaded, and the second sentence adds essential context about the expression language. Every word earns its place.

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 mutating tool with no output schema, the description covers the core behavior (set or clear) and the expression language. The schema covers all parameters. The only missing context is when to prefer this over ae_set_property, but the sibling list and tool name largely disambiguate that. Overall, an agent has enough to call this tool 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 description coverage is 100%, so the schema already documents all four parameters. The description adds the crucial semantic that 'expression' can be omitted or empty to clear, which is not fully explicit in the schema. However, it does not add detail about the property path formats beyond what the schema already provides. Baseline 3 is correct when the schema does the heavy lifting.

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 states a specific verb ('Attach' or 'clear') and a specific resource ('an expression to a property'), and it distinguishes the two modes of operation. It also clarifies the expression language (After Effects' JavaScript expression language), which helps an agent understand what the 'expression' parameter should contain. This clearly differentiates it from sibling tools like ae_set_property or ae_get_property.

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

Usage Guidelines4/5

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

The description implies the primary use case: attaching or clearing an expression on a property. It does not explicitly state when to use this tool versus alternatives like ae_set_property, but the sibling list and the tool name make the distinction fairly clear. The description could be improved by explicitly saying 'Use this instead of ae_set_property when you need to set an expression rather than a static value,' but the current wording is adequate.

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