mkdir
Create directories in virtual filesystem workspaces to organize files and manage storage structure.
Instructions
Create directory.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Implementation Reference
- src/chuk_mcp_vfs/vfs_tools.py:197-212 (handler)The VFSTools.mkdir method that implements the core logic for the 'mkdir' tool: resolves the path using WorkspaceManager and calls the underlying VFS mkdir operation, returning a MkdirResponse.async def mkdir(self, path: str) -> MkdirResponse: """ Create directory. Args: path: Directory path to create Returns: MkdirResponse with success status """ vfs = self.workspace_manager.get_current_vfs() resolved_path = self.workspace_manager.resolve_path(path) await vfs.mkdir(resolved_path) return MkdirResponse(success=True, path=resolved_path)
- src/chuk_mcp_vfs/server.py:107-110 (registration)Registration of the 'mkdir' MCP tool using the @server.tool decorator. This thin wrapper function delegates execution to the VFSTools instance's mkdir method.@server.tool async def mkdir(path: str): """Create directory.""" return await vfs_tools.mkdir(path)
- src/chuk_mcp_vfs/models.py:176-181 (schema)Pydantic model defining the output schema for the mkdir tool response, with success boolean and created path.class MkdirResponse(BaseModel): """Response from mkdir operation""" success: bool path: str