Skip to main content
Glama
windalfin

ClickUp MCP Server

by windalfin

create_folder

Organize ClickUp lists by creating folders within spaces to group related content together for better project management.

Instructions

Create a new folder in a ClickUp space for organizing related lists. You MUST provide:

  1. A folder name

  2. Either spaceId (preferred) or spaceName

After creating a folder, you can add lists to it using create_list_in_folder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the folder
spaceIdNoID of the space to create the folder in (preferred). Use this instead of spaceName if you have it.
spaceNameNoName of the space to create the folder in. Only use if you don't have spaceId.
override_statusesNoWhether to override space statuses with folder-specific statuses

Implementation Reference

  • Main handler function for the create_folder tool. Validates input parameters, resolves space ID using workspace service if spaceName provided, prepares folder data, calls folderService.createFolder, and returns formatted JSON response with the new folder details.
    export async function handleCreateFolder(parameters: any) {
      const { name, spaceId, spaceName, override_statuses } = parameters;
      
      // Validate required fields
      if (!name) {
        throw new Error("Folder name is required");
      }
      
      let targetSpaceId = spaceId;
      
      // If no spaceId but spaceName is provided, look up the space ID
      if (!targetSpaceId && spaceName) {
        const spaceIdResult = await workspaceService.findSpaceByName(spaceName);
        if (!spaceIdResult) {
          throw new Error(`Space "${spaceName}" not found`);
        }
        targetSpaceId = spaceIdResult.id;
      }
      
      if (!targetSpaceId) {
        throw new Error("Either spaceId or spaceName must be provided");
      }
    
      // Prepare folder data
      const folderData: CreateFolderData = {
        name
      };
    
      // Add optional fields if provided
      if (override_statuses !== undefined) folderData.override_statuses = override_statuses;
    
      try {
        // Create the folder
        const newFolder = await folderService.createFolder(targetSpaceId, folderData);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(
              {
                id: newFolder.id,
                name: newFolder.name,
                space: {
                  id: newFolder.space.id,
                  name: newFolder.space.name
                },
                message: `Folder "${newFolder.name}" created successfully`
              },
              null,
              2
            )
          }]
        };
      } catch (error: any) {
        throw new Error(`Failed to create folder: ${error.message}`);
      }
    }
  • Tool schema definition including name, description, and inputSchema for parameter validation in MCP protocol.
    export const createFolderTool = {
      name: "create_folder",
      description: "Create a new folder in a ClickUp space for organizing related lists. You MUST provide:\n1. A folder name\n2. Either spaceId (preferred) or spaceName\n\nAfter creating a folder, you can add lists to it using create_list_in_folder.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Name of the folder"
          },
          spaceId: {
            type: "string",
            description: "ID of the space to create the folder in (preferred). Use this instead of spaceName if you have it."
          },
          spaceName: {
            type: "string",
            description: "Name of the space to create the folder in. Only use if you don't have spaceId."
          },
          override_statuses: {
            type: "boolean",
            description: "Whether to override space statuses with folder-specific statuses"
          }
        },
        required: ["name"]
      }
    };
  • src/server.ts:134-135 (registration)
    Registration of the create_folder tool handler in the CallToolRequestHandler switch statement.
    case "create_folder":
      return handleCreateFolder(params);
  • src/server.ts:87-87 (registration)
    Registration of the createFolderTool definition in the ListToolsRequestHandler tool list.
    createFolderTool,
  • Underlying service method called by the handler to perform the actual ClickUp API call for creating a folder.
    async createFolder(spaceId: string, folderData: CreateFolderData): Promise<ClickUpFolder> {
      try {
        this.logOperation('createFolder', { spaceId, ...folderData });
        
        const response = await this.client.post<ClickUpFolder>(
          `/space/${spaceId}/folder`,
          folderData
        );
        
        return response.data;
      } catch (error) {
        throw this.handleError(error, `Failed to create folder in space ${spaceId}`);
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that this is a creation/mutation operation and mentions the post-creation workflow, but lacks details about permissions, error conditions, rate limits, or what happens if the folder name already exists. It adds some context but not comprehensive behavioral traits.

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 efficiently structured with two sentences: one stating the purpose and requirements, and another providing usage guidance. Every sentence adds value, with no redundant information. It's appropriately sized and front-loaded with essential information.

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?

For a mutation tool with no annotations and no output schema, the description does an adequate job explaining the basic operation and workflow. However, it lacks information about return values, error handling, and specific behavioral constraints that would be important for a creation tool. It's minimally viable but has clear gaps.

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?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds minimal value by listing required parameters and preferences (spaceId preferred over spaceName), but doesn't provide additional semantic context beyond what's in the schema. Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Create a new folder') and resource ('in a ClickUp space'), distinguishing it from siblings like 'create_list' or 'update_folder'. It explicitly mentions the purpose ('for organizing related lists'), which differentiates it from other creation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'After creating a folder, you can add lists to it using create_list_in_folder.' It also specifies parameter preferences: 'Either spaceId (preferred) or spaceName', giving clear alternatives for context.

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

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