```diff
--- test_files/330-original.txt	2025-03-07 19:06:47
+++ test_files/330-modified.txt	2025-03-07 19:06:47
@@ -1,81 +1,80 @@
+from typing import Dict, Optional
+
 from pydantic import Field, field_validator
 
-from composio.tools.env.filemanager.manager import FileManager
+from composio.tools.base.local import LocalAction
 from composio.tools.local.filetool.actions.base_action import (
-    BaseFileAction,
     BaseFileRequest,
     BaseFileResponse,
+    include_cwd,
 )
 
 
 class CreateFileRequest(BaseFileRequest):
-    """Request to create a file."""
+    """Request to create a file or directory."""
 
-    file_path: str = Field(
+    path: str = Field(
         ...,
-        description="""File path to create in the editor.
-        If file already exists, it will be overwritten""",
+        description="""Path to create in the editor.
+        If file/directory already exists, it will be overwritten""",
     )
+    is_directory: bool = Field(
+        False,
+        description="Whether to create a directory instead of a file",
+    )
 
-    @field_validator("file_path")
+    @field_validator("path")
     @classmethod
-    def validate_file_path(cls, v: str) -> str:
+    def validate_path(cls, v: str) -> str:
         if v.strip() == "":
-            raise ValueError("File name cannot be empty or just whitespace")
+            raise ValueError("Path cannot be empty or just whitespace")
         if v in (".", ".."):
-            raise ValueError('File name cannot be "." or ".."')
+            raise ValueError('Path cannot be "." or ".."')
         return v
 
 
 class CreateFileResponse(BaseFileResponse):
-    """Response to create a file."""
+    """Response to create a file or directory."""
 
-    file: str = Field(
+    path: Optional[str] = Field(
         default=None,
-        description="Path the created file.",
+        description="Path of the created file or directory.",
     )
-    success: bool = Field(
-        default=False,
-        description="Whether the file was created successfully",
-    )
 
 
-class CreateFile(BaseFileAction):
+class CreateFile(LocalAction[CreateFileRequest, CreateFileResponse]):
     """
-    Creates a new file within a shell session.
+    Creates a new file or directory within a shell session.
     Example:
-        - To create a file, provide the path of the new file. If the path you provide
+        - To create a file or directory, provide the path of the new file/directory. If the path you provide
         is relative, it will be created relative to the current working directory.
-        - The response will indicate whether the file was created successfully and list any errors.
+        - Specify is_directory=True to create a directory instead of a file.
+        - The response will indicate whether the file/directory was created successfully and list any errors.
     Raises:
-        - ValueError: If the file path is not a string or if the file path is empty.
-        - FileExistsError: If the file already exists.
-        - PermissionError: If the user does not have permission to create the file.
-        - FileNotFoundError: If the directory does not exist.
+        - ValueError: If the path is not a string or if the path is empty.
+        - FileExistsError: If the file/directory already exists.
+        - PermissionError: If the user does not have permission to create the file/directory.
+        - FileNotFoundError: If the parent directory does not exist.
         - OSError: If an OS-specific error occurs.
     """
 
-    _display_name = "Create a new file"
-    _request_schema = CreateFileRequest
-    _response_schema = CreateFileResponse
-
-    def execute_on_file_manager(
-        self, file_manager: FileManager, request_data: CreateFileRequest  # type: ignore
-    ) -> CreateFileResponse:
-        try:
+    @include_cwd  # type: ignore
+    def execute(self, request: CreateFileRequest, metadata: Dict) -> CreateFileResponse:
+        if request.is_directory:
             return CreateFileResponse(
-                file=str(
-                    file_manager.create(
-                        path=request_data.file_path,
-                    ).path
+                path=str(
+                    self.filemanagers.get(
+                        request.file_manager_id,
+                    ).create_directory(
+                        path=request.path,
+                    )
                 ),
-                success=True,
             )
-        except FileExistsError as e:
-            return CreateFileResponse(error=f"File already exists: {str(e)}")
-        except PermissionError as e:
-            return CreateFileResponse(error=f"Permission denied: {str(e)}")
-        except FileNotFoundError as e:
-            return CreateFileResponse(error=f"Directory does not exist: {str(e)}")
-        except OSError as e:
-            return CreateFileResponse(error=f"OS error occurred: {str(e)}")
+
+        return CreateFileResponse(
+            path=str(
+                self.filemanagers.get(request.file_manager_id)
+                .create(path=request.path)
+                .path
+            )
+        )
```
