Skip to main content
Glama

apply_expression_preset

Applies a preset expression to an After Effects layer property so you can add wiggle, loop, bounce, smooth, time, or fade behavior without writing expression code.

Instructions

Apply a preset expression. Library: wiggle({freq, amp}) — random jitter; loopOut({type: "cycle"|"pingpong"|"continue"|"offset", numKeyframes}); loopIn({...}); bounce({amp, freq, decay}) — physics-style bounce after last keyframe; smooth({width, samples}) — averaging smooth; time({rate, offset}) — value drives by time; valueAtTime({offset}) — read this prop at offset time; posterizeTime({rate}) — sample-and-hold timing; inertialBounce() — ease-out bounce; autoFade({duration}) — opacity fade in/out at layer in/out points; pingPong() — short for loopOut pingpong.

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>",
      "prop": "<prop>",
      "preset": "<preset>"
    },
    "name": "apply_expression_preset"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
propYesProperty: a transform alias ("Position","Scale","Rotation","Opacity","Anchor Point","X Rotation","Y Rotation","Orientation"), an ADBE matchName ("ADBE Position", "ADBE Effect Parade.ADBE Gaussian Blur 2.ADBE Blurriness"), or a dotted display path ("Effects.Gaussian Blur.Blurriness").
layerYesLayer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing.
paramsNo
presetYes
instanceNoTarget a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it never says whether an existing expression is overwritten, whether the action is undoable, what happens if the property has no keyframes, or what errors surface. It only describes the runtime behavior of the expressions being injected ('bounce after last keyframe', 'fade in/out at layer in/out points'), not the behavior of the call itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose in one short sentence, then a dense but scannable catalog of presets. Nearly every clause earns its place as parameter documentation; the one-line-per-preset format is efficient, though the run-on semicolon block is harder to parse than a list.

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 6-parameter mutation tool with no annotations and no output schema, the preset catalog is a genuine strength, but mutation semantics (overwrite, undo, failure modes) and the relationship between `preset` and `params` are left implicit. An agent can form the call but cannot predict its side effects.

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 67%, and the description does real work for the gap: the `params` object is schema-typed only as additionalProperties, so the per-preset signatures (`wiggle({freq, amp})`, `loopOut({type, numKeyframes})`, etc.) are the only documentation of its contents. It adds no meaning, however, for `comp`, `layer`, `prop`, or `instance`, which the schema already covers.

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?

The first sentence states a specific verb and resource ('Apply a preset expression'), and the library list makes concrete what a preset is. It does not distinguish this from adjacent siblings like set_expression or apply_preset_ffx, so an agent must infer that this applies JS expression presets rather than effect/animation presets.

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?

There is no statement of when to choose this over set_expression (custom code) or the other apply_* preset tools, and no prerequisites (e.g. that loopOut/bounce require existing keyframes) are called out as conditions. The library list helps pick a preset value, but gives no tool-selection guidance.

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