delete_checklist
Remove a checklist and all its items from a ClickUp task.
Instructions
Delete a checklist from a ClickUp task. Removes the checklist and all its items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checklist_id | Yes | The ID of the checklist to delete |
Implementation Reference
- src/tools/checklist-tools.ts:61-83 (handler)The handler function that executes the 'delete_checklist' tool logic. It registers the tool with name 'delete_checklist', accepts a 'checklist_id' string parameter, calls the underlying client method, and returns the result as JSON text.
// Register delete_checklist tool server.tool( 'delete_checklist', 'Delete a checklist from a ClickUp task. Removes the checklist and all its items.', { checklist_id: z.string().describe('The ID of the checklist to delete') }, async ({ checklist_id }) => { try { const result = await checklistsClient.deleteChecklist(checklist_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error deleting checklist:', error); return { content: [{ type: 'text', text: `Error deleting checklist: ${error.message}` }], isError: true }; } } ); - src/tools/checklist-tools.ts:65-66 (schema)Input schema for the 'delete_checklist' tool, defined using Zod — expects a single required string parameter 'checklist_id'.
{ checklist_id: z.string().describe('The ID of the checklist to delete') - src/tools/checklist-tools.ts:62-83 (registration)Registration of the 'delete_checklist' tool via server.tool() on the McpServer instance within the setupChecklistTools function.
server.tool( 'delete_checklist', 'Delete a checklist from a ClickUp task. Removes the checklist and all its items.', { checklist_id: z.string().describe('The ID of the checklist to delete') }, async ({ checklist_id }) => { try { const result = await checklistsClient.deleteChecklist(checklist_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error deleting checklist:', error); return { content: [{ type: 'text', text: `Error deleting checklist: ${error.message}` }], isError: true }; } } ); - The underlying API client method 'deleteChecklist' that performs the actual HTTP DELETE request to '/checklist/{checklistId}'. Returns { success: boolean }.
async deleteChecklist(checklistId: string): Promise<{ success: boolean }> { return this.client.delete(`/checklist/${checklistId}`); } - src/index.ts:45-46 (registration)Top-level registration: setupChecklistTools(this.server) is called in the ClickUpServer.setupTools() method, which wires up all checklist tools including 'delete_checklist'.
setupChecklistTools(this.server); setupCommentTools(this.server);