@taazkareem/clickup-mcp-server 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -38
- package/build/config.js +33 -2
- package/build/index.js +16 -29
- package/build/logger.js +8 -11
- package/build/server.js +33 -8
- package/build/services/clickup/base.js +3 -0
- package/build/services/clickup/bulk.js +3 -0
- package/build/services/clickup/folder.js +3 -0
- package/build/services/clickup/index.js +9 -1
- package/build/services/clickup/list.js +3 -0
- package/build/services/clickup/tag.js +190 -0
- package/build/services/clickup/task.js +165 -2
- package/build/services/clickup/types.js +3 -0
- package/build/services/clickup/workspace.js +3 -0
- package/build/services/shared.js +3 -0
- package/build/tools/folder.js +3 -0
- package/build/tools/index.js +4 -0
- package/build/tools/list.js +3 -0
- package/build/tools/tag.js +824 -0
- package/build/tools/task/attachments.js +3 -0
- package/build/tools/task/bulk-operations.js +10 -0
- package/build/tools/task/handlers.js +76 -10
- package/build/tools/task/index.js +8 -1
- package/build/tools/task/main.js +18 -2
- package/build/tools/task/single-operations.js +64 -46
- package/build/tools/task/utilities.js +40 -3
- package/build/tools/task/workspace-operations.js +222 -0
- package/build/tools/utils.js +3 -0
- package/build/tools/workspace.js +9 -46
- package/build/utils/color-processor.js +183 -0
- package/build/utils/concurrency-utils.js +3 -0
- package/build/utils/date-utils.js +3 -0
- package/build/utils/resolver-utils.js +3 -0
- package/build/utils/sponsor-service.js +5 -2
- package/build/utils/token-utils.js +49 -0
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Bulk Task Operations
|
|
3
6
|
*
|
|
4
7
|
* This module defines tools for bulk task operations including creating,
|
|
@@ -124,6 +127,13 @@ Notes:
|
|
|
124
127
|
dueDate: {
|
|
125
128
|
type: "string",
|
|
126
129
|
description: "Due date. Supports Unix timestamps (in milliseconds) and natural language expressions like '1 hour from now', 'tomorrow', 'next week', etc."
|
|
130
|
+
},
|
|
131
|
+
tags: {
|
|
132
|
+
type: "array",
|
|
133
|
+
items: {
|
|
134
|
+
type: "string"
|
|
135
|
+
},
|
|
136
|
+
description: "Optional array of tag names to assign to the task. The tags must already exist in the space."
|
|
127
137
|
}
|
|
128
138
|
},
|
|
129
139
|
required: ["name"]
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Task Operation Handlers
|
|
3
6
|
*
|
|
4
7
|
* This module implements the handlers for task operations, both for single task
|
|
@@ -83,7 +86,7 @@ async function mapTaskIds(tasks) {
|
|
|
83
86
|
* Handler for creating a task
|
|
84
87
|
*/
|
|
85
88
|
export async function createTaskHandler(params) {
|
|
86
|
-
const { name, description, markdown_description, status, dueDate } = params;
|
|
89
|
+
const { name, description, markdown_description, status, dueDate, parent, tags } = params;
|
|
87
90
|
if (!name)
|
|
88
91
|
throw new Error("Task name is required");
|
|
89
92
|
// Use our helper function to validate and convert priority
|
|
@@ -95,7 +98,9 @@ export async function createTaskHandler(params) {
|
|
|
95
98
|
markdown_description,
|
|
96
99
|
status,
|
|
97
100
|
priority,
|
|
98
|
-
due_date: dueDate ? parseDueDate(dueDate) : undefined
|
|
101
|
+
due_date: dueDate ? parseDueDate(dueDate) : undefined,
|
|
102
|
+
parent,
|
|
103
|
+
tags
|
|
99
104
|
});
|
|
100
105
|
}
|
|
101
106
|
/**
|
|
@@ -131,6 +136,12 @@ export async function duplicateTaskHandler(params) {
|
|
|
131
136
|
export async function getTaskHandler(params) {
|
|
132
137
|
// resolveTaskIdWithValidation now auto-detects whether taskId is a regular ID or custom ID
|
|
133
138
|
const taskId = await getTaskId(params.taskId, params.taskName, params.listName, params.customTaskId);
|
|
139
|
+
// If subtasks parameter is provided and true, use the getTaskWithSubtasks method
|
|
140
|
+
if (params.subtasks) {
|
|
141
|
+
const task = await taskService.getTask(taskId);
|
|
142
|
+
const subtasks = await taskService.getSubtasks(taskId);
|
|
143
|
+
return { ...task, subtasks };
|
|
144
|
+
}
|
|
134
145
|
return await taskService.getTask(taskId);
|
|
135
146
|
}
|
|
136
147
|
/**
|
|
@@ -140,14 +151,6 @@ export async function getTasksHandler(params) {
|
|
|
140
151
|
const listId = await getListId(params.listId, params.listName);
|
|
141
152
|
return await taskService.getTasks(listId, buildTaskFilters(params));
|
|
142
153
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Handler for deleting a task
|
|
145
|
-
*/
|
|
146
|
-
export async function deleteTaskHandler(params) {
|
|
147
|
-
const taskId = await getTaskId(params.taskId, params.taskName, params.listName);
|
|
148
|
-
await taskService.deleteTask(taskId);
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
154
|
/**
|
|
152
155
|
* Handler for getting task comments
|
|
153
156
|
*/
|
|
@@ -186,6 +189,61 @@ export async function createTaskCommentHandler(params) {
|
|
|
186
189
|
throw error;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Handler for getting workspace tasks with filtering
|
|
194
|
+
*/
|
|
195
|
+
export async function getWorkspaceTasksHandler(taskService, params) {
|
|
196
|
+
try {
|
|
197
|
+
// Require at least one filter parameter
|
|
198
|
+
const hasFilter = [
|
|
199
|
+
'tags',
|
|
200
|
+
'list_ids',
|
|
201
|
+
'folder_ids',
|
|
202
|
+
'space_ids',
|
|
203
|
+
'statuses',
|
|
204
|
+
'assignees',
|
|
205
|
+
'date_created_gt',
|
|
206
|
+
'date_created_lt',
|
|
207
|
+
'date_updated_gt',
|
|
208
|
+
'date_updated_lt',
|
|
209
|
+
'due_date_gt',
|
|
210
|
+
'due_date_lt'
|
|
211
|
+
].some(key => params[key] !== undefined);
|
|
212
|
+
if (!hasFilter) {
|
|
213
|
+
throw new Error('At least one filter parameter is required (tags, list_ids, folder_ids, space_ids, statuses, assignees, or date filters)');
|
|
214
|
+
}
|
|
215
|
+
// Create filter object from parameters
|
|
216
|
+
const filters = {
|
|
217
|
+
tags: params.tags,
|
|
218
|
+
list_ids: params.list_ids,
|
|
219
|
+
folder_ids: params.folder_ids,
|
|
220
|
+
space_ids: params.space_ids,
|
|
221
|
+
statuses: params.statuses,
|
|
222
|
+
include_closed: params.include_closed,
|
|
223
|
+
include_archived_lists: params.include_archived_lists,
|
|
224
|
+
include_closed_lists: params.include_closed_lists,
|
|
225
|
+
archived: params.archived,
|
|
226
|
+
order_by: params.order_by,
|
|
227
|
+
reverse: params.reverse,
|
|
228
|
+
due_date_gt: params.due_date_gt,
|
|
229
|
+
due_date_lt: params.due_date_lt,
|
|
230
|
+
date_created_gt: params.date_created_gt,
|
|
231
|
+
date_created_lt: params.date_created_lt,
|
|
232
|
+
date_updated_gt: params.date_updated_gt,
|
|
233
|
+
date_updated_lt: params.date_updated_lt,
|
|
234
|
+
assignees: params.assignees,
|
|
235
|
+
page: params.page,
|
|
236
|
+
detail_level: params.detail_level || 'detailed'
|
|
237
|
+
};
|
|
238
|
+
// Get tasks with adaptive response format support
|
|
239
|
+
const response = await taskService.getWorkspaceTasks(filters);
|
|
240
|
+
// Return the response without adding the redundant _note field
|
|
241
|
+
return response;
|
|
242
|
+
}
|
|
243
|
+
catch (error) {
|
|
244
|
+
throw new Error(`Failed to get workspace tasks: ${error.message}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
189
247
|
//=============================================================================
|
|
190
248
|
// BULK TASK OPERATIONS
|
|
191
249
|
//=============================================================================
|
|
@@ -242,3 +300,11 @@ export async function deleteBulkTasksHandler(params) {
|
|
|
242
300
|
await bulkService.deleteTasks(taskIds, parseBulkOptions(params.options));
|
|
243
301
|
return taskIds.map(() => true);
|
|
244
302
|
}
|
|
303
|
+
/**
|
|
304
|
+
* Handler for deleting a task
|
|
305
|
+
*/
|
|
306
|
+
export async function deleteTaskHandler(params) {
|
|
307
|
+
const taskId = await getTaskId(params.taskId, params.taskName, params.listName);
|
|
308
|
+
await taskService.deleteTask(taskId);
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Task Tools
|
|
3
6
|
*
|
|
4
7
|
* This module re-exports all task-related tools and handlers.
|
|
@@ -9,6 +12,8 @@ export * from './main.js';
|
|
|
9
12
|
export { createTaskTool, getTaskTool, getTasksTool, updateTaskTool, moveTaskTool, duplicateTaskTool, deleteTaskTool, getTaskCommentsTool, createTaskCommentTool } from './single-operations.js';
|
|
10
13
|
// Re-export bulk task operation tools
|
|
11
14
|
export { createBulkTasksTool, updateBulkTasksTool, moveBulkTasksTool, deleteBulkTasksTool } from './bulk-operations.js';
|
|
15
|
+
// Re-export workspace task operation tools
|
|
16
|
+
export { getWorkspaceTasksTool } from './workspace-operations.js';
|
|
12
17
|
// Re-export attachment tool
|
|
13
18
|
export { attachTaskFileTool, handleAttachTaskFile } from './attachments.js';
|
|
14
19
|
// Re-export handlers
|
|
@@ -16,6 +21,8 @@ export {
|
|
|
16
21
|
// Single task operation handlers
|
|
17
22
|
createTaskHandler, getTaskHandler, getTasksHandler, updateTaskHandler, moveTaskHandler, duplicateTaskHandler, deleteTaskHandler, getTaskCommentsHandler, createTaskCommentHandler,
|
|
18
23
|
// Bulk task operation handlers
|
|
19
|
-
createBulkTasksHandler, updateBulkTasksHandler, moveBulkTasksHandler, deleteBulkTasksHandler
|
|
24
|
+
createBulkTasksHandler, updateBulkTasksHandler, moveBulkTasksHandler, deleteBulkTasksHandler,
|
|
25
|
+
// Team task operation handlers
|
|
26
|
+
getWorkspaceTasksHandler } from './handlers.js';
|
|
20
27
|
// Re-export utilities
|
|
21
28
|
export { formatTaskData, validateTaskIdentification, validateListIdentification, validateTaskUpdateData, validateBulkTasks, parseBulkOptions, resolveTaskIdWithValidation, resolveListIdWithValidation } from './utilities.js';
|
package/build/tools/task/main.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Task Tools
|
|
3
6
|
*
|
|
4
7
|
* This is the main task module that connects tool definitions to their handlers.
|
|
@@ -8,8 +11,12 @@ import { sponsorService } from '../../utils/sponsor-service.js';
|
|
|
8
11
|
// Import tool definitions
|
|
9
12
|
import { createTaskTool, getTaskTool, getTasksTool, updateTaskTool, moveTaskTool, duplicateTaskTool, deleteTaskTool, getTaskCommentsTool, createTaskCommentTool } from './single-operations.js';
|
|
10
13
|
import { createBulkTasksTool, updateBulkTasksTool, moveBulkTasksTool, deleteBulkTasksTool } from './bulk-operations.js';
|
|
14
|
+
import { getWorkspaceTasksTool } from './workspace-operations.js';
|
|
11
15
|
// Import handlers
|
|
12
|
-
import { createTaskHandler, getTaskHandler, getTasksHandler, updateTaskHandler, moveTaskHandler, duplicateTaskHandler, deleteTaskHandler, getTaskCommentsHandler, createTaskCommentHandler, createBulkTasksHandler, updateBulkTasksHandler, moveBulkTasksHandler, deleteBulkTasksHandler } from './handlers.js';
|
|
16
|
+
import { createTaskHandler, getTaskHandler, getTasksHandler, updateTaskHandler, moveTaskHandler, duplicateTaskHandler, deleteTaskHandler, getTaskCommentsHandler, createTaskCommentHandler, createBulkTasksHandler, updateBulkTasksHandler, moveBulkTasksHandler, deleteBulkTasksHandler, getWorkspaceTasksHandler } from './handlers.js';
|
|
17
|
+
// Import shared services
|
|
18
|
+
import { clickUpServices } from '../../services/shared.js';
|
|
19
|
+
const { task: taskService } = clickUpServices;
|
|
13
20
|
//=============================================================================
|
|
14
21
|
// HANDLER WRAPPER UTILITY
|
|
15
22
|
//=============================================================================
|
|
@@ -76,6 +83,13 @@ export const handleDeleteBulkTasks = createHandlerWrapper(deleteBulkTasksHandler
|
|
|
76
83
|
results
|
|
77
84
|
}));
|
|
78
85
|
//=============================================================================
|
|
86
|
+
// WORKSPACE TASK OPERATIONS - HANDLER IMPLEMENTATIONS
|
|
87
|
+
//=============================================================================
|
|
88
|
+
export const handleGetWorkspaceTasks = createHandlerWrapper(
|
|
89
|
+
// This adapts the new handler signature to match what createHandlerWrapper expects
|
|
90
|
+
(params) => getWorkspaceTasksHandler(taskService, params), (response) => response // Pass through the response as is
|
|
91
|
+
);
|
|
92
|
+
//=============================================================================
|
|
79
93
|
// TOOL DEFINITIONS AND HANDLERS EXPORT
|
|
80
94
|
//=============================================================================
|
|
81
95
|
// Tool definitions with their handler mappings
|
|
@@ -94,5 +108,7 @@ export const taskTools = [
|
|
|
94
108
|
{ definition: createBulkTasksTool, handler: handleCreateBulkTasks },
|
|
95
109
|
{ definition: updateBulkTasksTool, handler: handleUpdateBulkTasks },
|
|
96
110
|
{ definition: moveBulkTasksTool, handler: handleMoveBulkTasks },
|
|
97
|
-
{ definition: deleteBulkTasksTool, handler: handleDeleteBulkTasks }
|
|
111
|
+
{ definition: deleteBulkTasksTool, handler: handleDeleteBulkTasks },
|
|
112
|
+
// Team task operations
|
|
113
|
+
{ definition: getWorkspaceTasksTool, handler: handleGetWorkspaceTasks }
|
|
98
114
|
];
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Single Task Operations
|
|
3
6
|
*
|
|
4
7
|
* This module defines tools for single task operations including creating,
|
|
@@ -57,7 +60,8 @@ Requirements:
|
|
|
57
60
|
|
|
58
61
|
Notes:
|
|
59
62
|
- For multiple tasks, use create_bulk_tasks instead
|
|
60
|
-
- Reuse list IDs from previous responses when possible to avoid redundant lookups
|
|
63
|
+
- Reuse list IDs from previous responses when possible to avoid redundant lookups
|
|
64
|
+
- To create a subtask, set the parent parameter to the ID of the parent task`,
|
|
61
65
|
inputSchema: {
|
|
62
66
|
type: "object",
|
|
63
67
|
properties: {
|
|
@@ -92,6 +96,17 @@ Notes:
|
|
|
92
96
|
dueDate: {
|
|
93
97
|
type: "string",
|
|
94
98
|
description: "Optional due date. Supports Unix timestamps (ms) or natural language like '1 hour from now', 'tomorrow', 'next week', etc."
|
|
99
|
+
},
|
|
100
|
+
parent: {
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Optional ID of the parent task. When specified, this task will be created as a subtask of the specified parent task."
|
|
103
|
+
},
|
|
104
|
+
tags: {
|
|
105
|
+
type: "array",
|
|
106
|
+
items: {
|
|
107
|
+
type: "string"
|
|
108
|
+
},
|
|
109
|
+
description: "Optional array of tag names to assign to the task. The tags must already exist in the space."
|
|
95
110
|
}
|
|
96
111
|
}
|
|
97
112
|
}
|
|
@@ -269,7 +284,8 @@ Requirements:
|
|
|
269
284
|
Note:
|
|
270
285
|
- Task names are only unique within a list, so the system needs to know which list to search in
|
|
271
286
|
- Regular task IDs are always 9 characters long (e.g., "86b394eqa")
|
|
272
|
-
- Custom IDs have an uppercase prefix followed by a hyphen and number (e.g., "DEV-1234")
|
|
287
|
+
- Custom IDs have an uppercase prefix followed by a hyphen and number (e.g., "DEV-1234")
|
|
288
|
+
- Set subtasks=true to include all subtasks in the response`,
|
|
273
289
|
inputSchema: {
|
|
274
290
|
type: "object",
|
|
275
291
|
properties: {
|
|
@@ -288,6 +304,10 @@ Note:
|
|
|
288
304
|
customTaskId: {
|
|
289
305
|
type: "string",
|
|
290
306
|
description: "Custom task ID (e.g., 'DEV-1234'). Only use this if you want to explicitly force custom ID lookup. In most cases, you can just use taskId which auto-detects ID format."
|
|
307
|
+
},
|
|
308
|
+
subtasks: {
|
|
309
|
+
type: "boolean",
|
|
310
|
+
description: "Whether to include subtasks in the response. Set to true to retrieve full details of all subtasks."
|
|
291
311
|
}
|
|
292
312
|
},
|
|
293
313
|
required: []
|
|
@@ -322,6 +342,15 @@ Notes:
|
|
|
322
342
|
type: "string",
|
|
323
343
|
description: "Name of list to get tasks from. Only use if you don't have listId."
|
|
324
344
|
},
|
|
345
|
+
subtasks: {
|
|
346
|
+
type: "boolean",
|
|
347
|
+
description: "Include subtasks"
|
|
348
|
+
},
|
|
349
|
+
statuses: {
|
|
350
|
+
type: "array",
|
|
351
|
+
items: { type: "string" },
|
|
352
|
+
description: "Filter by status names (e.g. ['To Do', 'In Progress'])"
|
|
353
|
+
},
|
|
325
354
|
archived: {
|
|
326
355
|
type: "boolean",
|
|
327
356
|
description: "Include archived tasks"
|
|
@@ -337,55 +366,11 @@ Notes:
|
|
|
337
366
|
reverse: {
|
|
338
367
|
type: "boolean",
|
|
339
368
|
description: "Reverse sort order (descending)"
|
|
340
|
-
},
|
|
341
|
-
subtasks: {
|
|
342
|
-
type: "boolean",
|
|
343
|
-
description: "Include subtasks"
|
|
344
|
-
},
|
|
345
|
-
statuses: {
|
|
346
|
-
type: "array",
|
|
347
|
-
items: {
|
|
348
|
-
type: "string"
|
|
349
|
-
},
|
|
350
|
-
description: "Filter by status names (e.g. ['To Do', 'In Progress'])"
|
|
351
369
|
}
|
|
352
370
|
},
|
|
353
371
|
required: []
|
|
354
372
|
}
|
|
355
373
|
};
|
|
356
|
-
/**
|
|
357
|
-
* Tool definition for deleting a task
|
|
358
|
-
*/
|
|
359
|
-
export const deleteTaskTool = {
|
|
360
|
-
name: "delete_task",
|
|
361
|
-
description: `Purpose: PERMANENTLY DELETE a task.
|
|
362
|
-
|
|
363
|
-
Valid Usage:
|
|
364
|
-
1. Use taskId alone (preferred and safest)
|
|
365
|
-
2. Use taskName + optional listName
|
|
366
|
-
|
|
367
|
-
Warning:
|
|
368
|
-
- This action CANNOT be undone
|
|
369
|
-
- Using taskName is risky as names may not be unique
|
|
370
|
-
- Provide listName when using taskName for more precise targeting`,
|
|
371
|
-
inputSchema: {
|
|
372
|
-
type: "object",
|
|
373
|
-
properties: {
|
|
374
|
-
taskId: {
|
|
375
|
-
type: "string",
|
|
376
|
-
description: "ID of task to delete (preferred). Works with both regular task IDs (9 characters) and custom IDs with uppercase prefixes (like 'DEV-1234')."
|
|
377
|
-
},
|
|
378
|
-
taskName: {
|
|
379
|
-
type: "string",
|
|
380
|
-
description: "Name of task to delete. Use with extreme caution as names may not be unique."
|
|
381
|
-
},
|
|
382
|
-
listName: {
|
|
383
|
-
type: "string",
|
|
384
|
-
description: "Name of list containing the task. Helps ensure correct task deletion when using taskName."
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
374
|
/**
|
|
390
375
|
* Tool definition for retrieving task comments
|
|
391
376
|
*/
|
|
@@ -477,3 +462,36 @@ Notes:
|
|
|
477
462
|
required: ["commentText"]
|
|
478
463
|
}
|
|
479
464
|
};
|
|
465
|
+
/**
|
|
466
|
+
* Tool definition for deleting a task
|
|
467
|
+
*/
|
|
468
|
+
export const deleteTaskTool = {
|
|
469
|
+
name: "delete_task",
|
|
470
|
+
description: `Purpose: PERMANENTLY DELETE a task.
|
|
471
|
+
|
|
472
|
+
Valid Usage:
|
|
473
|
+
1. Use taskId alone (preferred and safest)
|
|
474
|
+
2. Use taskName + optional listName
|
|
475
|
+
|
|
476
|
+
Warning:
|
|
477
|
+
- This action CANNOT be undone
|
|
478
|
+
- Using taskName is risky as names may not be unique
|
|
479
|
+
- Provide listName when using taskName for more precise targeting`,
|
|
480
|
+
inputSchema: {
|
|
481
|
+
type: "object",
|
|
482
|
+
properties: {
|
|
483
|
+
taskId: {
|
|
484
|
+
type: "string",
|
|
485
|
+
description: "ID of task to delete (preferred). Works with both regular task IDs (9 characters) and custom IDs with uppercase prefixes (like 'DEV-1234')."
|
|
486
|
+
},
|
|
487
|
+
taskName: {
|
|
488
|
+
type: "string",
|
|
489
|
+
description: "Name of task to delete. Use with extreme caution as names may not be unique."
|
|
490
|
+
},
|
|
491
|
+
listName: {
|
|
492
|
+
type: "string",
|
|
493
|
+
description: "Name of list containing the task. Helps ensure correct task deletion when using taskName."
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
2
5
|
* ClickUp MCP Task Utilities
|
|
3
6
|
*
|
|
4
7
|
* This module provides utility functions for task-related operations including
|
|
@@ -17,13 +20,47 @@ const { workspace: workspaceService } = clickUpServices;
|
|
|
17
20
|
export function formatTaskData(task, additional = {}) {
|
|
18
21
|
return {
|
|
19
22
|
id: task.id,
|
|
23
|
+
custom_id: task.custom_id,
|
|
20
24
|
name: task.name,
|
|
25
|
+
text_content: task.text_content,
|
|
26
|
+
description: task.description,
|
|
21
27
|
url: task.url,
|
|
22
28
|
status: task.status?.status || "Unknown",
|
|
29
|
+
status_color: task.status?.color,
|
|
30
|
+
orderindex: task.orderindex,
|
|
31
|
+
date_created: task.date_created,
|
|
32
|
+
date_updated: task.date_updated,
|
|
33
|
+
date_closed: task.date_closed,
|
|
34
|
+
creator: task.creator,
|
|
35
|
+
assignees: task.assignees,
|
|
36
|
+
watchers: task.watchers,
|
|
37
|
+
checklists: task.checklists,
|
|
38
|
+
tags: task.tags,
|
|
39
|
+
parent: task.parent,
|
|
40
|
+
priority: task.priority,
|
|
23
41
|
due_date: task.due_date ? formatDueDate(Number(task.due_date)) : undefined,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
42
|
+
start_date: task.start_date,
|
|
43
|
+
time_estimate: task.time_estimate,
|
|
44
|
+
time_spent: task.time_spent,
|
|
45
|
+
custom_fields: task.custom_fields,
|
|
46
|
+
dependencies: task.dependencies,
|
|
47
|
+
linked_tasks: task.linked_tasks,
|
|
48
|
+
team_id: task.team_id,
|
|
49
|
+
list: {
|
|
50
|
+
id: task.list.id,
|
|
51
|
+
name: task.list.name,
|
|
52
|
+
access: task.list.access
|
|
53
|
+
},
|
|
54
|
+
folder: task.folder ? {
|
|
55
|
+
id: task.folder.id,
|
|
56
|
+
name: task.folder.name,
|
|
57
|
+
hidden: task.folder.hidden,
|
|
58
|
+
access: task.folder.access
|
|
59
|
+
} : null,
|
|
60
|
+
space: {
|
|
61
|
+
id: task.space.id,
|
|
62
|
+
name: task.space.name
|
|
63
|
+
},
|
|
27
64
|
...additional
|
|
28
65
|
};
|
|
29
66
|
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
5
|
+
* ClickUp MCP Workspace Task Operations
|
|
6
|
+
*
|
|
7
|
+
* This module defines tools for workspace-wide task operations, including
|
|
8
|
+
* filtering tasks across the entire workspace with tag-based filtering.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tool definition for getting workspace tasks
|
|
12
|
+
*/
|
|
13
|
+
export const getWorkspaceTasksTool = {
|
|
14
|
+
name: "get_workspace_tasks",
|
|
15
|
+
description: `Purpose: Retrieve tasks from across the entire workspace with powerful filtering options, including tag-based filtering.
|
|
16
|
+
|
|
17
|
+
Valid Usage:
|
|
18
|
+
1. Apply any combination of filters (tags, lists, folders, spaces, statuses, etc.)
|
|
19
|
+
2. Use pagination to manage large result sets
|
|
20
|
+
|
|
21
|
+
Requirements:
|
|
22
|
+
- At least one filter parameter is REQUIRED (tags, list_ids, folder_ids, space_ids, statuses, assignees, or date filters)
|
|
23
|
+
- Pagination parameters (page, order_by, reverse) alone are not considered filters
|
|
24
|
+
|
|
25
|
+
Notes:
|
|
26
|
+
- Provides workspace-wide task access (unlike get_tasks which only searches in one list)
|
|
27
|
+
- Returns complete task details including descriptions, assignees, custom fields, and all metadata
|
|
28
|
+
- Tag filtering is especially useful for cross-list organization (e.g., "project-x", "blocker", "needs-review")
|
|
29
|
+
- Combine multiple filters to narrow down your search scope
|
|
30
|
+
- Use pagination for large result sets
|
|
31
|
+
- Use the detail_level parameter to control the amount of data returned:
|
|
32
|
+
- "summary": Returns lightweight task data (name, status, list, tags)
|
|
33
|
+
- "detailed": Returns complete task data with all fields (DEFAULT if not specified)
|
|
34
|
+
- Responses exceeding 50,000 tokens automatically switch to summary format to avoid hitting LLM token limits
|
|
35
|
+
`,
|
|
36
|
+
parameters: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
tags: {
|
|
40
|
+
type: 'array',
|
|
41
|
+
items: { type: 'string' },
|
|
42
|
+
description: 'Filter tasks by tag names. Only tasks with ALL specified tags will be returned.'
|
|
43
|
+
},
|
|
44
|
+
list_ids: {
|
|
45
|
+
type: 'array',
|
|
46
|
+
items: { type: 'string' },
|
|
47
|
+
description: 'Filter tasks by list IDs. Narrows the search to specific lists.'
|
|
48
|
+
},
|
|
49
|
+
folder_ids: {
|
|
50
|
+
type: 'array',
|
|
51
|
+
items: { type: 'string' },
|
|
52
|
+
description: 'Filter tasks by folder IDs. Narrows the search to specific folders.'
|
|
53
|
+
},
|
|
54
|
+
space_ids: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
items: { type: 'string' },
|
|
57
|
+
description: 'Filter tasks by space IDs. Narrows the search to specific spaces.'
|
|
58
|
+
},
|
|
59
|
+
statuses: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
items: { type: 'string' },
|
|
62
|
+
description: 'Filter tasks by status names (e.g., [\'To Do\', \'In Progress\']).'
|
|
63
|
+
},
|
|
64
|
+
assignees: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: { type: 'string' },
|
|
67
|
+
description: 'Filter tasks by assignee IDs.'
|
|
68
|
+
},
|
|
69
|
+
date_created_gt: {
|
|
70
|
+
type: 'number',
|
|
71
|
+
description: 'Filter for tasks created after this timestamp.'
|
|
72
|
+
},
|
|
73
|
+
date_created_lt: {
|
|
74
|
+
type: 'number',
|
|
75
|
+
description: 'Filter for tasks created before this timestamp.'
|
|
76
|
+
},
|
|
77
|
+
date_updated_gt: {
|
|
78
|
+
type: 'number',
|
|
79
|
+
description: 'Filter for tasks updated after this timestamp.'
|
|
80
|
+
},
|
|
81
|
+
date_updated_lt: {
|
|
82
|
+
type: 'number',
|
|
83
|
+
description: 'Filter for tasks updated before this timestamp.'
|
|
84
|
+
},
|
|
85
|
+
due_date_gt: {
|
|
86
|
+
type: 'number',
|
|
87
|
+
description: 'Filter for tasks with due date greater than this timestamp.'
|
|
88
|
+
},
|
|
89
|
+
due_date_lt: {
|
|
90
|
+
type: 'number',
|
|
91
|
+
description: 'Filter for tasks with due date less than this timestamp.'
|
|
92
|
+
},
|
|
93
|
+
include_closed: {
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
description: 'Include closed tasks in the results.'
|
|
96
|
+
},
|
|
97
|
+
include_archived_lists: {
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
description: 'Include tasks from archived lists.'
|
|
100
|
+
},
|
|
101
|
+
include_closed_lists: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
description: 'Include tasks from closed lists.'
|
|
104
|
+
},
|
|
105
|
+
archived: {
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
description: 'Include archived tasks in the results.'
|
|
108
|
+
},
|
|
109
|
+
order_by: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
enum: ['id', 'created', 'updated', 'due_date'],
|
|
112
|
+
description: 'Sort field for ordering results.'
|
|
113
|
+
},
|
|
114
|
+
reverse: {
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
description: 'Reverse sort order (descending).'
|
|
117
|
+
},
|
|
118
|
+
page: {
|
|
119
|
+
type: 'number',
|
|
120
|
+
description: 'Page number for pagination (0-based).'
|
|
121
|
+
},
|
|
122
|
+
detail_level: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
enum: ['summary', 'detailed'],
|
|
125
|
+
description: 'Level of detail to return. Use summary for lightweight responses or detailed for full task data. If not specified, defaults to "detailed".'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
inputSchema: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
properties: {
|
|
132
|
+
tags: {
|
|
133
|
+
type: 'array',
|
|
134
|
+
items: { type: 'string' },
|
|
135
|
+
description: 'Filter tasks by tag names. Only tasks with ALL specified tags will be returned.'
|
|
136
|
+
},
|
|
137
|
+
list_ids: {
|
|
138
|
+
type: 'array',
|
|
139
|
+
items: { type: 'string' },
|
|
140
|
+
description: 'Filter tasks by list IDs. Narrows the search to specific lists.'
|
|
141
|
+
},
|
|
142
|
+
folder_ids: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
items: { type: 'string' },
|
|
145
|
+
description: 'Filter tasks by folder IDs. Narrows the search to specific folders.'
|
|
146
|
+
},
|
|
147
|
+
space_ids: {
|
|
148
|
+
type: 'array',
|
|
149
|
+
items: { type: 'string' },
|
|
150
|
+
description: 'Filter tasks by space IDs. Narrows the search to specific spaces.'
|
|
151
|
+
},
|
|
152
|
+
statuses: {
|
|
153
|
+
type: 'array',
|
|
154
|
+
items: { type: 'string' },
|
|
155
|
+
description: 'Filter tasks by status names (e.g., [\'To Do\', \'In Progress\']).'
|
|
156
|
+
},
|
|
157
|
+
assignees: {
|
|
158
|
+
type: 'array',
|
|
159
|
+
items: { type: 'string' },
|
|
160
|
+
description: 'Filter tasks by assignee IDs.'
|
|
161
|
+
},
|
|
162
|
+
date_created_gt: {
|
|
163
|
+
type: 'number',
|
|
164
|
+
description: 'Filter for tasks created after this timestamp.'
|
|
165
|
+
},
|
|
166
|
+
date_created_lt: {
|
|
167
|
+
type: 'number',
|
|
168
|
+
description: 'Filter for tasks created before this timestamp.'
|
|
169
|
+
},
|
|
170
|
+
date_updated_gt: {
|
|
171
|
+
type: 'number',
|
|
172
|
+
description: 'Filter for tasks updated after this timestamp.'
|
|
173
|
+
},
|
|
174
|
+
date_updated_lt: {
|
|
175
|
+
type: 'number',
|
|
176
|
+
description: 'Filter for tasks updated before this timestamp.'
|
|
177
|
+
},
|
|
178
|
+
due_date_gt: {
|
|
179
|
+
type: 'number',
|
|
180
|
+
description: 'Filter for tasks with due date greater than this timestamp.'
|
|
181
|
+
},
|
|
182
|
+
due_date_lt: {
|
|
183
|
+
type: 'number',
|
|
184
|
+
description: 'Filter for tasks with due date less than this timestamp.'
|
|
185
|
+
},
|
|
186
|
+
include_closed: {
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
description: 'Include closed tasks in the results.'
|
|
189
|
+
},
|
|
190
|
+
include_archived_lists: {
|
|
191
|
+
type: 'boolean',
|
|
192
|
+
description: 'Include tasks from archived lists.'
|
|
193
|
+
},
|
|
194
|
+
include_closed_lists: {
|
|
195
|
+
type: 'boolean',
|
|
196
|
+
description: 'Include tasks from closed lists.'
|
|
197
|
+
},
|
|
198
|
+
archived: {
|
|
199
|
+
type: 'boolean',
|
|
200
|
+
description: 'Include archived tasks in the results.'
|
|
201
|
+
},
|
|
202
|
+
order_by: {
|
|
203
|
+
type: 'string',
|
|
204
|
+
enum: ['id', 'created', 'updated', 'due_date'],
|
|
205
|
+
description: 'Sort field for ordering results.'
|
|
206
|
+
},
|
|
207
|
+
reverse: {
|
|
208
|
+
type: 'boolean',
|
|
209
|
+
description: 'Reverse sort order (descending).'
|
|
210
|
+
},
|
|
211
|
+
page: {
|
|
212
|
+
type: 'number',
|
|
213
|
+
description: 'Page number for pagination (0-based).'
|
|
214
|
+
},
|
|
215
|
+
detail_level: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
enum: ['summary', 'detailed'],
|
|
218
|
+
description: 'Level of detail to return. Use summary for lightweight responses or detailed for full task data. If not specified, defaults to "detailed".'
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|