Skip to main content
Glama

Run ExtendScript

ae_run_jsx

Execute custom ExtendScript in After Effects to inspect projects, modify compositions, or automate layer tasks, returning JSON results.

Instructions

Run arbitrary ExtendScript (ES3) inside After Effects. The code is the BODY of a function: use return to send a JSON-serializable value back, and read inputs from args. Helpers available: __findComp(ref), __findLayer(comp, ref), __layerInfo(layer). Example: return app.project.numItems;

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoValue exposed to the script as `args`.
codeYesExtendScript function body.
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does well: it discloses the ES3 dialect, that code runs as a function body, that `return` yields a JSON-serializable value, that inputs arrive via `args`, and which helpers exist. It omits error/failure behavior and the timeout default, which matters for long-running or failing scripts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core purpose, then the contract, then a concrete example. No filler; every clause conveys information needed to invoke the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-output-schema, no-annotation code-execution tool, the description covers the calling contract (function body, args, return) and helper surface. The main gap is timeoutMs semantics and error surfacing, which an agent would want before running a heavy script.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67% (args and code documented, timeoutMs not). The description goes beyond the schema by explaining how `args` is exposed and what `return` does, which is essential to writing correct code. It adds no meaning for timeoutMs, keeping it short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: run arbitrary ExtendScript inside After Effects. It is clearly the generic escape-hatch tool, distinguishable at a glance from the specific sibling operations (ae_add_text_layer, ae_render, etc.).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the tool's generic nature; there is no explicit guidance on when to prefer this over the specific sibling tools, nor any preconditions (e.g., project must be open). An agent must infer the routing decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.