workspace_info
Retrieve detailed information about a specific workspace, including its configuration and current state, to understand its structure and capabilities.
Instructions
Get detailed information about a workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No |
Implementation Reference
- src/chuk_mcp_vfs/server.py:68-71 (registration)Registration of the "workspace_info" MCP tool using the @server.tool decorator. This is the entry point called by the MCP framework.@server.tool async def workspace_info(name: str | None = None): """Get detailed information about a workspace.""" return await workspace_tools.workspace_info(name)
- Handler function in WorkspaceTools class that executes the tool logic by calling the workspace manager's get_workspace_info method.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/models.py:34-45 (schema)Pydantic BaseModel defining the output schema returned by the workspace_info 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}
- Supporting method in WorkspaceManager that implements the core logic for retrieving workspace information, handling current or named workspace.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")