rossum_get_workspace
Retrieve a specific Rossum workspace by its ID to access workspace details and configuration for analysis purposes.
Instructions
Get a specific workspace by its ID.
Args: workspace_id: The ID of the workspace to retrieve
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes |
Implementation Reference
- mcp_server.py:160-167 (handler)The main handler function for the 'rossum_get_workspace' tool. It is registered via the @mcp.tool() decorator and delegates the API call to the internal _get_workspace_impl helper.@mcp.tool() async def rossum_get_workspace(workspace_id: str) -> Dict[str, Any]: """Get a specific workspace by its ID. Args: workspace_id: The ID of the workspace to retrieve """ return await _get_workspace_impl(workspace_id=workspace_id)
- mcp_server.py:121-123 (helper)Helper function that performs the actual HTTP GET request to the Rossum API to retrieve the specific workspace by ID.async def _get_workspace_impl(workspace_id: str): """Get a specific workspace by ID""" return await _rossum_request("GET", f"/workspaces/{workspace_id}")
- mcp_server.py:28-52 (helper)Core utility function for making authenticated HTTP requests to the Rossum API, used by workspace retrieval.async def _rossum_request(method: str, path: str, **kwargs) -> Any: """Make a request to the Rossum API""" try: response = await client.request( method=method, url=f"{ROSSUM_API_BASE}{path}", headers=await get_rossum_headers(), **kwargs ) response.raise_for_status() # Handle cases where Rossum might return empty body on success (e.g., 204) if response.status_code == 204: return None return response.json() except httpx.HTTPStatusError as e: # Get error detail from response if possible error_detail = str(e) try: error_detail = e.response.json() except Exception: pass raise Exception(f"Rossum API error {e.response.status_code}: {error_detail}") except httpx.RequestError as e: raise Exception(f"Rossum API request failed: {str(e)}")
- mcp_server.py:22-26 (helper)Helper to generate authentication headers for Rossum API requests.async def get_rossum_headers() -> Dict[str, str]: return { "Authorization": f"Token {ROSSUM_API_KEY}", "Content-Type": "application/json" }