Skip to main content
Glama
windalfin

ClickUp MCP Server

by windalfin

delete_list

Permanently delete a ClickUp list and all its tasks by providing either listId or listName. This action cannot be undone.

Instructions

Permanently delete a ClickUp list and all its tasks. You MUST provide either listId or listName. WARNING: This action cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listIdNoID of the list to delete. Use this instead of listName if you have the ID.
listNameNoName of the list to delete. May be ambiguous if multiple lists have the same name.

Implementation Reference

  • The main handler function for the 'delete_list' tool. It resolves the list ID (using listName if necessary via helper), retrieves list details for confirmation, calls the service to delete the list, and returns a success message with URL.
    export async function handleDeleteList(parameters: any) {
      const { listId, listName } = parameters;
      
      let targetListId = listId;
      
      // If no listId provided but listName is, look up the list ID
      if (!targetListId && listName) {
        const listResult = await findListIDByName(workspaceService, listName);
        if (!listResult) {
          throw new Error(`List "${listName}" not found`);
        }
        targetListId = listResult.id;
      }
      
      if (!targetListId) {
        throw new Error("Either listId or listName must be provided");
      }
    
      try {
        // Get list details before deletion for confirmation message
        const list = await listService.getList(targetListId);
        const listName = list.name;
        
        // Delete the list
        await listService.deleteList(targetListId);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(
              {
                message: `List "${listName}" deleted successfully`,
                url: `https://app.clickup.com/${config.clickupTeamId}/v/l/${targetListId}`
              },
              null,
              2
            )
          }]
        };
      } catch (error: any) {
        throw new Error(`Failed to delete list: ${error.message}`);
      }
    } 
  • Tool definition object for 'delete_list' including name, description, and input schema for parameters (listId or listName). Used for both schema validation and registration.
    export const deleteListTool = {
      name: "delete_list",
      description: "Permanently delete a ClickUp list and all its tasks. You MUST provide either listId or listName. WARNING: This action cannot be undone.",
      inputSchema: {
        type: "object",
        properties: {
          listId: {
            type: "string",
            description: "ID of the list to delete. Use this instead of listName if you have the ID."
          },
          listName: {
            type: "string",
            description: "Name of the list to delete. May be ambiguous if multiple lists have the same name."
          }
        },
        required: []
      }
    };
  • src/server.ts:67-93 (registration)
    Registration of the deleteListTool (line 86 in array) in the MCP server's ListToolsRequestHandler, making it available to clients.
    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:132-133 (registration)
    Dispatch/registration in the CallToolRequestHandler switch statement, routing 'delete_list' calls to handleDeleteList.
    case "delete_list":
      return handleDeleteList(params);
  • ClickUp service helper method that performs the actual HTTP DELETE request to /list/{listId} via the API client.
    async deleteList(listId: string): Promise<ServiceResponse<void>> {
      this.logOperation('deleteList', { listId });
      
      try {
        await this.makeRequest(async () => {
          await this.client.delete(`/list/${listId}`);
        });
        
        return {
          success: true
        };
      } catch (error) {
        throw this.handleError(error, `Failed to delete list ${listId}`);
      }
    }
Behavior5/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 critical traits: the action is permanent ('Permanently delete', 'cannot be undone'), destructive (deletes list and all tasks), and has a warning about irreversibility. This adds significant value beyond what the input schema provides.

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 front-loaded with the core action, uses only two sentences with zero waste, and includes a critical warning prominently. Every sentence earns its place by conveying essential information efficiently without redundancy.

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?

Given the tool's destructive nature, no annotations, and no output schema, the description is mostly complete. It covers purpose, parameters, and behavioral warnings well. A minor gap is the lack of explicit mention of permissions or error cases, but it adequately addresses the core context for a deletion tool.

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 both parameters thoroughly. The description adds marginal value by emphasizing the requirement to provide at least one parameter ('You MUST provide either listId or listName') and hinting at ambiguity with listName, but does not add new semantic details beyond the schema's descriptions.

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 ('Permanently delete'), the target resource ('a ClickUp list and all its tasks'), and distinguishes it from siblings like delete_task or delete_folder by specifying it deletes an entire list with its tasks. It uses precise language that goes beyond just restating the name.

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

Usage Guidelines4/5

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

The description provides clear context on when to use it by specifying 'You MUST provide either listId or listName', which helps the agent choose between parameters. However, it does not explicitly mention when not to use it or name alternatives like delete_task for individual tasks, though the sibling list implies this distinction.

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