@@ -131,7 +131,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
131
131
description : "Due date of the task (Unix timestamp in milliseconds). Convert dates to this format before submitting."
132
132
}
133
133
} ,
134
- required : [ ]
134
+ required : [ "name" ]
135
135
}
136
136
} ,
137
137
{
@@ -190,7 +190,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
190
190
}
191
191
}
192
192
} ,
193
- required : [ ]
193
+ required : [ "tasks" ]
194
194
}
195
195
} ,
196
196
{
@@ -232,7 +232,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
232
232
description : "Status of the list"
233
233
}
234
234
} ,
235
- required : [ ]
235
+ required : [ "name" ]
236
236
}
237
237
} ,
238
238
{
@@ -258,7 +258,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
258
258
description : "Whether to override space statuses with folder-specific statuses"
259
259
}
260
260
} ,
261
- required : [ ]
261
+ required : [ "name" ]
262
262
}
263
263
} ,
264
264
{
@@ -267,6 +267,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
267
267
inputSchema : {
268
268
type : "object" ,
269
269
properties : {
270
+ name : {
271
+ type : "string" ,
272
+ description : "Name of the list"
273
+ } ,
270
274
folderId : {
271
275
type : "string" ,
272
276
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."
@@ -283,10 +287,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
283
287
type : "string" ,
284
288
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."
285
289
} ,
286
- name : {
287
- type : "string" ,
288
- description : "Name of the list"
289
- } ,
290
290
content : {
291
291
type : "string" ,
292
292
description : "Description or content of the list"
@@ -296,7 +296,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
296
296
description : "Status of the list (uses folder default if not specified)"
297
297
}
298
298
} ,
299
- required : [ ]
299
+ required : [ "name" ]
300
300
}
301
301
} ,
302
302
{
@@ -1123,33 +1123,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1123
1123
}
1124
1124
1125
1125
case "delete_task" : {
1126
- const args = request . params . arguments as {
1127
- taskId : string ; // Make taskId required
1128
- taskName ? : string ;
1129
- listName ? : string ;
1130
- } ;
1131
-
1132
- // Validate the required taskId parameter
1133
- if ( ! args . taskId ) {
1134
- throw new Error ( "taskId is required for deletion operations" ) ;
1135
- }
1136
-
1137
- // Store the task name before deletion for the response message
1138
- let taskName = args . taskName ;
1139
- if ( ! taskName ) {
1140
- try {
1141
- const task = await clickup . getTask ( args . taskId ) ;
1142
- taskName = task . name ;
1143
- } catch ( error ) {
1144
- // If we can't get the task details, just use the ID in the response
1145
- }
1126
+ const args = request . params . arguments as { taskId ? : string ; taskName ? : string ; listName ? : string } ;
1127
+
1128
+ if ( ! args . taskId && ! args . taskName ) {
1129
+ throw new Error ( "Either taskId or taskName is required" ) ;
1146
1130
}
1147
1131
1148
- await clickup . deleteTask ( args . taskId ) ;
1132
+ await clickup . deleteTask ( args . taskId , args . taskName , args . listName ) ;
1149
1133
return {
1150
1134
content : [ {
1151
1135
type : "text" ,
1152
- text : `Successfully deleted task ${ taskName || args . taskId } `
1136
+ text : `Successfully deleted task${ args . taskName ? ` " ${ args . taskName } "` : ` with ID ${ args . taskId } ` } `
1153
1137
} ]
1154
1138
} ;
1155
1139
}
0 commit comments