Skip to main content
Glama
windalfin

ClickUp MCP Server

by windalfin

create_list_in_folder

Create a new task list within a ClickUp folder by specifying folder ID or folder name with space context to organize project workflows.

Instructions

Create a new list within a ClickUp folder. You MUST provide either: 1) folderId alone, or 2) folderName WITH either spaceName or spaceId. Folder names may not be unique across spaces, which is why space information is required when using folderName.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the list
folderIdNoID of the folder to create the list in. If you have this, you don't need folderName or space information.
folderNameNoName of the folder to create the list in. When using this, you MUST also provide either spaceName or spaceId.
spaceIdNoID of the space containing the folder. Required when using folderName instead of folderId.
spaceNameNoName of the space containing the folder. Required when using folderName instead of folderId.
contentNoDescription or content of the list
statusNoStatus of the list (uses folder default if not specified)

Implementation Reference

  • The primary handler function for the 'create_list_in_folder' tool. It validates inputs, resolves folder IDs using workspace service if names are provided, prepares list data, calls the list service to create the list in the folder, and returns a formatted response with the new list details.
    export async function handleCreateListInFolder(parameters: any) {
      const { name, folderId, folderName, spaceId, spaceName, content, status } = parameters;
      
      // Validate required fields
      if (!name) {
        throw new Error("List name is required");
      }
      
      let targetFolderId = folderId;
      
      // If no folderId but folderName is provided, look up the folder ID
      if (!targetFolderId && folderName) {
        let targetSpaceId = spaceId;
        
        // If no spaceId provided but spaceName is, look up the space ID first
        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("When using folderName to identify a folder, you must also provide either spaceId or spaceName to locate the correct folder. This is because folder names might not be unique across different spaces.");
        }
        
        // Find the folder in the workspace hierarchy
        const hierarchy = await workspaceService.getWorkspaceHierarchy();
        const folderInfo = workspaceService.findIDByNameInHierarchy(hierarchy, folderName, 'folder');
        if (!folderInfo) {
          throw new Error(`Folder "${folderName}" not found in space`);
        }
        targetFolderId = folderInfo.id;
      }
      
      if (!targetFolderId) {
        throw new Error("Either folderId or folderName must be provided");
      }
    
      // Prepare list data
      const listData: CreateListData = {
        name
      };
    
      // Add optional fields if provided
      if (content) listData.content = content;
      if (status) listData.status = status;
    
      try {
        // Create the list in the folder
        const newList = await listService.createListInFolder(targetFolderId, listData);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(
              {
                id: newList.id,
                name: newList.name,
                content: newList.content,
                space: {
                  id: newList.space.id,
                  name: newList.space.name
                },
                message: `List "${newList.name}" created successfully in folder`
              },
              null,
              2
            )
          }]
        };
      } catch (error: any) {
        throw new Error(`Failed to create list in folder: ${error.message}`);
      }
    }
  • The tool definition object defining the 'create_list_in_folder' tool, including its name, description, and detailed inputSchema for parameter validation.
    export const createListInFolderTool = {
      name: "create_list_in_folder",
      description: "Create a new list within a ClickUp folder. You MUST provide either: 1) folderId alone, or 2) folderName WITH either spaceName or spaceId. Folder names may not be unique across spaces, which is why space information is required when using folderName.",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Name of the list"
          },
          folderId: {
            type: "string",
            description: "ID of the folder to create the list in. If you have this, you don't need folderName or space information."
          },
          folderName: {
            type: "string",
            description: "Name of the folder to create the list in. When using this, you MUST also provide either spaceName or spaceId."
          },
          spaceId: {
            type: "string",
            description: "ID of the space containing the folder. Required when using folderName instead of folderId."
          },
          spaceName: {
            type: "string", 
            description: "Name of the space containing the folder. Required when using folderName instead of folderId."
          },
          content: {
            type: "string",
            description: "Description or content of the list"
          },
          status: {
            type: "string",
            description: "Status of the list (uses folder default if not specified)"
          }
        },
        required: ["name"]
      }
    };
  • src/server.ts:67-93 (registration)
    Registration of the createListInFolderTool in the list of available tools returned by the ListToolsRequestSchema handler (line 83 specifically includes createListInFolderTool).
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          workspaceHierarchyTool,
          createTaskTool,
          getTaskTool,
          getTasksTool,
          updateTaskTool,
          moveTaskTool,
          duplicateTaskTool,
          deleteTaskTool,
          createBulkTasksTool,
          updateBulkTasksTool,
          moveBulkTasksTool,
          deleteBulkTasksTool,
          createListTool,
          createListInFolderTool,
          getListTool,
          updateListTool,
          deleteListTool,
          createFolderTool,
          getFolderTool,
          updateFolderTool,
          deleteFolderTool
        ]
      };
    });
  • src/server.ts:125-127 (registration)
    Dispatch/registration of the handler for 'create_list_in_folder' in the CallToolRequestSchema switch statement.
      return handleCreateList(params);
    case "create_list_in_folder":
      return handleCreateListInFolder(params);
  • The underlying service method called by the handler to perform the actual ClickUp API call for creating a list in a folder.
    async createListInFolder(folderId: string, listData: CreateListData): Promise<ClickUpList> {
      this.logOperation('createListInFolder', { folderId, ...listData });
      
      try {
        return await this.makeRequest(async () => {
          const response = await this.client.post<ClickUpList>(
            `/folder/${folderId}/list`,
            listData
          );
          return response.data;
        });
      } catch (error) {
        throw this.handleError(error, `Failed to create list in folder ${folderId}`);
      }
    }
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 of behavioral disclosure. It effectively communicates the creation operation (a write/mutation) and the parameter dependency rules, but doesn't address other behavioral aspects like authentication requirements, error conditions, rate limits, or what happens on success (e.g., returns the created list object). The description adds meaningful context about the folder name uniqueness constraint, which is valuable behavioral information.

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 perfectly front-loaded with the core purpose, followed immediately by the critical usage rules. Both sentences earn their place: the first establishes what the tool does, the second provides essential parameter guidance. There's zero wasted text, and the structure logically progresses from general to specific.

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

Completeness4/5

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

For a creation tool with 7 parameters, no annotations, and no output schema, the description does an excellent job covering the most critical aspects: purpose, parameter dependencies, and the uniqueness constraint rationale. However, it doesn't mention what the tool returns (output format) or potential error conditions, which would be helpful given the absence of both annotations and output schema. The parameter guidance is comprehensive, but some behavioral context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 7 parameters thoroughly. The description adds significant value beyond the schema by explaining the logical relationships between parameters (folderId vs folderName+space combinations) and the rationale behind them (folder name uniqueness issues). This contextual information helps the agent understand how to correctly combine parameters, elevating the score above the baseline 3.

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 list') and target resource ('within a ClickUp folder'), distinguishing it from sibling tools like 'create_list' (which presumably creates lists without folder context) and 'create_folder' (which creates folders rather than lists). The verb+resource combination is precise and unambiguous.

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 conditional logic for when to use different parameter combinations: 'You MUST provide either: 1) folderId alone, or 2) folderName WITH either spaceName or spaceId.' It also explains why space information is required when using folderName ('Folder names may not be unique across spaces'), offering clear guidance on parameter dependencies and alternatives.

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