list_lists
Retrieve all lists within a ClickUp folder or space to organize and manage project workflows efficiently.
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 main execution logic for the 'list_lists' tool. Fetches lists from ClickUp API (via client.get_lists) either for a specific folder/space or all spaces, and returns formatted list with IDs, names, space, and folder info.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)The input schema definition for the list_lists tool, specifying optional folder_id and space_id parameters.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/server.py:41-45 (registration)MCP server registration: the list_tools handler that exposes the list_lists tool schema to the MCP protocol.@self.server.list_tools() async def list_tools() -> List[Tool]: """List all available tools.""" return self.tools.get_tool_definitions()
- src/clickup_mcp/tools.py:39-39 (registration)Internal registration of the list_lists handler method in the ClickUpTools class _tools dictionary, used by call_tool."list_lists": self.list_lists,
- src/clickup_mcp/server.py:31-33 (registration)Instantiates ClickUpTools (containing list_lists) and MCP Server in ClickUpMCPServer init.self.client = ClickUpClient(config) self.tools = ClickUpTools(self.client) self.server = Server("clickup-mcp")