Skip to main content
Glama

Run JSX file

ae_run_script_file
Destructive

Runs an existing .jsx/.jsxbin script file from disk inside After Effects, passing AEMCP_ARGS and returning the script's last expression plus an undoable change report.

Instructions

Run an existing .jsx/.jsxbin script file from disk inside After Effects (like File > Scripts > Run Script File), e.g. one found with ae_list_scripts. args is exposed to the script as the global AEMCP_ARGS. Returns the value of the script's last expression and a change report; the run is one undo step. A missing file is an error; refused in Read-only mode. For code you write yourself use ae_run_script.

Input Schema

NameRequiredDescriptionDefault
argsNoJSON object exposed to the script as the global AEMCP_ARGS (default {}).
pathYesAbsolute path to the .jsx / .jsxbin file.
timeoutSecondsNoMax seconds to wait for the script, 1-3600 (default 300).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / args / description
      Added value: +"JSON object exposed to the script as the global AEMCP_ARGS (default {})."
    • addedInput schema / properties / timeoutSeconds / description
      Added value: +"Max seconds to wait for the script, 1-3600 (default 300)."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say destructive/openWorld/non-idempotent): it discloses that the run is a single undo step, that it returns the last expression's value plus a change report, how args are injected as the AEMCP_ARGS global, and the failure modes (missing file, Read-only mode). That is exactly the behavioral context the annotations cannot convey.

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?

Front-loaded with the action and the File > Scripts analogy, then the return/undo/error facts in compact clauses. No filler sentences; each one carries a distinct, actionable fact.

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

Completeness5/5

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

There is no output schema, and the description compensates by explaining what comes back (last expression value plus a change report). For a destructive, open-world tool with three params, the safety, return, and failure behavior are all covered.

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

Parameters3/5

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

Schema coverage is 100%, so path, args and timeoutSeconds are already documented in the schema, including the AEMCP_ARGS default and the 1–3600 timeout range. The description's mention of args as the AEMCP_ARGS global largely restates the schema rather than adding new syntax or format guidance, so the baseline 3 applies.

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?

Specific verb+resource: runs an existing .jsx/.jsxbin file from disk inside After Effects, with a concrete analogy (File > Scripts > Run Script File). It explicitly distinguishes itself from the closest sibling, ae_run_script, and points at ae_list_scripts as the discovery path.

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

Usage Guidelines5/5

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

States when to use this tool (an existing script file on disk, e.g. one found via ae_list_scripts) and when not to (code you author yourself → ae_run_script). It also names two hard preconditions: a missing file is an error, and the call is refused in Read-only mode.

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