list_lists
Retrieve all task lists within a specific folder or space in ClickUp, enabling organized project management and streamlined workflow tracking.
Instructions
List all lists in a folder or space
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | No | Folder ID | |
| space_id | No | Space ID |
Implementation Reference
- src/clickup_mcp/tools.py:976-1003 (handler)The handler function that executes the 'list_lists' tool logic by fetching lists from ClickUp API using client.get_lists, supporting folder or space scope.async def list_lists( self, folder_id: Optional[str] = None, space_id: Optional[str] = None, ) -> Dict[str, Any]: """List all lists.""" if not folder_id and not space_id: # List all lists from all spaces spaces = await self.client.get_spaces() all_lists = [] for space in spaces: lists = await self.client.get_lists(space_id=space.id) all_lists.extend(lists) else: all_lists = await self.client.get_lists(folder_id=folder_id, space_id=space_id) return { "lists": [ { "id": lst.id, "name": lst.name, "space": lst.space.get("name", "Unknown"), "folder": lst.folder.get("name") if lst.folder else None, } for lst in all_lists ], "count": len(all_lists), }
- src/clickup_mcp/tools.py:308-318 (schema)Input/output schema definition for the 'list_lists' tool in get_tool_definitions().Tool( name="list_lists", description="List all lists in a folder or space", inputSchema={ "type": "object", "properties": { "folder_id": {"type": "string", "description": "Folder ID"}, "space_id": {"type": "string", "description": "Space ID"}, }, }, ),
- src/clickup_mcp/tools.py:23-57 (registration)Registration of the 'list_lists' handler in the ClickUpTools class's _tools dictionary.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, }