mkdir
Create directories in virtual filesystem workspaces to organize files and manage storage across multiple providers.
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 main handler function for the mkdir tool that resolves the path, calls the underlying VFS mkdir, and returns 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' tool using the @server.tool decorator in the MCP server, which delegates to the VFSTools.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 path string fields.class MkdirResponse(BaseModel): """Response from mkdir operation""" success: bool path: str