run-jsx
Execute arbitrary ExtendScript in After Effects with the AK toolkit preloaded to automate comps, layers, keyframes, inspection, and rendering; pass a function body or absolute .jsx file.
Instructions
Execute arbitrary ExtendScript in After Effects with the AK toolkit preloaded (AK.comp, AK.layer, AK.prop, AK.setKeys with real temporal/spatial easing, AK.shape/rect/ellipse/halfDisc/star/fill/stroke, AK.slider/angle/fx, AK.sample, AK.readKeys, AK.saveFrames, AK.render, AK.inspect). Write a function BODY that returns a value (object or string) — it is wrapped, run in one undo group, and errors are returned as {error,line}. Or pass an absolute 'file' to evaluate a .jsx file as-is.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run-jsx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Function body, e.g. `var c=AK.comp('Main'); return AK.inspect(c);` | |
| file | No | Absolute path to a .jsx file to evaluate (AK is NOT auto-loaded; add $.evalFile for aekit yourself). | |
| timeoutMs | No | Wait for result (default 120000). |