Run a script in After Effects
Script is how the agent does the one-off: the change that no ready-made tool covers. It writes a script for what you asked, Prism checks it before it runs, and After Effects runs it as one undo step. What stays behind is your project, native layers and keyframes, editable without Prism afterwards. For new content the agent prefers a scene; for common edits it prefers a tool.
How to use it
You say: "Stagger these twelve layers by two frames and ease them out." or "Rename every solid to BG_ and its colour."
The agent reads the composition first, writes the script, runs it, and tells you what changed. If you write scripts yourself, you can hand the agent your own and it runs unchanged.
What you get
In the project: whatever the script made or changed, as real layers, keyframes, expressions and markers. One undo step reverses all of it.
Back to the agent: the result the script reports, and on a failure the exact line and the reason, so the next attempt is a fix rather than a guess. If the script wrote expressions, After Effects checks them and any that error are reported without undoing the work.
Notes and limits
Checked first. A script is refused before it runs when it would fail in After Effects, when it uses something After Effects cannot run, or when it tries to manage its own undo. Nothing changes on a refusal; the message names the line.
Slow work. A call that takes longer than the client waits is almost always still running or already finished. The agent collects the result afterwards or reads the composition back. Running it again duplicates layers and keyframes; the agent is told never to.
Big jobs. Long renders and thousand-layer passes are split into several asks. The agent does this on its own; if it does not, ask for the work in parts.
Failures mid-way. A script that fails after creating layers keeps them, and the message lists what was created, so Edit ▸ Undo reverts the group cleanly.
Cost. A script is one MCP action. Reads, discovery and snapshots are not.
Common questions
Related
Read
Read mode of the After Effects MCP: before it builds or edits, the agent reads your open project, which comps exist and what each holds. Nothing is uploaded.
Scene
Scene mode of the After Effects MCP: describe a composition once and Prism builds the comp, lays out the layers, writes the animation and shows the agent the result.