Skip to main content
Glama

Execute operation

ae_do
Destructive

Execute an atomic After Effects operation by name with validated arguments, automatically grouped into one undo step.

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.
dryRunNoValidate the operation and return the ExtendScript that WOULD run, without contacting After Effects. Nothing is executed and the project is not touched. Use it to preview a destructive call before committing to it.
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. First observedv0.4.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true; the description goes far beyond by disclosing auto-validation against declared params before AE is contacted, automatic single-undo-group wrapping (one Ctrl+Z reverts the whole call, batch.run counts as one call), the undo/redo exception, and that ambient context (active comp, selected layers, project state) is returned at zero extra round trips.

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?

The core rules (name source, batching, undo grouping, undo/redo exception) are front-loaded and every sentence carries a distinct constraint. It is dense rather than bloated, though the trailing ambient-context and example clauses pile on after the essential guidance is already delivered.

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 dispatch tool with nested args, a required operation name, and no output schema, the description covers the naming source, validation behavior, batching model, undo semantics, the undo/redo carve-out, and a full call example. Nothing needed to invoke it correctly is missing.

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% and each param (args, dryRun, operation, timeoutMs) is already documented in the schema, so the baseline is 3. The description adds a concrete worked example showing the operation/args shape, which is a modest but real value-add over the structured fields.

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+resource ('execute an atomic operation by name') and immediately anchors it to the sibling that supplies valid names ('from ae_catalog'), so an agent can tell it apart from the purpose-built siblings like ae_comp_info or ae_render_frame.

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?

It gives explicit routing rules: multiple operations belong in ONE batch.run, read/verify steps (comp.info, layer.info, render.frame) can ride in the same batch, and undo/redo (project.undo, command.execute 16/2035) must run outside the group and cannot ride in a batch. It also issues a clear prohibition ('Never call app.beginUndoGroup/endUndoGroup in eval.run code').

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