@sebastienheyd/clickup-mcp 1.9.0 → 1.10.2
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 +26 -4
- package/dist/clickup-text.d.ts +1 -0
- package/dist/clickup-text.d.ts.map +1 -1
- package/dist/clickup-text.js +175 -28
- package/dist/shared/attachments.d.ts.map +1 -1
- package/dist/shared/attachments.js +9 -3
- package/dist/shared/comments.d.ts +98 -0
- package/dist/shared/comments.d.ts.map +1 -0
- package/dist/shared/comments.js +158 -0
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +31 -10
- package/dist/shared/dates.d.ts +25 -0
- package/dist/shared/dates.d.ts.map +1 -0
- package/dist/shared/dates.js +42 -0
- package/dist/shared/utils.d.ts +1 -1
- package/dist/shared/utils.js +4 -4
- package/dist/tools/list-tools.js +9 -9
- package/dist/tools/task-tools.d.ts.map +1 -1
- package/dist/tools/task-tools.js +82 -18
- package/dist/tools/task-write-tools.d.ts.map +1 -1
- package/dist/tools/task-write-tools.js +306 -116
- package/dist/tools/time-tools.d.ts.map +1 -1
- package/dist/tools/time-tools.js +17 -7
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-tools.d.ts","sourceRoot":"","sources":["../../src/tools/time-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"time-tools.d.ts","sourceRoot":"","sources":["../../src/tools/time-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAoEpE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QAqFtD;AA6OD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAmPvD"}
|
package/dist/tools/time-tools.js
CHANGED
|
@@ -5,12 +5,22 @@ exports.registerTimeToolsWrite = registerTimeToolsWrite;
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const config_1 = require("../shared/config");
|
|
7
7
|
const utils_1 = require("../shared/utils");
|
|
8
|
+
const dates_1 = require("../shared/dates");
|
|
8
9
|
/**
|
|
9
10
|
* Converts ISO date string to Unix timestamp in milliseconds
|
|
10
11
|
*/
|
|
11
12
|
function isoToTimestamp(isoString) {
|
|
12
13
|
return new Date(isoString).getTime();
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Convert a date range filter bound. A bare date (YYYY-MM-DD) means the whole
|
|
17
|
+
* local day: `new Date("2026-10-01")` is UTC midnight, so as an end bound it used
|
|
18
|
+
* to exclude the very day the summary header announced ("2026-10-01 to 2026-10-01").
|
|
19
|
+
* Invalid or impossible dates throw instead of sending `NaN` to the API.
|
|
20
|
+
*/
|
|
21
|
+
function dateFilterToTimestamp(value, bound) {
|
|
22
|
+
return (0, dates_1.parseDateInput)(value, bound === "start" ? "start_date" : "end_date", bound).timestamp;
|
|
23
|
+
}
|
|
14
24
|
/**
|
|
15
25
|
* Formats timestamp to ISO string with local timezone (not UTC)
|
|
16
26
|
*/
|
|
@@ -55,10 +65,10 @@ function registerTimeToolsRead(server) {
|
|
|
55
65
|
const tool = server.tool.bind(server);
|
|
56
66
|
tool("getTimeEntries", "Gets time entries for a specific task or all user's time entries. Returns last 30 days by default if no dates specified.", {
|
|
57
67
|
task_id: zod_1.z.string().min(1).refine(val => (0, utils_1.isTaskId)(val) || (0, utils_1.isCustomTaskId)(val), {
|
|
58
|
-
message: "Must be an internal task ID (6
|
|
68
|
+
message: "Must be an internal task ID (6-16 alphanumeric characters) or a custom task ID (e.g. SOI-4422)"
|
|
59
69
|
}).optional().describe("Optional task ID to filter entries: internal ID (e.g. \"869c4za0g\") or custom ID (e.g. \"SOI-4422\"). If not provided, returns all user's time entries."),
|
|
60
|
-
start_date: zod_1.z.string().optional().describe("Optional start date filter as ISO date string (e.g., '2024-10-06T00:00:00+02:00'). Defaults to 30 days ago."),
|
|
61
|
-
end_date: zod_1.z.string().optional().describe("Optional end date filter as ISO date string (e.g., '2024-10-06T23:59:59+02:00'). Defaults to current date."),
|
|
70
|
+
start_date: zod_1.z.string().optional().describe("Optional start date filter as ISO date string (e.g., '2024-10-06T00:00:00+02:00') or a bare date (e.g., '2024-10-06', from the start of that local day). Defaults to 30 days ago."),
|
|
71
|
+
end_date: zod_1.z.string().optional().describe("Optional end date filter as ISO date string (e.g., '2024-10-06T23:59:59+02:00') or a bare date (e.g., '2024-10-06', up to the end of that local day). Defaults to current date."),
|
|
62
72
|
list_id: zod_1.z.string().optional().describe("Optional single list ID to filter time entries by a specific list"),
|
|
63
73
|
space_id: zod_1.z.string().optional().describe("Optional single space ID to filter time entries by a specific space"),
|
|
64
74
|
include_all_users: zod_1.z.boolean().optional().describe("Optional flag to include time entries from all team members (default: false, only current user)")
|
|
@@ -72,10 +82,10 @@ function registerTimeToolsRead(server) {
|
|
|
72
82
|
params.append('task_id', await (0, utils_1.resolveTaskId)(task_id));
|
|
73
83
|
}
|
|
74
84
|
if (start_date) {
|
|
75
|
-
params.append('start_date',
|
|
85
|
+
params.append('start_date', dateFilterToTimestamp(start_date, "start").toString());
|
|
76
86
|
}
|
|
77
87
|
if (end_date) {
|
|
78
|
-
params.append('end_date',
|
|
88
|
+
params.append('end_date', dateFilterToTimestamp(end_date, "end").toString());
|
|
79
89
|
}
|
|
80
90
|
// Add single list_id or space_id filter (not both)
|
|
81
91
|
if (list_id) {
|
|
@@ -320,7 +330,7 @@ function registerTimeToolsWrite(server) {
|
|
|
320
330
|
start_time: zod_1.z.string().optional().describe("New start time as ISO date string (e.g., '2024-10-06T09:00:00+02:00'); the end is recomputed from the duration"),
|
|
321
331
|
description: zod_1.z.string().optional().describe("New description (pass an empty string to clear it)"),
|
|
322
332
|
task_id: zod_1.z.string().min(1).refine(val => (0, utils_1.isTaskId)(val) || (0, utils_1.isCustomTaskId)(val), {
|
|
323
|
-
message: "Must be an internal task ID (6
|
|
333
|
+
message: "Must be an internal task ID (6-16 alphanumeric characters) or a custom task ID (e.g. SOI-4422)"
|
|
324
334
|
}).optional().describe("Move the entry to another task: internal ID (e.g. \"869c4za0g\") or custom ID (e.g. \"SOI-4422\")")
|
|
325
335
|
}, {
|
|
326
336
|
readOnlyHint: false,
|
|
@@ -439,7 +449,7 @@ function registerTimeToolsWrite(server) {
|
|
|
439
449
|
"Suggest moving the task to an active status like 'in progress' first."
|
|
440
450
|
].join("\n"), {
|
|
441
451
|
task_id: zod_1.z.string().min(1).refine(val => (0, utils_1.isTaskId)(val) || (0, utils_1.isCustomTaskId)(val), {
|
|
442
|
-
message: "Must be an internal task ID (6
|
|
452
|
+
message: "Must be an internal task ID (6-16 alphanumeric characters) or a custom task ID (e.g. SOI-4422)"
|
|
443
453
|
}).describe("The task ID to book time against: internal ID (e.g. \"869c4za0g\") or custom ID (e.g. \"SOI-4422\")"),
|
|
444
454
|
hours: zod_1.z.number().min(0.01).max(24).describe("Hours to book (decimal format, e.g., 0.25 = 15min, 1.5 = 1h 30min)"),
|
|
445
455
|
description: zod_1.z.string().optional().describe("Optional description for the time entry"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebastienheyd/clickup-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Search, create, and retrieve tasks, add comments, and track time through natural language commands.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"prepublishOnly": "rm -r dist && npm run build && chmod +x dist/index.js",
|
|
22
22
|
"release": "npm run build && npm publish --access public && git add . && git commit -m \"Release v$(node -p 'require(\"./package.json\").version')\" && git tag -a v$(node -p 'require(\"./package.json\").version') -m \"Release v$(node -p 'require(\"./package.json\").version')\" && git push && git push --tags",
|
|
23
23
|
"mcpb": "npm run build && mcpb pack . ClickUp.mcpb",
|
|
24
|
-
"test": "node --test -r ts-node/register -r ./src/tests/setup.ts src/**/*.test.ts"
|
|
24
|
+
"test": "node --test --test-concurrency=1 -r ts-node/register -r ./src/tests/setup.ts src/**/*.test.ts"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"clickup",
|