Skip to main content
Glama

create-composition

Generate a new composition in Adobe After Effects with customizable settings, including name, dimensions, pixel aspect ratio, duration, frame rate, and background color, for streamlined project creation.

Instructions

Create a new composition in After Effects with specified parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backgroundColorNoBackground color of the composition (RGB values 0-255)
durationNoDuration in seconds (default: 10.0)
frameRateNoFrame rate in frames per second (default: 30.0)
heightYesHeight of the composition in pixels
nameYesName of the composition
pixelAspectNoPixel aspect ratio (default: 1.0)
widthYesWidth of the composition in pixels

Implementation Reference

  • The handler function for the 'create-composition' tool. It writes the command 'createComposition' with parameters to a temp file for After Effects to execute and returns a confirmation message.
    async (params) => {
      try {
        // Write command to file for After Effects to pick up
        writeCommandFile("createComposition", params);
        
        return {
          content: [
            {
              type: "text",
              text: `Command to create composition "${params.name}" has been queued.\n` +
                    `Please ensure the "MCP Bridge Auto" panel is open in After Effects.\n` +
                    `Use the "get-results" tool after a few seconds to check for results.`
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error queuing composition creation: ${String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the create-composition tool, including name, dimensions, duration, frame rate, and background color.
    {
      name: z.string().describe("Name of the composition"),
      width: z.number().int().positive().describe("Width of the composition in pixels"),
      height: z.number().int().positive().describe("Height of the composition in pixels"),
      pixelAspect: z.number().positive().optional().describe("Pixel aspect ratio (default: 1.0)"),
      duration: z.number().positive().optional().describe("Duration in seconds (default: 10.0)"),
      frameRate: z.number().positive().optional().describe("Frame rate in frames per second (default: 30.0)"),
      backgroundColor: z.object({
        r: z.number().int().min(0).max(255),
        g: z.number().int().min(0).max(255),
        b: z.number().int().min(0).max(255)
      }).optional().describe("Background color of the composition (RGB values 0-255)")
    },
  • src/index.ts:431-474 (registration)
    The server.tool() call that registers the 'create-composition' tool with its description, schema, and handler function.
    server.tool(
      "create-composition",
      "Create a new composition in After Effects with specified parameters",
      {
        name: z.string().describe("Name of the composition"),
        width: z.number().int().positive().describe("Width of the composition in pixels"),
        height: z.number().int().positive().describe("Height of the composition in pixels"),
        pixelAspect: z.number().positive().optional().describe("Pixel aspect ratio (default: 1.0)"),
        duration: z.number().positive().optional().describe("Duration in seconds (default: 10.0)"),
        frameRate: z.number().positive().optional().describe("Frame rate in frames per second (default: 30.0)"),
        backgroundColor: z.object({
          r: z.number().int().min(0).max(255),
          g: z.number().int().min(0).max(255),
          b: z.number().int().min(0).max(255)
        }).optional().describe("Background color of the composition (RGB values 0-255)")
      },
      async (params) => {
        try {
          // Write command to file for After Effects to pick up
          writeCommandFile("createComposition", params);
          
          return {
            content: [
              {
                type: "text",
                text: `Command to create composition "${params.name}" has been queued.\n` +
                      `Please ensure the "MCP Bridge Auto" panel is open in After Effects.\n` +
                      `Use the "get-results" tool after a few seconds to check for results.`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error queuing composition creation: ${String(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • Supporting utility function that writes the command name and arguments to a JSON file in the system temp directory, which is monitored by the After Effects MCP bridge script.
    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. While 'create' implies a write/mutation operation, the description doesn't disclose important behavioral traits: whether this requires specific permissions, whether the composition becomes active/selected after creation, what happens if a composition with the same name exists, or what the tool returns upon success. For a mutation tool with zero annotation coverage, this is inadequate.

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 states the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and is front-loaded with the essential information.

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?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral aspects like error conditions, return values, or side effects. The agent lacks crucial context about what happens after composition creation and how to verify success.

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?

The description mentions 'specified parameters' but provides no additional semantic information about what those parameters mean or how they interact. Since schema description coverage is 100% (all parameters have descriptions in the schema), the baseline is 3. The description doesn't add value beyond what's already documented in the schema.

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 ('create a new composition') and the target resource ('in After Effects'), which provides a specific verb+resource combination. However, it doesn't differentiate this tool from potential sibling tools that might also create compositions with different parameters or contexts.

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. It doesn't mention prerequisites, when this tool is appropriate versus other composition-related tools, or any exclusions. The agent receives no usage context beyond the basic action.

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