Skip to main content
Glama

mkdir

Create directories in virtual filesystem workspaces to organize files and manage storage across multiple providers.

Instructions

Create directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • 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)
  • 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)
  • 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

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/chrishayuk/chuk-mcp-vfs'

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