Skip to main content
Glama

Execute operation

ae_do
Destructive

Executes a named After Effects operation from ae_catalog, validating arguments and wrapping the call in one undo group. Use batch.run for multiple operations.

Instructions

Execute an atomic operation by name (from ae_catalog). Arguments are validated against the operation's declared parameters before anything reaches AE. Have more than one operation to run? Wrap them in ONE batch.run instead of several ae_do calls — read/verify steps (comp.info, layer.info, render.frame) can ride in the same batch. Every call is automatically wrapped in ONE undo group: a single Ctrl+Z (or project.undo) reverts the entire call, and a batch.run counts as one call. Never call app.beginUndoGroup/endUndoGroup in eval.run code — the wrapper already did. The exception is undo/redo itself (project.undo, command.execute id 16/2035): those run outside the group and cannot ride inside a batch.run. Response includes ambient context (active comp, selected layers, project state) at zero extra round trips. Example: ae_do({ operation: 'keyframe.add', args: { comp: 'Main', layer: 1, property: ['Transform','Position'], time: 2, value: [960,540] } })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoArguments for the operation. Validated against ae_catalog's declared params: missing required args, wrong types, and unknown keys are rejected before AE is contacted. Omit for zero-param operations.
instanceNoAfter Effects instance to address for this call, when several are running (AfterFX.exe -m): an instance id (its AE_MCP_INSTANCE at launch, or the `name` given to instance.start) or the name of the project file it has open. Omit to use this server's default (AE_MCP_INSTANCE, else the single live instance). ae_context and ae_do instance.list show what is live.
operationYesOperation name from ae_catalog (e.g. 'layer.create_solid', 'keyframe.add').
timeoutMsNoPer-call timeout in milliseconds (default 60000). Raise for long operations like render.start or big batch.run calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • addedInput schema / properties / instance
      Added value: +{
      +  "description": "After Effects instance to address for this call, when several are running (AfterFX.exe -m): an instance id (its AE_MCP_INSTANCE at launch, or the `name` given to instance.start) or the name of the project file it has open. Omit to use this server's default (AE_MCP_INSTANCE, else the single live instance). ae_context and ae_do instance.list show what is live.",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

The single destructiveHint=true annotation is far from the whole story, and the description fills the gap well: validation happens before AE is contacted, every call is wrapped in one undo group (whole call reverts with one Ctrl+Z), batch.run counts as one call, and the beginUndoGroup/endUndoGroup prohibition is stated. It stops short of describing failure/timeout behavior in detail, so not a 5.

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 core purpose and then layers on batching, undo semantics, the eval.run caveat, and the response note. Dense but each sentence carries actionable information; the trailing example is slightly long but earns its place by illustrating arg structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generic dispatcher over arbitrary operations with no output schema, this is complete: it explains where operation names come from, how args are validated, undo/batch semantics, the undo/redo exception, instance addressing, and that the response includes ambient context at no extra round trip.

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 100%, so parameters are already documented and the baseline is 3. The description nonetheless adds meaning beyond the schema: operation names are sourced from ae_catalog, args are validated against declared params (missing/wrong-type/unknown rejected), and the worked example shows the real args shape for keyframe.add.

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?

States a specific verb and resource: 'Execute an atomic operation by name (from ae_catalog).' It clearly differentiates itself from siblings — ae_catalog lists/names operations, while ae_do executes them — and the inline keyframe.add example makes the role concrete without opening a schema.

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

Usage Guidelines5/5

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

Explicit routing rules: use ae_catalog for operation names, prefer ONE batch.run over several ae_do calls, and a stated exception (undo/redo run outside the undo group and cannot ride in a batch). This is genuine when/when-not/alternative guidance, not inference.

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