Skip to main content
Glama

duplicate_sequence

Copy an existing Premiere Pro sequence to create a new version with a different name for editing variations or backups.

Instructions

Creates a copy of an existing sequence with a new name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sequenceIdYesThe ID of the sequence to duplicate
newNameYesThe name for the new sequence copy

Implementation Reference

  • The handler function for 'duplicate_sequence' tool. It generates an ExtendScript that retrieves the sequence by ID, clones it using originalSeq.clone(), renames the clone, and returns the new sequence ID.
    private async duplicateSequence(sequenceId: string, newName: string): Promise<any> {
      const script = `
        try {
          var originalSeq = app.project.getSequenceByID("${sequenceId}");
          if (!originalSeq) {
            JSON.stringify({
              success: false,
              error: "Sequence not found"
            });
            return;
          }
          
          var newSeq = originalSeq.clone();
          newSeq.name = "${newName}";
          
          JSON.stringify({
            success: true,
            originalSequenceId: "${sequenceId}",
            newSequenceId: newSeq.sequenceID,
            newName: "${newName}"
          });
        } catch (e) {
          JSON.stringify({
            success: false,
            error: e.toString()
          });
        }
      `;
      
      return await this.bridge.executeScript(script);
    }
  • Defines the input schema using Zod for validating parameters: sequenceId (string) and newName (string). Part of the tool registration in getAvailableTools().
      name: 'duplicate_sequence',
      description: 'Creates a copy of an existing sequence with a new name.',
      inputSchema: z.object({
        sequenceId: z.string().describe('The ID of the sequence to duplicate'),
        newName: z.string().describe('The name for the new sequence copy')
      })
    },
  • Registers the tool in the executeTool method's switch statement, mapping the tool name to the duplicateSequence handler.
    case 'duplicate_sequence':
      return await this.duplicateSequence(args.sequenceId, args.newName);
    case 'delete_sequence':

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/hetpatel-11/Adobe_Premiere_Pro_MCP'

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