@delega-dev/mcp 1.0.4 → 1.0.6
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/dist/index.js +14 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -107,7 +107,15 @@ function formatTask(t) {
|
|
|
107
107
|
if (t.description) lines.push(` Description: ${t.description}`);
|
|
108
108
|
if (t.project?.name ?? t.project_name)
|
|
109
109
|
lines.push(` Project: ${t.project?.name ?? t.project_name}`);
|
|
110
|
-
|
|
110
|
+
const labels = Array.isArray(t.labels) ? t.labels : typeof t.labels === "string" ? (() => {
|
|
111
|
+
try {
|
|
112
|
+
const p = JSON.parse(t.labels);
|
|
113
|
+
return Array.isArray(p) ? p : [];
|
|
114
|
+
} catch {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
})() : [];
|
|
118
|
+
if (labels.length) lines.push(` Labels: ${labels.join(", ")}`);
|
|
111
119
|
if (t.priority) lines.push(` Priority: ${t.priority}`);
|
|
112
120
|
if (t.due_date) lines.push(` Due: ${t.due_date}`);
|
|
113
121
|
lines.push(` Completed: ${t.completed ? "yes" : "no"}`);
|
|
@@ -161,7 +169,7 @@ server.tool(
|
|
|
161
169
|
"get_task",
|
|
162
170
|
"Get full details of a specific task including subtasks",
|
|
163
171
|
{
|
|
164
|
-
task_id: z.
|
|
172
|
+
task_id: z.union([z.string(), z.number()]).describe("The task ID (use the ID from list_tasks, e.g. '3a7d...')")
|
|
165
173
|
},
|
|
166
174
|
async ({ task_id }) => {
|
|
167
175
|
try {
|
|
@@ -200,7 +208,7 @@ server.tool(
|
|
|
200
208
|
"update_task",
|
|
201
209
|
"Update an existing task's fields",
|
|
202
210
|
{
|
|
203
|
-
task_id: z.
|
|
211
|
+
task_id: z.union([z.string(), z.number()]).describe("The task ID to update"),
|
|
204
212
|
content: z.string().optional().describe("New task title / content"),
|
|
205
213
|
description: z.string().optional().describe("New description"),
|
|
206
214
|
labels: z.array(z.string()).optional().describe("New labels"),
|
|
@@ -225,7 +233,7 @@ server.tool(
|
|
|
225
233
|
"complete_task",
|
|
226
234
|
"Mark a task as completed",
|
|
227
235
|
{
|
|
228
|
-
task_id: z.
|
|
236
|
+
task_id: z.union([z.string(), z.number()]).describe("The task ID to complete")
|
|
229
237
|
},
|
|
230
238
|
async ({ task_id }) => {
|
|
231
239
|
try {
|
|
@@ -245,7 +253,7 @@ server.tool(
|
|
|
245
253
|
"delete_task",
|
|
246
254
|
"Delete a task permanently",
|
|
247
255
|
{
|
|
248
|
-
task_id: z.
|
|
256
|
+
task_id: z.union([z.string(), z.number()]).describe("The task ID to delete")
|
|
249
257
|
},
|
|
250
258
|
async ({ task_id }) => {
|
|
251
259
|
try {
|
|
@@ -262,7 +270,7 @@ server.tool(
|
|
|
262
270
|
"add_comment",
|
|
263
271
|
"Add a comment to a task",
|
|
264
272
|
{
|
|
265
|
-
task_id: z.
|
|
273
|
+
task_id: z.union([z.string(), z.number()]).describe("The task ID to comment on"),
|
|
266
274
|
content: z.string().describe("Comment text"),
|
|
267
275
|
author: z.string().optional().describe("Comment author name")
|
|
268
276
|
},
|