Skip to main content
Glama

Execute menu command

execute_menu_command
Destructive

Run any After Effects menu command by name or ID, including actions without dedicated tools like Deselect All. Blocks modal dialogs, quit, save, and project-replace commands.

Instructions

Run any After Effects menu command by its menu text or command id (app.executeCommand) - for actions with no dedicated tool, e.g. 'Deselect All', 'Select All', 'Center Anchor Point in Layer Content'. It acts on the ACTIVE comp/panel and current selection. SAFETY: commands that would freeze AE behind a modal dialog or quit/replace/save the project are refused: any name ending with '...', and Quit/Exit, New/Open/Close Project, Save/Save As/Save a Copy/Increment and Save, Revert, Import, Preferences, Project Settings, Collect Files, Purge All Memory & Disk Cache. Ids are only checked against the ids of those commands, so pass an id only for commands you know open no dialog. force=true skips the checks (avoid). 'Undo'/'Redo' by name run Edit > Undo/Redo.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "execute_menu_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoCommand id (from find_menu_command). Used when 'name' is not given.
nameNoExact English menu text, e.g. 'Deselect All'.
forceNoRun even if the command is on the dialog/quit denylist (default false). Can freeze AE.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and readOnlyHint=false; the description goes far beyond that by enumerating the refused command classes (modal dialogs ending in '...', Quit/New/Open/Save/Revert/Import/Preferences, Purge), explaining that ids are only checked against that denylist, and warning that force=true can freeze AE. This is exactly the behavioral context an agent needs before invoking a destructive, state-dependent tool.

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?

The purpose is front-loaded in the first sentence and the safety block follows in a logical order, with a trailing note on Undo/Redo. It is dense but nearly every clause carries operational value; the long denial list is verbose yet justified by the risk it mitigates.

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 destructive escape-hatch tool with no output schema, the description covers selection context, refusal rules, and the force override thoroughly. It does not say what the caller receives when a command is refused (error vs. silent no-op), which is the remaining ambiguity.

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 the baseline is 3, but the description adds real meaning: id should come from find_menu_command and is only verified against denylisted ids, so ids should be passed only for known-dialog-free commands, and force explicitly bypasses the denylist at the cost of a possible freeze. That elevates it slightly above the schema's own wording.

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 gives a specific verb and resource ('Run any After Effects menu command ... app.executeCommand') plus its scope: a fallback for actions with no dedicated tool. Concrete examples ('Deselect All', 'Center Anchor Point in Layer Content') make it immediately distinguishable from siblings like find_menu_command, which only looks commands up.

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?

It states clearly when to reach for this tool ('for actions with no dedicated tool') and what context it operates on ('ACTIVE comp/panel and current selection'). The one gap is routing: it mentions that 'Undo'/'Redo' by name map to Edit > Undo/Redo but never tells the agent to prefer the dedicated undo/redo siblings instead.

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