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); }

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