Skip to main content
Glama
rossumai

Rossum MCP Server

Official
by rossumai

rossum_get_workspaces

Retrieve all workspaces from the Rossum organization for analysis and management purposes.

Instructions

Get all workspaces from the Rossum organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'rossum_get_workspaces' tool. It is decorated with @mcp.tool() for registration and delegates the implementation to _get_workspaces_impl().
    @mcp.tool()
    async def rossum_get_workspaces() -> List[Dict[str, Any]]:
        """Get all workspaces from the Rossum organization."""
        return await _get_workspaces_impl()
  • Helper function that performs the actual API call to fetch all workspaces using the paginated request utility.
    async def _get_workspaces_impl() -> List[Dict[str, Any]]:
        """Get all workspaces, handling pagination."""
        # No summary_keys provided, so it will fetch all fields for each workspace.
        return await _rossum_unpaginated_request("GET", "/workspaces")
  • Core utility function for making paginated requests to the Rossum API, used by _get_workspaces_impl() to handle pagination transparently.
    async def _rossum_unpaginated_request(method: str, path: str, summary_keys: Optional[List[str]] = None) -> List[Dict[str, Any]]:
        """Make a request to the Rossum API, handling pagination and summarization."""
        all_items = []
        current_path = path
    
        while current_path:
            try:
                page_data = await _rossum_request(method, current_path)
            except Exception as e:
                # Log or handle error, for now re-raising.
                # Consider logging: print(f"Error fetching Rossum data from {current_path}: {e}")
                raise
    
            if page_data and "results" in page_data and isinstance(page_data.get("results"), list):
                for item in page_data["results"]:
                    if summary_keys:
                        summary_item = {key: item.get(key) for key in summary_keys if key in item}
                        all_items.append(summary_item)
                    else:
                        all_items.append(item)  # Append the full item if no summary_keys
            
            pagination_info = page_data.get("pagination") if page_data else None
            next_page_url = pagination_info.get("next") if pagination_info else None
            
            if next_page_url:
                if next_page_url.startswith(ROSSUM_API_BASE):
                    current_path = next_page_url[len(ROSSUM_API_BASE):]
                else:
                    # Consider logging: print(f"Warning: next_page_url {next_page_url} does not match ROSSUM_API_BASE")
                    current_path = None 
            else:
                current_path = None
    
        return all_items
  • Low-level HTTP request function to the Rossum API, handling errors and JSON parsing, used by the pagination helper.
    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)}")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the basic action without mentioning any behavioral traits such as authentication requirements, rate limits, pagination, or what 'Get all' entails (e.g., if it returns a list or summary). This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate but lacks depth. It doesn't explain what 'workspaces' are in this context or what the output might look like (e.g., a list of objects), which could help an agent use it correctly. However, for a basic read operation, it meets the bare minimum.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it doesn't incorrectly mention any. A baseline of 4 is appropriate for a zero-parameter tool with complete schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('all workspaces from the Rossum organization'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling 'rossum_get_workspace' (singular vs. plural), which would be needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'rossum_get_workspace' or other sibling tools. It simply states what it does without context about appropriate scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/rossumai/rossum-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server