ae_exec
Execute ExtendScript code inside After Effects to automate tasks and query project data, returning results as JSON.
Instructions
Execute arbitrary ExtendScript inside the running After Effects (like Blender's execute_blender_code / Cocos cocosmcp_exec). The script runs in AE's ES3 engine. Constraints:
NO let/const (use var)
NO arrow functions (use function(){})
NO template literals (use string concatenation)
NO for..of / async / await / class The last expression (or a 'return') is serialized to JSON and returned. Example: app.project.activeItem ? app.project.activeItem.name : null
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_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ExtendScript (ES3) expression or IIFE body. |