ae_run_jsx
Run custom ExtendScript code in After Effects with an args object to handle tasks beyond predefined tools. Supports restricted or unsafe modes and returns JSON-serializable results.
Instructions
Escape hatch: run a Function-body of ExtendScript. Receives args parameter. Always undo-grouped. Use mode=unsafe for arbitrary code. Prefer high-level tools when possible. Return a JSON-serializable value.
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_run_jsx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| code | Yes | Function body, e.g. 'return app.project.activeItem.name;' | |
| mode | No | unsafe | |
| description | No | Short reason for audit |