workspace_info
Retrieve detailed information about a virtual filesystem workspace to understand its structure, scope, and storage configuration.
Instructions
Get detailed information about a workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No |
Implementation Reference
- Handler function for the 'workspace_info' tool that retrieves workspace details by delegating to the WorkspaceManager.async def workspace_info(self, name: str | None = None) -> WorkspaceInfo: """ Get detailed information about a workspace. Args: name: Workspace name (None for current workspace) Returns: WorkspaceInfo with full workspace details """ return self.workspace_manager.get_workspace_info(name)
- src/chuk_mcp_vfs/server.py:68-72 (registration)Registration of the 'workspace_info' tool using the @server.tool decorator in the MCP server.@server.tool async def workspace_info(name: str | None = None): """Get detailed information about a workspace.""" return await workspace_tools.workspace_info(name)
- src/chuk_mcp_vfs/models.py:34-45 (schema)Pydantic BaseModel defining the structure of the WorkspaceInfo returned by the tool.class WorkspaceInfo(BaseModel): """Information about a workspace""" name: str provider_type: ProviderType created_at: datetime current_path: str = "/" mount_point: str | None = None is_mounted: bool = False metadata: dict[str, Any] = Field(default_factory=dict) model_config = {"use_enum_values": False}
- Underlying helper method in WorkspaceManager that performs the actual lookup of workspace information.def get_workspace_info(self, name: str | None = None) -> WorkspaceInfo: """ Get workspace information. Args: name: Workspace name (None for current workspace) Returns: WorkspaceInfo Raises: ValueError: If workspace doesn't exist or no current workspace """ if name is None: if self._current_namespace_id is None: raise ValueError("No current workspace") return self._namespace_to_info[self._current_namespace_id] # Find by name for info in self._namespace_to_info.values(): if info.name == name: return info raise ValueError(f"Workspace '{name}' does not exist")