Skip to main content
Glama

execute_script

Run custom ExtendScript in After Effects for project, layer, keyframe, expression, and batch automation without creating nested undo groups that can crash the app.

Instructions

Execute a custom ExtendScript in After Effects. Do not call app.beginUndoGroup, app.endUndoGroup, or unpaired app.beginSuppressDialogs — nested undo groups crash AE on the next user edit.

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": {
      "script": "<script>"
    },
    "name": "execute_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesThe ExtendScript code to execute
undoGroupNameNoName for the undo groupScript Execution
wrapInTransactionNoDo not enable. The MCP host already wraps commands in one undo group. Nested undo groups crash After Effects on the next user edit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and delivers the most important hazard: unpaired undo groups and nested dialog suppression crash AE on the next user edit. It does not cover error reporting, whether the script result is returned, or execution limits, which keeps it out of 5 territory.

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?

Two sentences, zero filler, and the crash hazard is front-loaded right behind the capability statement. Every sentence earns its place.

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?

There is no output schema, so the description should say what an execution returns (script value, success flag, or nothing) and how failures surface. It covers the critical safety constraint well but leaves the agent guessing about results and errors for an arbitrary-code tool.

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 100%, so both undoGroupName and wrapInTransaction are already documented inline, including the nested-undo-group warning. The description adds no parameter-level meaning beyond restating the undo-group hazard at the script level, so the baseline 3 applies.

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 description states a specific verb and resource: 'Execute a custom ExtendScript in After Effects,' which tells an agent exactly what the tool does. It does not differentiate itself from the sibling batch_execute, so it falls short of a 5.

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

Usage Guidelines2/5

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

The description gives prohibition-style guidance ('Do not call app.beginUndoGroup...'), but nothing about when to prefer this tool over batch_execute or the many dedicated layer/effect tools. There is no positive usage context or alternative routing.

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

Deploy Server

Other Tools