@taazkareem/clickup-mcp-server 0.4.73 → 0.4.74
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/build/server.log +685 -31
- package/build/tools/folder.js +87 -58
- package/build/tools/list.js +123 -86
- package/build/tools/task/bulk-operations.js +64 -4
- package/build/tools/task/single-operations.js +98 -8
- package/build/tools/workspace.js +46 -32
- package/package.json +1 -1
|
@@ -45,7 +45,19 @@ const handleOperationError = (operation, error) => {
|
|
|
45
45
|
*/
|
|
46
46
|
export const createTaskTool = {
|
|
47
47
|
name: "create_task",
|
|
48
|
-
description:
|
|
48
|
+
description: `Purpose: Create a single task in a ClickUp list.
|
|
49
|
+
|
|
50
|
+
Valid Usage:
|
|
51
|
+
1. Provide listId (preferred if available)
|
|
52
|
+
2. Provide listName (system will look up the list ID)
|
|
53
|
+
|
|
54
|
+
Requirements:
|
|
55
|
+
- name: REQUIRED
|
|
56
|
+
- EITHER listId OR listName: REQUIRED
|
|
57
|
+
|
|
58
|
+
Notes:
|
|
59
|
+
- For multiple tasks, use create_bulk_tasks instead
|
|
60
|
+
- Reuse list IDs from previous responses when possible to avoid redundant lookups`,
|
|
49
61
|
inputSchema: {
|
|
50
62
|
type: "object",
|
|
51
63
|
properties: {
|
|
@@ -89,7 +101,19 @@ export const createTaskTool = {
|
|
|
89
101
|
*/
|
|
90
102
|
export const updateTaskTool = {
|
|
91
103
|
name: "update_task",
|
|
92
|
-
description:
|
|
104
|
+
description: `Purpose: Modify properties of an existing task.
|
|
105
|
+
|
|
106
|
+
Valid Usage:
|
|
107
|
+
1. Use taskId alone (preferred if available)
|
|
108
|
+
2. Use taskName + listName
|
|
109
|
+
|
|
110
|
+
Requirements:
|
|
111
|
+
- At least one update field (name, description, status, priority, dueDate) must be provided
|
|
112
|
+
- When using taskName, listName is REQUIRED
|
|
113
|
+
|
|
114
|
+
Notes:
|
|
115
|
+
- Only specified fields will be updated
|
|
116
|
+
- Using taskId is more reliable than taskName`,
|
|
93
117
|
inputSchema: {
|
|
94
118
|
type: "object",
|
|
95
119
|
properties: {
|
|
@@ -139,7 +163,19 @@ export const updateTaskTool = {
|
|
|
139
163
|
*/
|
|
140
164
|
export const moveTaskTool = {
|
|
141
165
|
name: "move_task",
|
|
142
|
-
description:
|
|
166
|
+
description: `Purpose: Move a task to a different list.
|
|
167
|
+
|
|
168
|
+
Valid Usage:
|
|
169
|
+
1. Use taskId + (listId OR listName) - preferred
|
|
170
|
+
2. Use taskName + sourceListName + (listId OR listName)
|
|
171
|
+
|
|
172
|
+
Requirements:
|
|
173
|
+
- Destination list: EITHER listId OR listName REQUIRED
|
|
174
|
+
- When using taskName, sourceListName is REQUIRED
|
|
175
|
+
|
|
176
|
+
Warning:
|
|
177
|
+
- Task statuses may reset if destination list has different status options
|
|
178
|
+
- System cannot find a task by name without knowing which list to search in`,
|
|
143
179
|
inputSchema: {
|
|
144
180
|
type: "object",
|
|
145
181
|
properties: {
|
|
@@ -172,7 +208,21 @@ export const moveTaskTool = {
|
|
|
172
208
|
*/
|
|
173
209
|
export const duplicateTaskTool = {
|
|
174
210
|
name: "duplicate_task",
|
|
175
|
-
description:
|
|
211
|
+
description: `Purpose: Create a copy of a task in the same or different list.
|
|
212
|
+
|
|
213
|
+
Valid Usage:
|
|
214
|
+
1. Use taskId + optional (listId OR listName) - preferred
|
|
215
|
+
2. Use taskName + sourceListName + optional (listId OR listName)
|
|
216
|
+
|
|
217
|
+
Requirements:
|
|
218
|
+
- When using taskName, sourceListName is REQUIRED
|
|
219
|
+
|
|
220
|
+
Notes:
|
|
221
|
+
- The duplicate preserves the original task's properties
|
|
222
|
+
- If no destination list specified, uses same list as original task
|
|
223
|
+
|
|
224
|
+
Warning:
|
|
225
|
+
- System cannot find a task by name without knowing which list to search in`,
|
|
176
226
|
inputSchema: {
|
|
177
227
|
type: "object",
|
|
178
228
|
properties: {
|
|
@@ -205,7 +255,17 @@ export const duplicateTaskTool = {
|
|
|
205
255
|
*/
|
|
206
256
|
export const getTaskTool = {
|
|
207
257
|
name: "get_task",
|
|
208
|
-
description:
|
|
258
|
+
description: `Purpose: Retrieve detailed information about a specific task.
|
|
259
|
+
|
|
260
|
+
Valid Usage:
|
|
261
|
+
1. Use taskId alone (preferred)
|
|
262
|
+
2. Use taskName + listName
|
|
263
|
+
|
|
264
|
+
Requirements:
|
|
265
|
+
- When using taskName, listName is REQUIRED
|
|
266
|
+
|
|
267
|
+
Note:
|
|
268
|
+
- Task names are only unique within a list, so the system needs to know which list to search in`,
|
|
209
269
|
inputSchema: {
|
|
210
270
|
type: "object",
|
|
211
271
|
properties: {
|
|
@@ -230,7 +290,19 @@ export const getTaskTool = {
|
|
|
230
290
|
*/
|
|
231
291
|
export const getTasksTool = {
|
|
232
292
|
name: "get_tasks",
|
|
233
|
-
description:
|
|
293
|
+
description: `Purpose: Retrieve tasks from a list with optional filtering.
|
|
294
|
+
|
|
295
|
+
Valid Usage:
|
|
296
|
+
1. Use listId (preferred)
|
|
297
|
+
2. Use listName
|
|
298
|
+
|
|
299
|
+
Requirements:
|
|
300
|
+
- EITHER listId OR listName is REQUIRED
|
|
301
|
+
|
|
302
|
+
Notes:
|
|
303
|
+
- Use filters (archived, statuses, etc.) to narrow down results
|
|
304
|
+
- Pagination available through page parameter
|
|
305
|
+
- Sorting available through order_by and reverse parameters`,
|
|
234
306
|
inputSchema: {
|
|
235
307
|
type: "object",
|
|
236
308
|
properties: {
|
|
@@ -278,7 +350,16 @@ export const getTasksTool = {
|
|
|
278
350
|
*/
|
|
279
351
|
export const deleteTaskTool = {
|
|
280
352
|
name: "delete_task",
|
|
281
|
-
description:
|
|
353
|
+
description: `Purpose: PERMANENTLY DELETE a task.
|
|
354
|
+
|
|
355
|
+
Valid Usage:
|
|
356
|
+
1. Use taskId alone (preferred and safest)
|
|
357
|
+
2. Use taskName + optional listName
|
|
358
|
+
|
|
359
|
+
Warning:
|
|
360
|
+
- This action CANNOT be undone
|
|
361
|
+
- Using taskName is risky as names may not be unique
|
|
362
|
+
- Provide listName when using taskName for more precise targeting`,
|
|
282
363
|
inputSchema: {
|
|
283
364
|
type: "object",
|
|
284
365
|
properties: {
|
|
@@ -302,7 +383,16 @@ export const deleteTaskTool = {
|
|
|
302
383
|
*/
|
|
303
384
|
export const getTaskCommentsTool = {
|
|
304
385
|
name: "get_task_comments",
|
|
305
|
-
description:
|
|
386
|
+
description: `Purpose: Retrieve comments for a ClickUp task.
|
|
387
|
+
|
|
388
|
+
Valid Usage:
|
|
389
|
+
1. Use taskId (preferred)
|
|
390
|
+
2. Use taskName + optional listName
|
|
391
|
+
|
|
392
|
+
Notes:
|
|
393
|
+
- If using taskName, providing listName helps locate the correct task
|
|
394
|
+
- Task names may not be unique across different lists
|
|
395
|
+
- Use start and startId parameters for pagination through comments`,
|
|
306
396
|
inputSchema: {
|
|
307
397
|
type: "object",
|
|
308
398
|
properties: {
|
package/build/tools/workspace.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* It handles the workspace tool definitions and the implementation of their handlers.
|
|
6
6
|
*/
|
|
7
7
|
import { Logger } from '../logger.js';
|
|
8
|
+
import { sponsorService } from '../utils/sponsor-service.js';
|
|
8
9
|
// Create a logger for workspace tools
|
|
9
10
|
const logger = new Logger('WorkspaceTool');
|
|
10
11
|
// Use the workspace service imported from the server
|
|
@@ -15,7 +16,18 @@ let workspaceService;
|
|
|
15
16
|
*/
|
|
16
17
|
export const workspaceHierarchyTool = {
|
|
17
18
|
name: 'get_workspace_hierarchy',
|
|
18
|
-
description:
|
|
19
|
+
description: `Purpose: Retrieve the complete workspace hierarchy including spaces, folders, and lists.
|
|
20
|
+
|
|
21
|
+
Valid Usage:
|
|
22
|
+
1. Call without parameters to get the full hierarchy
|
|
23
|
+
|
|
24
|
+
Requirements:
|
|
25
|
+
- No parameters required
|
|
26
|
+
|
|
27
|
+
Notes:
|
|
28
|
+
- Returns a tree structure showing all spaces, folders, and lists
|
|
29
|
+
- Each item includes its name and ID
|
|
30
|
+
- Use this to navigate the workspace and understand its organization`,
|
|
19
31
|
inputSchema: {
|
|
20
32
|
type: 'object',
|
|
21
33
|
properties: {}
|
|
@@ -42,18 +54,14 @@ export async function handleGetWorkspaceHierarchy() {
|
|
|
42
54
|
try {
|
|
43
55
|
// Get workspace hierarchy from the workspace service
|
|
44
56
|
const hierarchy = await workspaceService.getWorkspaceHierarchy();
|
|
45
|
-
|
|
46
|
-
|
|
57
|
+
// Generate tree representation
|
|
58
|
+
const treeOutput = formatTreeOutput(hierarchy);
|
|
59
|
+
return sponsorService.createResponse({
|
|
60
|
+
hierarchy: treeOutput
|
|
61
|
+
}, true);
|
|
47
62
|
}
|
|
48
63
|
catch (error) {
|
|
49
|
-
return {
|
|
50
|
-
content: [
|
|
51
|
-
{
|
|
52
|
-
type: "text",
|
|
53
|
-
text: `Error getting workspace hierarchy: ${error.message}`
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
};
|
|
64
|
+
return sponsorService.createErrorResponse(`Error getting workspace hierarchy: ${error.message}`);
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
@@ -61,27 +69,7 @@ export async function handleGetWorkspaceHierarchy() {
|
|
|
61
69
|
*/
|
|
62
70
|
function formatHierarchyResponse(hierarchy) {
|
|
63
71
|
try {
|
|
64
|
-
|
|
65
|
-
const formatNodeAsTree = (node, level = 0, isLast = true, parentPrefix = '') => {
|
|
66
|
-
const lines = [];
|
|
67
|
-
// Calculate the current line's prefix
|
|
68
|
-
const currentPrefix = level === 0 ? '' : parentPrefix + (isLast ? '└── ' : '├── ');
|
|
69
|
-
// Format current node with descriptive ID type
|
|
70
|
-
const idType = 'type' in node ? `${node.type.charAt(0).toUpperCase() + node.type.slice(1)} ID` : 'Workspace ID';
|
|
71
|
-
lines.push(`${currentPrefix}${node.name} (${idType}: ${node.id})`);
|
|
72
|
-
// Calculate the prefix for children
|
|
73
|
-
const childPrefix = level === 0 ? '' : parentPrefix + (isLast ? ' ' : '│ ');
|
|
74
|
-
// Process children
|
|
75
|
-
const children = node.children || [];
|
|
76
|
-
children.forEach((child, index) => {
|
|
77
|
-
const childLines = formatNodeAsTree(child, level + 1, index === children.length - 1, childPrefix);
|
|
78
|
-
lines.push(...childLines);
|
|
79
|
-
});
|
|
80
|
-
return lines;
|
|
81
|
-
};
|
|
82
|
-
// Generate tree representation
|
|
83
|
-
const treeLines = formatNodeAsTree(hierarchy.root);
|
|
84
|
-
const treeOutput = treeLines.join('\n');
|
|
72
|
+
const treeOutput = formatTreeOutput(hierarchy);
|
|
85
73
|
return {
|
|
86
74
|
content: [
|
|
87
75
|
{
|
|
@@ -102,3 +90,29 @@ function formatHierarchyResponse(hierarchy) {
|
|
|
102
90
|
};
|
|
103
91
|
}
|
|
104
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Format the hierarchy as a tree string
|
|
95
|
+
*/
|
|
96
|
+
function formatTreeOutput(hierarchy) {
|
|
97
|
+
// Helper function to format a node and its children as a tree
|
|
98
|
+
const formatNodeAsTree = (node, level = 0, isLast = true, parentPrefix = '') => {
|
|
99
|
+
const lines = [];
|
|
100
|
+
// Calculate the current line's prefix
|
|
101
|
+
const currentPrefix = level === 0 ? '' : parentPrefix + (isLast ? '└── ' : '├── ');
|
|
102
|
+
// Format current node with descriptive ID type
|
|
103
|
+
const idType = 'type' in node ? `${node.type.charAt(0).toUpperCase() + node.type.slice(1)} ID` : 'Workspace ID';
|
|
104
|
+
lines.push(`${currentPrefix}${node.name} (${idType}: ${node.id})`);
|
|
105
|
+
// Calculate the prefix for children
|
|
106
|
+
const childPrefix = level === 0 ? '' : parentPrefix + (isLast ? ' ' : '│ ');
|
|
107
|
+
// Process children
|
|
108
|
+
const children = node.children || [];
|
|
109
|
+
children.forEach((child, index) => {
|
|
110
|
+
const childLines = formatNodeAsTree(child, level + 1, index === children.length - 1, childPrefix);
|
|
111
|
+
lines.push(...childLines);
|
|
112
|
+
});
|
|
113
|
+
return lines;
|
|
114
|
+
};
|
|
115
|
+
// Generate tree representation
|
|
116
|
+
const treeLines = formatNodeAsTree(hierarchy.root);
|
|
117
|
+
return treeLines.join('\n');
|
|
118
|
+
}
|
package/package.json
CHANGED