Skip to main content
Glama

workspace_create

Create a new virtual filesystem workspace to manage files across multiple storage providers with full file operations.

Instructions

Create a new virtual filesystem workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • Main handler implementing the workspace_create tool logic: creates workspace via manager and returns formatted response.
    async def workspace_create(
        self, request: WorkspaceCreateRequest
    ) -> WorkspaceCreateResponse:
        """
        Create a new workspace.
    
        Args:
            request: WorkspaceCreateRequest with name, provider, template, scope, and config
    
        Returns:
            WorkspaceCreateResponse with workspace info
        """
        info = await self.workspace_manager.create_workspace(
            name=request.name,
            provider_type=request.provider,
            provider_config=request.provider_config,
            template=request.template,
            scope=request.scope,
        )
    
        return WorkspaceCreateResponse(
            name=info.name,
            provider=info.provider_type,
            created_at=info.created_at,
            current_path=info.current_path,
            is_mounted=info.is_mounted,
        )
  • MCP tool registration for workspace_create using @server.tool decorator, proxies to workspace_tools instance.
    @server.tool
    async def workspace_create(request: WorkspaceCreateRequest):
        """Create a new virtual filesystem workspace."""
        return await workspace_tools.workspace_create(request)
  • Pydantic schemas defining input (WorkspaceCreateRequest) and output (WorkspaceCreateResponse) structures for the tool.
    class WorkspaceCreateRequest(BaseModel):
        """Request to create a workspace"""
    
        name: str = Field(..., min_length=1, pattern=r"^[a-zA-Z0-9_-]+$")
        provider: ProviderType = ProviderType.MEMORY
        scope: StorageScope = StorageScope.SESSION
        template: str | None = None
        provider_config: dict[str, Any] = Field(default_factory=dict)
    
    
    class WorkspaceCreateResponse(BaseModel):
        """Response from workspace creation"""
    
        name: str
        provider: ProviderType
        created_at: datetime
        current_path: str
        is_mounted: bool

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