Skip to main content
Glama

apply-effect-template

Apply predefined effect templates like Gaussian Blur, Glow, or Drop Shadow to specific layers in Adobe After Effects compositions, with optional custom settings to override defaults.

Instructions

Apply a predefined effect template to a layer in After Effects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compIndexYes1-based index of the target composition in the project panel.
customSettingsNoOptional custom settings to override defaults.
layerIndexYes1-based index of the target layer within the composition.
templateNameYesName of the effect template to apply.

Implementation Reference

  • src/index.ts:723-768 (registration)
    Registers the MCP tool 'apply-effect-template' with server.tool(), including description, input schema, and handler function.
    server.tool(
      "apply-effect-template",
      "Apply a predefined effect template to a layer in After Effects",
      {
        compIndex: z.number().int().positive().describe("1-based index of the target composition in the project panel."),
        layerIndex: z.number().int().positive().describe("1-based index of the target layer within the composition."),
        templateName: z.enum([
          "gaussian-blur", 
          "directional-blur", 
          "color-balance", 
          "brightness-contrast",
          "curves",
          "glow",
          "drop-shadow",
          "cinematic-look",
          "text-pop"
        ]).describe("Name of the effect template to apply."),
        customSettings: z.record(z.any()).optional().describe("Optional custom settings to override defaults.")
      },
      async (parameters) => {
        try {
          // Queue the command for After Effects
          writeCommandFile("applyEffectTemplate", parameters);
          
          return {
            content: [
              {
                type: "text",
                text: `Command to apply effect template '${parameters.templateName}' to layer ${parameters.layerIndex} in composition ${parameters.compIndex} has been queued.\n` +
                      `Use the "get-results" tool after a few seconds to check for confirmation.`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error queuing apply-effect-template command: ${String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Zod schema defining the input parameters: composition and layer indices, required templateName from enum of predefined effects, optional custom settings.
    {
      compIndex: z.number().int().positive().describe("1-based index of the target composition in the project panel."),
      layerIndex: z.number().int().positive().describe("1-based index of the target layer within the composition."),
      templateName: z.enum([
        "gaussian-blur", 
        "directional-blur", 
        "color-balance", 
        "brightness-contrast",
        "curves",
        "glow",
        "drop-shadow",
        "cinematic-look",
        "text-pop"
      ]).describe("Name of the effect template to apply."),
      customSettings: z.record(z.any()).optional().describe("Optional custom settings to override defaults.")
    },
  • The handler function queues the command 'applyEffectTemplate' with parameters to the temporary command file for processing by the After Effects MCP Bridge Auto panel, and returns a confirmation message.
    async (parameters) => {
      try {
        // Queue the command for After Effects
        writeCommandFile("applyEffectTemplate", parameters);
        
        return {
          content: [
            {
              type: "text",
              text: `Command to apply effect template '${parameters.templateName}' to layer ${parameters.layerIndex} in composition ${parameters.compIndex} has been queued.\n` +
                    `Use the "get-results" tool after a few seconds to check for confirmation.`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error queuing apply-effect-template command: ${String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Helper utility that serializes the tool command and parameters to ae_command.json in the system temp directory, enabling the After Effects bridge script to detect and execute it.
    function writeCommandFile(command: string, args: Record<string, any> = {}): void {
      try {
        const commandFile = path.join(process.env.TEMP || process.env.TMP || '', 'ae_command.json');
        const commandData = {
          command,
          args,
          timestamp: new Date().toISOString(),
          status: "pending"  // pending, running, completed, error
        };
        fs.writeFileSync(commandFile, JSON.stringify(commandData, null, 2));
        console.error(`Command "${command}" written to ${commandFile}`);
      } catch (error) {
        console.error("Error writing command file:", error);
      }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It implies a mutation operation ('apply') but fails to detail critical aspects like whether this action is reversible, requires specific permissions, affects project state, or has side effects. This is inadequate for a tool that modifies content.

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 a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (applying effects in After Effects with 4 parameters), lack of annotations, and no output schema, the description is insufficient. It misses behavioral details, usage context, and output expectations, leaving significant gaps for an agent to operate effectively.

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 the schema fully documents all parameters. The description adds no additional semantic context beyond implying the tool uses 'predefined' templates, which aligns with the 'templateName' enum but doesn't enhance understanding of parameters like 'compIndex' or 'customSettings'. Baseline 3 is appropriate.

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 clearly states the action ('apply') and target ('a predefined effect template to a layer in After Effects'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'apply-effect' or 'mcp_aftereffects_applyEffectTemplate', which appear to serve similar functions, preventing a perfect score.

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 provides no guidance on when to use this tool versus alternatives such as 'apply-effect' or 'setLayerExpression', nor does it mention prerequisites like needing an open After Effects project or specific layer types. This leaves the agent without context for tool selection.

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

Related 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/Dakkshin/after-effects-mcp'

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