workspace_switch
Switch between virtual filesystem workspaces to manage files across different storage providers and scopes.
Instructions
Switch to a different workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/chuk_mcp_vfs/server.py:63-66 (registration)Registration of the 'workspace_switch' MCP tool. This decorator registers the function as a tool with the MCP server, which delegates to the implementation in WorkspaceTools.@server.tool async def workspace_switch(name: str): """Switch to a different workspace.""" return await workspace_tools.workspace_switch(name)
- Core handler function in WorkspaceTools class that performs the workspace switch by calling the workspace_manager and returns a structured response.async def workspace_switch(self, name: str) -> WorkspaceSwitchResponse: """ Switch to a different workspace. Args: name: Workspace name to switch to Returns: WorkspaceSwitchResponse with new current workspace info """ info = await self.workspace_manager.switch_workspace(name) return WorkspaceSwitchResponse( name=info.name, provider=info.provider_type, current_path=info.current_path, is_mounted=info.is_mounted, )
- src/chuk_mcp_vfs/models.py:81-88 (schema)Pydantic model defining the response schema for the workspace_switch tool.class WorkspaceSwitchResponse(BaseModel): """Response from workspace switch""" name: str provider: ProviderType current_path: str is_mounted: bool