@alanse/clickup-multi-mcp-server 1.0.0
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/Dockerfile +38 -0
- package/LICENSE +21 -0
- package/README.md +470 -0
- package/build/config.js +237 -0
- package/build/index.js +87 -0
- package/build/logger.js +163 -0
- package/build/middleware/security.js +231 -0
- package/build/server.js +288 -0
- package/build/services/clickup/base.js +432 -0
- package/build/services/clickup/bulk.js +180 -0
- package/build/services/clickup/document.js +159 -0
- package/build/services/clickup/folder.js +136 -0
- package/build/services/clickup/index.js +76 -0
- package/build/services/clickup/list.js +191 -0
- package/build/services/clickup/tag.js +239 -0
- package/build/services/clickup/task/index.js +32 -0
- package/build/services/clickup/task/task-attachments.js +105 -0
- package/build/services/clickup/task/task-comments.js +114 -0
- package/build/services/clickup/task/task-core.js +604 -0
- package/build/services/clickup/task/task-custom-fields.js +107 -0
- package/build/services/clickup/task/task-search.js +986 -0
- package/build/services/clickup/task/task-service.js +104 -0
- package/build/services/clickup/task/task-tags.js +113 -0
- package/build/services/clickup/time.js +244 -0
- package/build/services/clickup/types.js +33 -0
- package/build/services/clickup/workspace.js +397 -0
- package/build/services/shared.js +61 -0
- package/build/sse_server.js +277 -0
- package/build/tools/documents.js +489 -0
- package/build/tools/folder.js +331 -0
- package/build/tools/index.js +16 -0
- package/build/tools/list.js +428 -0
- package/build/tools/member.js +106 -0
- package/build/tools/tag.js +833 -0
- package/build/tools/task/attachments.js +357 -0
- package/build/tools/task/attachments.types.js +9 -0
- package/build/tools/task/bulk-operations.js +338 -0
- package/build/tools/task/handlers.js +919 -0
- package/build/tools/task/index.js +30 -0
- package/build/tools/task/main.js +233 -0
- package/build/tools/task/single-operations.js +469 -0
- package/build/tools/task/time-tracking.js +575 -0
- package/build/tools/task/utilities.js +310 -0
- package/build/tools/task/workspace-operations.js +258 -0
- package/build/tools/tool-enhancer.js +37 -0
- package/build/tools/utils.js +12 -0
- package/build/tools/workspace-helper.js +44 -0
- package/build/tools/workspace.js +73 -0
- package/build/utils/color-processor.js +183 -0
- package/build/utils/concurrency-utils.js +248 -0
- package/build/utils/date-utils.js +542 -0
- package/build/utils/resolver-utils.js +135 -0
- package/build/utils/sponsor-service.js +93 -0
- package/build/utils/token-utils.js +49 -0
- package/package.json +77 -0
- package/smithery.yaml +23 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2025 Talib Kareem <taazkareem@icloud.com>
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*
|
|
5
|
+
* ClickUp MCP Bulk Task Operations
|
|
6
|
+
*
|
|
7
|
+
* This module defines tools for bulk task operations including creating,
|
|
8
|
+
* updating, moving, and deleting multiple tasks at once.
|
|
9
|
+
*/
|
|
10
|
+
import { clickUpServices } from '../../services/shared.js';
|
|
11
|
+
import { BulkService } from '../../services/clickup/bulk.js';
|
|
12
|
+
// Initialize services
|
|
13
|
+
const { task: taskService } = clickUpServices;
|
|
14
|
+
const bulkService = new BulkService(taskService);
|
|
15
|
+
//=============================================================================
|
|
16
|
+
// COMMON SCHEMA DEFINITIONS
|
|
17
|
+
//=============================================================================
|
|
18
|
+
// Common schema definitions
|
|
19
|
+
const bulkOptionsSchema = {
|
|
20
|
+
oneOf: [
|
|
21
|
+
{
|
|
22
|
+
type: "object",
|
|
23
|
+
description: "Optional processing settings",
|
|
24
|
+
properties: {
|
|
25
|
+
batchSize: {
|
|
26
|
+
type: "number",
|
|
27
|
+
description: "Tasks per batch (default: 10)"
|
|
28
|
+
},
|
|
29
|
+
concurrency: {
|
|
30
|
+
type: "number",
|
|
31
|
+
description: "Parallel operations (default: 3)"
|
|
32
|
+
},
|
|
33
|
+
continueOnError: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Continue if some tasks fail"
|
|
36
|
+
},
|
|
37
|
+
retryCount: {
|
|
38
|
+
type: "number",
|
|
39
|
+
description: "Retry attempts for failures"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "string",
|
|
45
|
+
description: "JSON string representing options. Will be parsed automatically."
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
description: "Processing options (or JSON string representing options)"
|
|
49
|
+
};
|
|
50
|
+
const taskIdentifierSchema = {
|
|
51
|
+
taskId: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Task ID (preferred). Automatically detects and handles both regular task IDs (9 characters) and custom IDs (like 'DEV-1234', 'PROJ-456')."
|
|
54
|
+
},
|
|
55
|
+
taskName: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Task name. Requires listName when used."
|
|
58
|
+
},
|
|
59
|
+
listName: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "REQUIRED with taskName: List containing the task."
|
|
62
|
+
},
|
|
63
|
+
customTaskId: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Custom task ID (e.g., 'DEV-1234'). This parameter is now optional since taskId automatically handles custom IDs. Use only for explicit custom ID lookup or backward compatibility."
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//=============================================================================
|
|
69
|
+
// BULK TASK OPERATION TOOLS
|
|
70
|
+
//=============================================================================
|
|
71
|
+
/**
|
|
72
|
+
* Tool definition for creating multiple tasks at once
|
|
73
|
+
*/
|
|
74
|
+
export const createBulkTasksTool = {
|
|
75
|
+
name: "create_bulk_tasks",
|
|
76
|
+
description: `Creates multiple tasks in one list. Use listId (preferred) or listName + array of tasks (each needs name). Configure batch size/concurrency via options. Tasks can have custom fields as {id, value} array and assignees as array of user IDs, emails, or usernames.`,
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
tasks: {
|
|
81
|
+
type: "array",
|
|
82
|
+
description: "Array of tasks to create. Each task must have at least a name.",
|
|
83
|
+
items: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
name: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Task name with emoji prefix"
|
|
89
|
+
},
|
|
90
|
+
description: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Plain text description"
|
|
93
|
+
},
|
|
94
|
+
markdown_description: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "Markdown description (overrides plain text)"
|
|
97
|
+
},
|
|
98
|
+
status: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Task status (uses list default if omitted)"
|
|
101
|
+
},
|
|
102
|
+
priority: {
|
|
103
|
+
type: "number",
|
|
104
|
+
description: "Priority 1-4 (1=urgent, 4=low)"
|
|
105
|
+
},
|
|
106
|
+
dueDate: {
|
|
107
|
+
type: "string",
|
|
108
|
+
description: "Due date. Supports Unix timestamps (in milliseconds) and natural language expressions like '1 hour from now', 'tomorrow', 'next week', etc."
|
|
109
|
+
},
|
|
110
|
+
tags: {
|
|
111
|
+
type: "array",
|
|
112
|
+
items: {
|
|
113
|
+
type: "string"
|
|
114
|
+
},
|
|
115
|
+
description: "Optional array of tag names to assign to the task. The tags must already exist in the space."
|
|
116
|
+
},
|
|
117
|
+
custom_fields: {
|
|
118
|
+
type: "array",
|
|
119
|
+
items: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
id: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "ID of the custom field"
|
|
125
|
+
},
|
|
126
|
+
value: {
|
|
127
|
+
description: "Value for the custom field. Type depends on the field type."
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
required: ["id", "value"]
|
|
131
|
+
},
|
|
132
|
+
description: "Optional array of custom field values to set on the task."
|
|
133
|
+
},
|
|
134
|
+
assignees: {
|
|
135
|
+
type: "array",
|
|
136
|
+
items: {
|
|
137
|
+
oneOf: [
|
|
138
|
+
{ type: "number" },
|
|
139
|
+
{ type: "string" }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
description: "Optional array of assignee user IDs (numbers), emails, or usernames to assign to the task."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
required: ["name"]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
listId: {
|
|
149
|
+
type: "string",
|
|
150
|
+
description: "ID of list for new tasks (preferred). Use this instead of listName if you have it."
|
|
151
|
+
},
|
|
152
|
+
listName: {
|
|
153
|
+
type: "string",
|
|
154
|
+
description: "Name of list for new tasks. Only use if you don't have listId."
|
|
155
|
+
},
|
|
156
|
+
options: bulkOptionsSchema
|
|
157
|
+
},
|
|
158
|
+
required: ["tasks"]
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Tool definition for updating multiple tasks
|
|
163
|
+
*/
|
|
164
|
+
export const updateBulkTasksTool = {
|
|
165
|
+
name: "update_bulk_tasks",
|
|
166
|
+
description: `Updates multiple tasks efficiently. For each task: use taskId (preferred) or taskName + listName. At least one update field per task. Supports assignees as array of user IDs, emails, or usernames. Configure batch size/concurrency via options. WARNING: taskName without listName will fail.`,
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
tasks: {
|
|
171
|
+
type: "array",
|
|
172
|
+
description: "Array of tasks to update",
|
|
173
|
+
items: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
taskId: {
|
|
177
|
+
type: "string",
|
|
178
|
+
description: "Task ID (preferred). Automatically detects and handles both regular task IDs (9 characters) and custom IDs (like 'DEV-1234', 'PROJ-456')."
|
|
179
|
+
},
|
|
180
|
+
taskName: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Task name. Requires listName when used."
|
|
183
|
+
},
|
|
184
|
+
listName: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "REQUIRED with taskName: List containing the task."
|
|
187
|
+
},
|
|
188
|
+
customTaskId: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Custom task ID (e.g., 'DEV-1234'). Only use if you want to explicitly force custom ID lookup. In most cases, use taskId which auto-detects ID format."
|
|
191
|
+
},
|
|
192
|
+
name: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "New name with emoji prefix"
|
|
195
|
+
},
|
|
196
|
+
description: {
|
|
197
|
+
type: "string",
|
|
198
|
+
description: "New plain text description"
|
|
199
|
+
},
|
|
200
|
+
markdown_description: {
|
|
201
|
+
type: "string",
|
|
202
|
+
description: "New markdown description"
|
|
203
|
+
},
|
|
204
|
+
status: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "New status"
|
|
207
|
+
},
|
|
208
|
+
priority: {
|
|
209
|
+
type: "string",
|
|
210
|
+
nullable: true,
|
|
211
|
+
enum: ["1", "2", "3", "4", null],
|
|
212
|
+
description: "New priority (1-4 or null)"
|
|
213
|
+
},
|
|
214
|
+
dueDate: {
|
|
215
|
+
type: "string",
|
|
216
|
+
description: "New due date. Supports Unix timestamps (in milliseconds) and natural language expressions like '1 hour from now', 'tomorrow', etc."
|
|
217
|
+
},
|
|
218
|
+
custom_fields: {
|
|
219
|
+
type: "array",
|
|
220
|
+
items: {
|
|
221
|
+
type: "object",
|
|
222
|
+
properties: {
|
|
223
|
+
id: {
|
|
224
|
+
type: "string",
|
|
225
|
+
description: "ID of the custom field"
|
|
226
|
+
},
|
|
227
|
+
value: {
|
|
228
|
+
description: "Value for the custom field. Type depends on the field type."
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
required: ["id", "value"]
|
|
232
|
+
},
|
|
233
|
+
description: "Optional array of custom field values to set on the task."
|
|
234
|
+
},
|
|
235
|
+
assignees: {
|
|
236
|
+
type: "array",
|
|
237
|
+
items: {
|
|
238
|
+
oneOf: [
|
|
239
|
+
{ type: "number" },
|
|
240
|
+
{ type: "string" }
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
description: "Optional array of assignee user IDs (numbers), emails, or usernames to assign to the task."
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
options: bulkOptionsSchema
|
|
249
|
+
},
|
|
250
|
+
required: ["tasks"]
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Tool definition for moving multiple tasks
|
|
255
|
+
*/
|
|
256
|
+
export const moveBulkTasksTool = {
|
|
257
|
+
name: "move_bulk_tasks",
|
|
258
|
+
description: `Moves multiple tasks to one list. For each task: use taskId (preferred) or taskName + listName. Target list: use targetListId/Name. Configure batch size/concurrency via options. WARNING: Task statuses may reset, taskName needs listName.`,
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: "object",
|
|
261
|
+
properties: {
|
|
262
|
+
tasks: {
|
|
263
|
+
type: "array",
|
|
264
|
+
description: "Array of tasks to move",
|
|
265
|
+
items: {
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
taskId: {
|
|
269
|
+
type: "string",
|
|
270
|
+
description: "Task ID (preferred). Automatically detects and handles both regular task IDs (9 characters) and custom IDs (like 'DEV-1234', 'PROJ-456')."
|
|
271
|
+
},
|
|
272
|
+
taskName: {
|
|
273
|
+
type: "string",
|
|
274
|
+
description: "Task name. Requires listName when used."
|
|
275
|
+
},
|
|
276
|
+
listName: {
|
|
277
|
+
type: "string",
|
|
278
|
+
description: "REQUIRED with taskName: List containing the task."
|
|
279
|
+
},
|
|
280
|
+
customTaskId: {
|
|
281
|
+
type: "string",
|
|
282
|
+
description: "Custom task ID (e.g., 'DEV-1234'). Only use if you want to explicitly force custom ID lookup. In most cases, use taskId which auto-detects ID format."
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
targetListId: {
|
|
288
|
+
type: "string",
|
|
289
|
+
description: "ID of destination list (preferred). Use instead of targetListName if available."
|
|
290
|
+
},
|
|
291
|
+
targetListName: {
|
|
292
|
+
type: "string",
|
|
293
|
+
description: "Name of destination list. Only use if you don't have targetListId."
|
|
294
|
+
},
|
|
295
|
+
options: bulkOptionsSchema
|
|
296
|
+
},
|
|
297
|
+
required: ["tasks"]
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* Tool definition for deleting multiple tasks
|
|
302
|
+
*/
|
|
303
|
+
export const deleteBulkTasksTool = {
|
|
304
|
+
name: "delete_bulk_tasks",
|
|
305
|
+
description: `PERMANENTLY deletes multiple tasks. For each task: use taskId (preferred/safest) or taskName + listName. Configure batch size/concurrency via options. WARNING: Cannot be undone, taskName without listName is dangerous.`,
|
|
306
|
+
inputSchema: {
|
|
307
|
+
type: "object",
|
|
308
|
+
properties: {
|
|
309
|
+
tasks: {
|
|
310
|
+
type: "array",
|
|
311
|
+
description: "Array of tasks to delete",
|
|
312
|
+
items: {
|
|
313
|
+
type: "object",
|
|
314
|
+
properties: {
|
|
315
|
+
taskId: {
|
|
316
|
+
type: "string",
|
|
317
|
+
description: "Task ID (preferred). Automatically detects and handles both regular task IDs (9 characters) and custom IDs (like 'DEV-1234', 'PROJ-456')."
|
|
318
|
+
},
|
|
319
|
+
taskName: {
|
|
320
|
+
type: "string",
|
|
321
|
+
description: "Task name. Requires listName when used."
|
|
322
|
+
},
|
|
323
|
+
listName: {
|
|
324
|
+
type: "string",
|
|
325
|
+
description: "REQUIRED with taskName: List containing the task."
|
|
326
|
+
},
|
|
327
|
+
customTaskId: {
|
|
328
|
+
type: "string",
|
|
329
|
+
description: "Custom task ID (e.g., 'DEV-1234'). Only use if you want to explicitly force custom ID lookup. In most cases, use taskId which auto-detects ID format."
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
options: bulkOptionsSchema
|
|
335
|
+
},
|
|
336
|
+
required: ["tasks"]
|
|
337
|
+
}
|
|
338
|
+
};
|