Skip to main content
Glama

ae_run_jsx

Run custom ExtendScript code in After Effects with an args object to handle tasks beyond predefined tools. Supports restricted or unsafe modes and returns JSON-serializable results.

Instructions

Escape hatch: run a Function-body of ExtendScript. Receives args parameter. Always undo-grouped. Use mode=unsafe for arbitrary code. Prefer high-level tools when possible. Return a JSON-serializable value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
codeYesFunction body, e.g. 'return app.project.activeItem.name;'
modeNounsafe
descriptionNoShort reason for audit
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It discloses that the tool is always undo-grouped, that it returns a JSON-serializable value, and that unsafe mode is for arbitrary code. It also signals risk with 'escape hatch'. It does not detail error behavior or side-effect risks, but provides solid context for a low-level runner.

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?

The description is short, front-loaded with the tool's nature ('Escape hatch'), and every sentence adds operational value. There is no filler or redundant restatement of the tool name.

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

Completeness3/5

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

The description covers return type, undo grouping, args passing, and tool hierarchy, which is strong for an escape-hatch tool. However, it leaves the restricted mode undefined and does not mention error or failure behavior, which is notable given there is no output schema and no annotations to fill those gaps.

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 description coverage is only 50%, so the description must compensate. It adds useful meaning to mode ('unsafe for arbitrary code') and mentions that args is passed into the function body. However, it does not explain the structure of args or the purpose/expected value of the description parameter, leaving gaps the schema also does not fill.

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?

The description clearly identifies this as an escape hatch for running arbitrary ExtendScript function bodies, which is a specific verb and resource. It also distinguishes itself from the many high-level AE tools by explicitly positioning itself as the low-level fallback.

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

Usage Guidelines4/5

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

The instruction 'Prefer high-level tools when possible' explicitly tells the agent when not to use this tool, and 'Use mode=unsafe for arbitrary code' gives meaningful mode guidance. However, it does not explain exactly when to use restricted mode versus unsafe mode, leaving some usage ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HeroicSwan/after-effects-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server