Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

get_folders

Retrieve all folders within a ClickUp space to organize and access project structures. Provide the space ID to list available folders.

Instructions

Get all folders in a space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesClickUp space ID

Implementation Reference

  • Defines the get_folders tool, including its handler function that calls the folder service to retrieve folders.
    const getFoldersTool = defineTool((z) => ({
      name: "get_folders",
      description: "Get all folders in a space",
      inputSchema: {
        space_id: z.string().describe("ClickUp space ID"),
      },
      handler: async (input) => {
        const { space_id } = input;
        const response = await folderService.getFolders(space_id);
        return {
          content: [{ type: "text", text: JSON.stringify(response) }],
        };
      },
    }));
  • Input schema definition for the get_folders tool, specifying the required space_id parameter.
    inputSchema: {
      space_id: z.string().describe("ClickUp space ID"),
    },
  • src/index.ts:20-20 (registration)
    Import statement for the getFoldersTool.
    import { getFoldersTool } from "./controllers/folder.controller";
  • src/index.ts:41-41 (registration)
    Registration of getFoldersTool in the tools array, which is later used to register all tools with the MCP server.
    getFoldersTool,
  • Helper service method that makes the API request to ClickUp to get folders in a space and processes the response.
    async getFolders(spaceId: string) {
      const response = await this.request<{ folders: any[] }>(
        `/space/${spaceId}/folder`
      );
    
      // Remove the "lists" attribute from each folder to reduce payload size
      if (response.folders && Array.isArray(response.folders)) {
        response.folders = response.folders.map((folder) => {
          const { lists, ...folderWithoutLists } = folder;
          return folderWithoutLists;
        });
      }
    
      return response;
    }
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 states it 'gets' folders, implying a read-only operation, but doesn't specify if it returns all folders at once, uses pagination, requires authentication, or has rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 ('Get all folders in a space') that is front-loaded with the core action. It wastes no words and directly communicates the tool's purpose without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, or output format. With no output schema, it should ideally hint at return values, but for a simple read operation, it meets a bare minimum.

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 input schema has 1 parameter with 100% description coverage ('ClickUp space ID'), so the schema fully documents the parameter. The description adds no additional meaning beyond implying the 'space_id' is needed to scope the folders, which is already clear from the schema. With high schema coverage, the baseline score of 3 is appropriate.

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 'Get all folders in a space' clearly states the verb ('Get') and resource ('folders'), with the scope ('in a space') specified. It distinguishes from siblings like 'get_lists' or 'get_spaces' by focusing on folders, though it doesn't explicitly differentiate from non-folder tools. This is clear but lacks explicit sibling differentiation.

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. It doesn't mention prerequisites (e.g., needing a space ID), exclusions, or comparisons to sibling tools like 'get_lists' or 'get_spaces'. Without such context, users must infer usage from the name alone.

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/Leanware-io/clickup-mcp-server'

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