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
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
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, )
- src/chuk_mcp_vfs/server.py:48-52 (registration)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)
- src/chuk_mcp_vfs/models.py:48-66 (schema)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