@sebastienheyd/clickup-mcp 1.7.0 → 1.7.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-write-tools.d.ts","sourceRoot":"","sources":["../../src/tools/task-write-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAcpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"task-write-tools.d.ts","sourceRoot":"","sources":["../../src/tools/task-write-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAcpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QA2btE"}
|
|
@@ -334,7 +334,30 @@ function registerTaskToolsWrite(server, userData) {
|
|
|
334
334
|
const errorData = await response.json().catch(() => ({}));
|
|
335
335
|
throw new Error(`Error creating task: ${response.status} ${response.statusText} - ${JSON.stringify(errorData)}`);
|
|
336
336
|
}
|
|
337
|
-
|
|
337
|
+
let createdTask = await response.json();
|
|
338
|
+
// Handle tags separately via dedicated API endpoints
|
|
339
|
+
if (tags && tags.length > 0) {
|
|
340
|
+
for (const tagName of tags) {
|
|
341
|
+
const encodedTag = encodeURIComponent(tagName);
|
|
342
|
+
const tagResponse = await fetch(`https://api.clickup.com/api/v2/task/${createdTask.id}/tag/${encodedTag}`, {
|
|
343
|
+
method: 'POST',
|
|
344
|
+
headers: {
|
|
345
|
+
Authorization: config_1.CONFIG.apiKey,
|
|
346
|
+
'Content-Type': 'application/json'
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
if (!tagResponse.ok) {
|
|
350
|
+
console.error(`Error adding tag "${tagName}" to task ${createdTask.id}: ${tagResponse.status}`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
// Re-fetch task to get updated tags
|
|
354
|
+
const refreshResponse = await fetch(`https://api.clickup.com/api/v2/task/${createdTask.id}`, {
|
|
355
|
+
headers: { Authorization: config_1.CONFIG.apiKey }
|
|
356
|
+
});
|
|
357
|
+
if (refreshResponse.ok) {
|
|
358
|
+
createdTask = await refreshResponse.json();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
338
361
|
const responseLines = formatTaskResponse(createdTask, 'created', {
|
|
339
362
|
list_id, name, description, status, priority, due_date, start_date, time_estimate, tags, parent_task_id, assignees
|
|
340
363
|
}, userData);
|
package/package.json
CHANGED