Skip to main content
Glama
DiversioTeam

ClickUp MCP Server

by DiversioTeam

list_folders

Retrieve all folders within a ClickUp space to organize tasks and manage project structure.

Instructions

List folders in a space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID

Implementation Reference

  • The handler function that implements the list_folders tool. It fetches folders using the ClickUpClient and returns a formatted JSON response with folder details including nested lists.
    async def list_folders(self, space_id: str) -> Dict[str, Any]:
        """List folders in space."""
        folders = await self.client.get_folders(space_id)
    
        return {
            "space_id": space_id,
            "folders": [
                {
                    "id": folder.id,
                    "name": folder.name,
                    "task_count": folder.task_count,
                    "lists": [
                        {
                            "id": lst.id,
                            "name": lst.name,
                            "task_count": lst.task_count,
                        }
                        for lst in folder.lists
                    ],
                }
                for folder in folders
            ],
            "count": len(folders),
        }
  • The Tool schema definition for list_folders, specifying the input schema that requires a space_id parameter.
    Tool(
        name="list_folders",
        description="List folders in a space",
        inputSchema={
            "type": "object",
            "properties": {
                "space_id": {"type": "string", "description": "Space ID"},
            },
            "required": ["space_id"],
        },
    ),
  • Registration of the list_folders handler method in the internal _tools dictionary of ClickUpTools class, which is used by the call_tool method to dispatch calls.
    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 for listing tools, which returns the tool definitions (including list_folders schema) from ClickUpTools.get_tool_definitions().
    @self.server.list_tools()
    async def list_tools() -> List[Tool]:
        """List all available tools."""
        return self.tools.get_tool_definitions()
  • Helper method in ClickUpClient that performs the actual API request to retrieve folders from a ClickUp space and parses them into Folder model objects.
    async def get_folders(self, space_id: str) -> List[Folder]:
        """Get all folders in a space."""
        data = await self._request("GET", f"/space/{space_id}/folder")
        folders = data.get("folders", [])
        return [Folder(**folder) for folder in folders]
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 states 'List folders' but doesn't describe what 'list' means operationally—e.g., whether it returns all folders, supports pagination, includes metadata, or has access restrictions. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 zero waste. It's front-loaded and appropriately sized for a simple tool, avoiding unnecessary elaboration. Every word contributes directly to stating the tool's purpose.

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 tool's simplicity (1 parameter, 100% schema coverage) but lack of annotations and output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, folder details), potential errors, or behavioral aspects like read-only nature. For a tool with no structured output documentation, more context is needed to be fully helpful.

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?

The description implies a 'space' context but doesn't add meaning beyond the input schema, which has 100% coverage and documents the 'space_id' parameter clearly. No additional details about parameter usage or constraints are provided. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 'List folders in a space' clearly states the action (list) and resource (folders), with the scope (in a space) implied. It distinguishes from siblings like 'list_tasks' or 'list_lists' by specifying folders, though it doesn't explicitly contrast with them. The purpose is unambiguous but could be more specific about what 'list' entails.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a space_id), exclusions, or related tools like 'list_spaces' for context. The description assumes usage without clarifying the tool's role in the broader workflow.

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