assign_task
Assign users to tasks in ClickUp by specifying task IDs and user IDs to manage team responsibilities and project workflows.
Instructions
Assign users to a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task ID | |
| user_ids | Yes | User IDs to assign |
Implementation Reference
- src/clickup_mcp/tools.py:918-932 (handler)The primary handler for the 'assign_task' MCP tool. Resolves flexible task_id formats, updates assignees via ClickUp API, handles errors, and returns formatted response.async def assign_task(self, task_id: str, user_ids: List[int]) -> Dict[str, Any]: """Assign users to task.""" try: # First resolve the task to get the internal ID resolved_task = await self._resolve_task_id(task_id) update_request = UpdateTaskRequest(assignees={"add": user_ids}) task = await self.client.update_task(resolved_task.id, update_request) except ClickUpAPIError as e: return {"error": f"Failed to assign users to task '{task_id}': {e!s}"} return { "task_id": task.id, "assignees": [u.username for u in task.assignees], "updated": True, }
- src/clickup_mcp/tools.py:273-288 (schema)JSON schema defining the input parameters and validation for the assign_task tool.Tool( name="assign_task", description="Assign users to a task", inputSchema={ "type": "object", "properties": { "task_id": {"type": "string", "description": "Task ID"}, "user_ids": { "type": "array", "items": {"type": "integer"}, "description": "User IDs to assign", }, }, "required": ["task_id", "user_ids"], }, ),
- src/clickup_mcp/tools.py:35-37 (registration)Maps the 'assign_task' tool name to its handler function in the internal dispatch dictionary used by call_tool()."get_assignees": self.get_assignees, "assign_task": self.assign_task, "list_spaces": self.list_spaces,
- src/clickup_mcp/server.py:41-45 (registration)MCP server handler that exposes the assign_task tool schema (via get_tool_definitions()) to clients.@self.server.list_tools() async def list_tools() -> List[Tool]: """List all available tools.""" return self.tools.get_tool_definitions()