Skip to main content
Glama

ae_run_extendscript

Destructive

Executes arbitrary ExtendScript in After Effects inside one undo group, letting you handle custom automation the built-in tools do not cover; disabled unless enabled.

Instructions

VÁLVULA DE ESCAPE: executa ExtendScript arbitrário dentro de um undo group. Desligada por padrão (AE_MCP_ENABLE_RUN_EXTENDSCRIPT=1 para habilitar). Prefira as ferramentas ae_*. Nunca use alert() nem diálogos: eles travam o AE.

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

Input Schema

NameRequiredDescriptionDefault
codeYesCorpo de função ExtendScript (ES3); o valor do return é devolvido em JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructive=true and readOnly=false, but the description adds genuinely non-derivable context: execution happens inside an undo group (implying reversibility), the tool is gated off by default, and alert()/dialogs hang the host application. That is real behavioral value beyond the structured metadata, though it says nothing about what can be mutated or what the call returns.

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

Conciseness4/5

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

Three tight sentences with the most decision-relevant fact ('VÁLVULA DE ESCAPE') front-loaded, followed by the gating condition and the hazard warning. No filler, though the hazard sentence slightly overlaps with the general 'prefer ae_*' caution.

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 single-parameter, high-risk tool with no output schema, the definition covers gating, undo scoping, and the fatal pitfall, which is enough to call it correctly. It could still say more about what the script can affect in the open project.

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% and the single 'code' parameter is documented in the schema with its ES3/return-in-JSON contract. The description adds only that the code is 'arbitrário' and reinforces the no-dialog hazard, which is marginal meaning beyond the schema — 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?

Names a specific verb and resource ('executa ExtendScript arbitrário') and frames the tool's role as an escape hatch, which immediately separates it from the dedicated ae_* operations. An agent can tell this is the general-purpose fallback rather than a targeted AE action.

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?

Explicitly states a prerequisite ('Desligada por padrão', AE_MCP_ENABLE_RUN_EXTENDSCRIPT=1) and routes the agent toward the alternatives ('Prefira as ferramentas ae_*'). It does not name the conditions under which the escape hatch is actually warranted beyond the implicit 'no dedicated tool exists', so it stops short of full when/when-not guidance.

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