Execute menu command
execute_menu_commandRun 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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Command id (from find_menu_command). Used when 'name' is not given. | |
| name | No | Exact English menu text, e.g. 'Deselect All'. | |
| force | No | Run even if the command is on the dialog/quit denylist (default false). Can freeze AE. |