Skip to main content
Glama

ae_eval_jsx

Executes custom ES3 ExtendScript in After Effects inside an UndoGroup with try/catch, returning results, logs, and exact error lines for controlled automation.

Instructions

Controlled ES3 ExtendScript escape hatch wrapped in UndoGroup and try/catch. Injects helpers: project, comp, findComp(ref), findLayer(comp, ref), resolveProp(layer, ref), log(...). Returns result, logs, and exact line/sourceLine on errors. Strictly use ES3 syntax (var/function only).

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_eval_jsx"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesES3 ExtendScript function body. Use 'return ...;' to return data.
undoNameNoCustom AE Undo group label.
timeoutMsNoTimeout in ms (default 30000).
suppressDialogsNoSuppress AE native dialogs during execution (default true). Pass false when adding or rendering third-party plugins. Never add/render Red Giant Universe (Universe_*) from the GUI: it hung AE.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description does real work: it states that execution is wrapped in an UndoGroup (implying project mutations are undone as a unit), that errors are caught and returned with exact line/sourceLine, and that ES3 syntax is mandatory. It leaves open timeout behavior, whether failures roll back, and the blast radius of running arbitrary code against the open project, which is the main risk an agent would want stated.

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 dense sentences, each carrying distinct payload: the execution model and safety wrap first, the injected environment second, the return contract and syntax constraint last. No repetition of the schema, no filler.

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 high-risk arbitrary-code tool with no annotations and no output schema, the description covers the safety wrap, the runtime environment, the ES3 constraint, and the shape of returns and errors. It is only slightly short of complete — sandboxing/scope of what the code can touch and timeout-on-expiry behavior are not addressed.

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 100%, so a baseline 3 would apply, but the description adds genuine meaning beyond the schema by enumerating the injected helpers (project, comp, findComp, findLayer, resolveProp, log) — information the code parameter's documentation does not contain and that an agent needs to write a valid body. Defaults for undoName and timeoutMs are handled by the schema, not the description.

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

Purpose4/5

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

The phrase 'Controlled ES3 ExtendScript escape hatch' names the resource (arbitrary ExtendScript code execution) precisely, and the UndoGroup/try-catch wrapping adds distinguishing character. It stops short of an explicit verb like 'execute' and doesn't contrast with siblings such as ae_expression, so an agent must infer that this is the last-resort code path.

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?

The word 'escape hatch' implies last-resort usage, and 'Strictly use ES3 syntax (var/function only)' is a hard constraint, but there is no explicit statement of when to prefer ae_expression or the dedicated ae_* tools, and no when-not guidance. The suppressDialogs note ('Pass false when adding or rendering third-party plugins') is a useful conditional but applies to one parameter rather than the tool's role.

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