Skip to content
Prism
Prism MCP

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.

The short version
You describe the change. The agent writes and runs the script; you never see code unless you ask.
Every script is checked before it runs. A script that would fail is refused with the line and the reason, and nothing changes.
One ask is one undo step, named in the Edit menu.
Errors point at the exact line. A slow call is collected later, never re-run.

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