execute_script
Run custom ExtendScript in After Effects for project, layer, keyframe, expression, and batch automation without creating nested undo groups that can crash the app.
Instructions
Execute a custom ExtendScript in After Effects. Do not call app.beginUndoGroup, app.endUndoGroup, or unpaired app.beginSuppressDialogs — nested undo groups crash AE on the next user edit.
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": {
"script": "<script>"
},
"name": "execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The ExtendScript code to execute | |
| undoGroupName | No | Name for the undo group | Script Execution |
| wrapInTransaction | No | Do not enable. The MCP host already wraps commands in one undo group. Nested undo groups crash After Effects on the next user edit. |