Skip to main content
Glama

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}`); } }

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