@taazkareem/clickup-mcp-server 0.4.57 → 0.4.60
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 +1 -1
- package/build/index.js +13 -25
- package/build/services/clickup.js +19 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ npx -y @taazkareem/clickup-mcp-server \
|
|
|
61
61
|
| [update_task](docs/api-reference.md#task-management) | Modify task | `taskId`/`taskName` |
|
|
62
62
|
| [get_tasks](docs/api-reference.md#task-retrieval) | Get tasks from list | `listId`/`listName` |
|
|
63
63
|
| [get_task](docs/api-reference.md#task-retrieval) | Get task details | `taskId`/`taskName` |
|
|
64
|
-
| [delete_task](docs/api-reference.md#task-management) | Remove task | `taskId` |
|
|
64
|
+
| [delete_task](docs/api-reference.md#task-management) | Remove task | `taskId`/`taskName` |
|
|
65
65
|
| [move_task](docs/api-reference.md#task-management) | Move task | `taskId`/`taskName`, `listId`/`listName` |
|
|
66
66
|
| [duplicate_task](docs/api-reference.md#task-management) | Copy task | `taskId`/`taskName`, `listId`/`listName` |
|
|
67
67
|
| [create_list](docs/api-reference.md#list-management) | Create list in space | `name`, `spaceId`/`spaceName` |
|
package/build/index.js
CHANGED
|
@@ -109,7 +109,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
109
109
|
description: "Due date of the task (Unix timestamp in milliseconds). Convert dates to this format before submitting."
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
required: []
|
|
112
|
+
required: ["name"]
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
@@ -168,7 +168,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
required: []
|
|
171
|
+
required: ["tasks"]
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
{
|
|
@@ -210,7 +210,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
210
210
|
description: "Status of the list"
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
required: []
|
|
213
|
+
required: ["name"]
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
{
|
|
@@ -236,7 +236,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
236
236
|
description: "Whether to override space statuses with folder-specific statuses"
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
required: []
|
|
239
|
+
required: ["name"]
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
{
|
|
@@ -245,6 +245,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
245
245
|
inputSchema: {
|
|
246
246
|
type: "object",
|
|
247
247
|
properties: {
|
|
248
|
+
name: {
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "Name of the list"
|
|
251
|
+
},
|
|
248
252
|
folderId: {
|
|
249
253
|
type: "string",
|
|
250
254
|
description: "ID of the folder to create the list in (optional if using folderName instead). If you have this ID from a previous response, use it directly rather than looking up by name."
|
|
@@ -261,10 +265,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
261
265
|
type: "string",
|
|
262
266
|
description: "Name of the space containing the folder - will automatically find the space by name (optional if using spaceId instead). Only use this if you don't already have the space ID from previous responses."
|
|
263
267
|
},
|
|
264
|
-
name: {
|
|
265
|
-
type: "string",
|
|
266
|
-
description: "Name of the list"
|
|
267
|
-
},
|
|
268
268
|
content: {
|
|
269
269
|
type: "string",
|
|
270
270
|
description: "Description or content of the list"
|
|
@@ -274,7 +274,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
274
274
|
description: "Status of the list (uses folder default if not specified)"
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
|
-
required: []
|
|
277
|
+
required: ["name"]
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
{
|
|
@@ -999,26 +999,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
999
999
|
}
|
|
1000
1000
|
case "delete_task": {
|
|
1001
1001
|
const args = request.params.arguments;
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
throw new Error("taskId is required for deletion operations");
|
|
1005
|
-
}
|
|
1006
|
-
// Store the task name before deletion for the response message
|
|
1007
|
-
let taskName = args.taskName;
|
|
1008
|
-
if (!taskName) {
|
|
1009
|
-
try {
|
|
1010
|
-
const task = await clickup.getTask(args.taskId);
|
|
1011
|
-
taskName = task.name;
|
|
1012
|
-
}
|
|
1013
|
-
catch (error) {
|
|
1014
|
-
// If we can't get the task details, just use the ID in the response
|
|
1015
|
-
}
|
|
1002
|
+
if (!args.taskId && !args.taskName) {
|
|
1003
|
+
throw new Error("Either taskId or taskName is required");
|
|
1016
1004
|
}
|
|
1017
|
-
await clickup.deleteTask(args.taskId);
|
|
1005
|
+
await clickup.deleteTask(args.taskId, args.taskName, args.listName);
|
|
1018
1006
|
return {
|
|
1019
1007
|
content: [{
|
|
1020
1008
|
type: "text",
|
|
1021
|
-
text: `Successfully deleted task ${taskName
|
|
1009
|
+
text: `Successfully deleted task${args.taskName ? ` "${args.taskName}"` : ` with ID ${args.taskId}`}`
|
|
1022
1010
|
}]
|
|
1023
1011
|
};
|
|
1024
1012
|
}
|
|
@@ -237,11 +237,28 @@ export class ClickUpService {
|
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Deletes a task from the workspace.
|
|
240
|
+
* Can delete by taskId directly or find by taskName first.
|
|
240
241
|
* Handles rate limiting automatically.
|
|
242
|
+
* @param taskId - ID of the task to delete (optional if taskName provided)
|
|
243
|
+
* @param taskName - Name of the task to delete (optional if taskId provided)
|
|
244
|
+
* @param listName - Optional list name to narrow down task search
|
|
245
|
+
* @throws Error if neither taskId nor taskName is provided, or if task not found
|
|
241
246
|
*/
|
|
242
|
-
async deleteTask(taskId) {
|
|
247
|
+
async deleteTask(taskId, taskName, listName) {
|
|
243
248
|
return this.makeRequest(async () => {
|
|
244
|
-
|
|
249
|
+
let finalTaskId = taskId;
|
|
250
|
+
// If no taskId but taskName provided, find the task first
|
|
251
|
+
if (!taskId && taskName) {
|
|
252
|
+
const taskInfo = await this.findTaskByName(taskName, undefined, listName);
|
|
253
|
+
if (!taskInfo) {
|
|
254
|
+
throw new Error(`Task "${taskName}" not found${listName ? ` in list "${listName}"` : ''}`);
|
|
255
|
+
}
|
|
256
|
+
finalTaskId = taskInfo.id;
|
|
257
|
+
}
|
|
258
|
+
if (!finalTaskId) {
|
|
259
|
+
throw new Error('Either taskId or taskName must be provided');
|
|
260
|
+
}
|
|
261
|
+
await this.client.delete(`/task/${finalTaskId}`);
|
|
245
262
|
});
|
|
246
263
|
}
|
|
247
264
|
// Lists
|
package/package.json
CHANGED