Skip to main content
Glama

Execute operation

ae_do
Destructive

Execute a named After Effects operation with validated arguments and automatic undo grouping. For multiple operations, use one batch.run instead of several calls.

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.
includeContextNoInclude ambient project/selection context (default true). Set false for an already identified target to avoid repeated context gathering.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-alpha.3-studio.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only carry destructiveHint=true, and the description goes well beyond that: automatic undo-group wrapping (one Ctrl+Z reverts the whole call), a warning never to call beginUndoGroup/endUndoGroup in eval.run, argument validation happening before AE is contacted, and the undo/redo exception. This is exactly the behavioral context the annotation cannot convey.

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 verb and the most common mistake (multiple ae_do calls), then rule, exception, and example. Dense but every sentence carries a rule or constraint. Slightly long, but nothing is filler.

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?

No output schema exists, and the description compensates by noting the response includes ambient comp/selection/project context at zero extra round trips, plus undo semantics and validation timing. For a mutation tool whose only annotation is destructiveHint, this is complete enough to call safely.

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 the baseline is 3; the description adds an end-to-end example showing how operation and args nest (keyframe.add with comp/layer/property/time/value), which clarifies arg shape beyond the schema. It does not add much on instance, timeoutMs, or includeContext, so it lands above baseline but not at a 5.

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+resource: 'Execute an atomic operation by name (from ae_catalog)', and explicitly ties the operation namespace to the ae_catalog sibling. An agent can distinguish it from ae_edit, ae_workflow, and ae_do's own batch pattern without opening the 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 guidance on when to use it: single atomic operations, vs wrapping multiple in one batch.run, with named read/verify steps (comp.info, layer.info, render.frame) that can ride along. It also names the exception (undo/redo: project.undo, command.execute id 16/2035) that must not go in a batch.run.

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