ae_eval_jsx
Executes custom ES3 ExtendScript in After Effects inside an UndoGroup with try/catch, returning results, logs, and exact error lines for controlled automation.
Instructions
Controlled ES3 ExtendScript escape hatch wrapped in UndoGroup and try/catch. Injects helpers: project, comp, findComp(ref), findLayer(comp, ref), resolveProp(layer, ref), log(...). Returns result, logs, and exact line/sourceLine on errors. Strictly use ES3 syntax (var/function only).
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": {
"code": "<code>"
},
"name": "ae_eval_jsx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ES3 ExtendScript function body. Use 'return ...;' to return data. | |
| undoName | No | Custom AE Undo group label. | |
| timeoutMs | No | Timeout in ms (default 30000). | |
| suppressDialogs | No | Suppress AE native dialogs during execution (default true). Pass false when adding or rendering third-party plugins. Never add/render Red Giant Universe (Universe_*) from the GUI: it hung AE. |