remove_task_from_list
Remove a task from a ClickUp list without deleting it, allowing reassignment to another list.
Instructions
Remove a task from a ClickUp list without deleting the task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list_id | Yes | The ID of the list to remove the task from | |
| task_id | Yes | The ID of the task to remove |
Implementation Reference
- src/tools/task-tools.ts:444-465 (handler)MCP tool handler that defines and registers 'remove_task_from_list' with Zod schema for list_id and task_id, calls the listsClient.removeTaskFromList method, and returns the result as JSON text content.
server.tool( 'remove_task_from_list', 'Remove a task from a ClickUp list without deleting the task.', { list_id: z.string().describe('The ID of the list to remove the task from'), task_id: z.string().describe('The ID of the task to remove') }, async ({ list_id, task_id }) => { try { const result = await listsClient.removeTaskFromList(list_id, task_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error removing task from list:', error); return { content: [{ type: 'text', text: `Error removing task from list: ${error.message}` }], isError: true }; } } ); - src/tools/task-tools.ts:447-449 (schema)Zod schema defining the input parameters for the remove_task_from_list tool: list_id (string) and task_id (string).
{ list_id: z.string().describe('The ID of the list to remove the task from'), task_id: z.string().describe('The ID of the task to remove') - src/tools/task-tools.ts:444-465 (registration)Registration of the 'remove_task_from_list' tool on the MCP server via server.tool(), which defines the name, description, input schema, and handler.
server.tool( 'remove_task_from_list', 'Remove a task from a ClickUp list without deleting the task.', { list_id: z.string().describe('The ID of the list to remove the task from'), task_id: z.string().describe('The ID of the task to remove') }, async ({ list_id, task_id }) => { try { const result = await listsClient.removeTaskFromList(list_id, task_id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error removing task from list:', error); return { content: [{ type: 'text', text: `Error removing task from list: ${error.message}` }], isError: true }; } } ); - src/clickup-client/lists.ts:114-116 (helper)ListsClient method that performs the actual API call: HTTP DELETE to /list/{listId}/task/{taskId} to remove a task from a ClickUp list.
async removeTaskFromList(listId: string, taskId: string): Promise<{ success: boolean }> { return this.client.delete(`/list/${listId}/task/${taskId}`); }