Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameNo

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)
  • 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)
  • 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")

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