Skip to main content
Glama
DiversioTeam

ClickUp MCP Server

by DiversioTeam

get_team_workload

Analyze team workload distribution in ClickUp to identify capacity and balance tasks across members, supporting data-driven resource allocation decisions.

Instructions

Get workload distribution across team members

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID
include_completedNoInclude completed tasks in analysis

Implementation Reference

  • The handler function that implements get_team_workload. Fetches all tasks in a space using the client, groups them by assignee username, counts tasks per user, sums time estimates, tracks by priority, converts estimates to hours, and returns workload stats including unassigned tasks.
    async def get_team_workload(
        self, space_id: str, include_completed: bool = False
    ) -> Dict[str, Any]:
        """Get workload distribution across team members."""
        # Get all tasks in the space
        tasks = await self.client.get_tasks(
            space_id=space_id,
            include_closed=include_completed,
        )
    
        # Group by assignee
        workload = {}
        unassigned_count = 0
    
        for task in tasks:
            if not task.assignees:
                unassigned_count += 1
            else:
                for assignee in task.assignees:
                    username = assignee.username
                    if username not in workload:
                        workload[username] = {
                            "user_id": assignee.id,
                            "username": username,
                            "task_count": 0,
                            "total_time_estimate": 0,
                            "by_priority": {1: 0, 2: 0, 3: 0, 4: 0},
                        }
    
                    workload[username]["task_count"] += 1
                    if task.time_estimate:
                        workload[username]["total_time_estimate"] += task.time_estimate
                    if task.priority:
                        workload[username]["by_priority"][task.priority.value] += 1
    
        # Convert time estimates to hours
        for user_data in workload.values():
            user_data["total_hours_estimate"] = round(
                user_data["total_time_estimate"] / (1000 * 60 * 60), 2
            )
    
        return {
            "space_id": space_id,
            "team_workload": list(workload.values()),
            "unassigned_tasks": unassigned_count,
            "total_tasks": len(tasks),
        }
  • Input schema definition for the get_team_workload tool, specifying required space_id and optional include_completed boolean.
    Tool(
        name="get_team_workload",
        description="Get workload distribution across team members",
        inputSchema={
            "type": "object",
            "properties": {
                "space_id": {"type": "string", "description": "Space ID"},
                "include_completed": {
                    "type": "boolean",
                    "description": "Include completed tasks in analysis",
                },
            },
            "required": ["space_id"],
        },
    ),
  • Registration of the get_team_workload handler method in the ClickUpTools class's _tools dictionary, mapping the tool name to its implementation.
    self._tools: Dict[str, Callable] = {
        "create_task": self.create_task,
        "get_task": self.get_task,
        "update_task": self.update_task,
        "delete_task": self.delete_task,
        "list_tasks": self.list_tasks,
        "search_tasks": self.search_tasks,
        "get_subtasks": self.get_subtasks,
        "get_task_comments": self.get_task_comments,
        "create_task_comment": self.create_task_comment,
        "get_task_status": self.get_task_status,
        "update_task_status": self.update_task_status,
        "get_assignees": self.get_assignees,
        "assign_task": self.assign_task,
        "list_spaces": self.list_spaces,
        "list_folders": self.list_folders,
        "list_lists": self.list_lists,
        "find_list_by_name": self.find_list_by_name,
        # Bulk operations
        "bulk_update_tasks": self.bulk_update_tasks,
        "bulk_move_tasks": self.bulk_move_tasks,
        # Time tracking
        "get_time_tracked": self.get_time_tracked,
        "log_time": self.log_time,
        # Templates
        "create_task_from_template": self.create_task_from_template,
        "create_task_chain": self.create_task_chain,
        # Analytics
        "get_team_workload": self.get_team_workload,
        "get_task_analytics": self.get_task_analytics,
        # User management
        "list_users": self.list_users,
        "get_current_user": self.get_current_user,
        "find_user_by_name": self.find_user_by_name,
    }
  • MCP server registration: the list_tools handler exposes all tool definitions from ClickUpTools including get_team_workload.
    @self.server.list_tools()
    async def list_tools() -> List[Tool]:
        """List all available tools."""
        return self.tools.get_tool_definitions()
    
    @self.server.call_tool()
    async def call_tool(
        name: str, arguments: Optional[Dict[str, Any]] = None
    ) -> List[TextContent | ImageContent | EmbeddedResource]:
        """Call a specific tool."""
        logger.debug(f"Calling tool: {name} with arguments: {arguments}")
    
        try:
            result = await self.tools.call_tool(name, arguments or {})
            return [TextContent(type="text", text=result)]
        except Exception as e:
            logger.error(f"Error calling tool {name}: {e}", exc_info=True)
            return [TextContent(type="text", text=f"Error: {e!s}")]
  • MCP server registration: the call_tool handler dispatches to ClickUpTools.call_tool, which invokes the specific get_team_workload handler based on name.
    @self.server.call_tool()
    async def call_tool(
        name: str, arguments: Optional[Dict[str, Any]] = None
    ) -> List[TextContent | ImageContent | EmbeddedResource]:
        """Call a specific tool."""
        logger.debug(f"Calling tool: {name} with arguments: {arguments}")
    
        try:
            result = await self.tools.call_tool(name, arguments or {})
            return [TextContent(type="text", text=result)]
        except Exception as e:
            logger.error(f"Error calling tool {name}: {e}", exc_info=True)
            return [TextContent(type="text", text=f"Error: {e!s}")]
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Get workload distribution' but doesn't specify what data is returned (e.g., metrics, format), whether it's real-time or cached, or any limitations like rate limits or permissions required, which is inadequate for a tool with potential complexity.

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 with no wasted words. It's front-loaded with the core purpose, making it easy to parse quickly, which is ideal for conciseness.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'workload distribution' entails (e.g., metrics like task counts, hours), how results are structured, or any behavioral traits, which is insufficient for a tool that likely returns complex data.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters ('space_id' and 'include_completed'). The description doesn't add any meaning beyond this, such as explaining how these parameters affect the workload analysis, but it doesn't need to compensate for gaps, resulting in a baseline score.

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 verb ('Get') and resource ('workload distribution across team members'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_task_analytics' or 'get_assignees', which might also provide related team insights, so it doesn't reach the highest 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. With siblings like 'get_task_analytics' and 'get_assignees' that might overlap in functionality, there's no indication of context, prerequisites, or exclusions, leaving usage ambiguous.

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/DiversioTeam/clickup-mcp'

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