@denisixnpm/planka-mcp 2.2.0
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/LICENSE +21 -0
- package/README.md +157 -0
- package/dist/condense.d.ts +18 -0
- package/dist/condense.js +127 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +567 -0
- package/dist/tools/admin/index.d.ts +10 -0
- package/dist/tools/admin/index.js +11 -0
- package/dist/tools/admin/tools.d.ts +17 -0
- package/dist/tools/admin/tools.js +211 -0
- package/dist/tools/core/index.d.ts +10 -0
- package/dist/tools/core/index.js +18 -0
- package/dist/tools/core/tools.d.ts +46 -0
- package/dist/tools/core/tools.js +535 -0
- package/dist/tools/index.d.ts +45 -0
- package/dist/tools/index.js +61 -0
- package/dist/tools/optional/index.d.ts +10 -0
- package/dist/tools/optional/index.js +20 -0
- package/dist/tools/optional/tools.d.ts +53 -0
- package/dist/tools/optional/tools.js +578 -0
- package/dist/tools/types.d.ts +61 -0
- package/dist/tools/types.js +64 -0
- package/package.json +59 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GroupedToolDefinition } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Actions tool - action history
|
|
4
|
+
*/
|
|
5
|
+
export declare const actionsTool: GroupedToolDefinition;
|
|
6
|
+
/**
|
|
7
|
+
* Attachments tool - manages card attachments
|
|
8
|
+
*/
|
|
9
|
+
export declare const attachmentsTool: GroupedToolDefinition;
|
|
10
|
+
/**
|
|
11
|
+
* Board Members tool - manages board memberships
|
|
12
|
+
*/
|
|
13
|
+
export declare const boardMembersTool: GroupedToolDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* Custom Fields tool - manages custom field groups and fields
|
|
16
|
+
*/
|
|
17
|
+
export declare const customFieldsTool: GroupedToolDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* Notifications tool - manages notifications and notification services
|
|
20
|
+
*/
|
|
21
|
+
export declare const notificationsTool: GroupedToolDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* Background Images tool - manages project background images
|
|
24
|
+
*/
|
|
25
|
+
export declare const backgroundImagesTool: GroupedToolDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* Card Extras tool - extended card operations
|
|
28
|
+
*/
|
|
29
|
+
export declare const cardExtrasTool: GroupedToolDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* Comment Extras tool - extended comment operations
|
|
32
|
+
*/
|
|
33
|
+
export declare const commentExtrasTool: GroupedToolDefinition;
|
|
34
|
+
/**
|
|
35
|
+
* List Extras tool - extended list operations
|
|
36
|
+
*/
|
|
37
|
+
export declare const listExtrasTool: GroupedToolDefinition;
|
|
38
|
+
/**
|
|
39
|
+
* Task Extras tool - extended task operations
|
|
40
|
+
*/
|
|
41
|
+
export declare const taskExtrasTool: GroupedToolDefinition;
|
|
42
|
+
/**
|
|
43
|
+
* Label Extras tool - extended label operations
|
|
44
|
+
*/
|
|
45
|
+
export declare const labelExtrasTool: GroupedToolDefinition;
|
|
46
|
+
/**
|
|
47
|
+
* Card Member Extras tool - extended card membership operations
|
|
48
|
+
*/
|
|
49
|
+
export declare const cardMemberExtrasTool: GroupedToolDefinition;
|
|
50
|
+
/**
|
|
51
|
+
* User Info tool - get user information (non-admin)
|
|
52
|
+
*/
|
|
53
|
+
export declare const userInfoTool: GroupedToolDefinition;
|
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import { buildGroupedSchema } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Actions tool - action history
|
|
4
|
+
*/
|
|
5
|
+
export const actionsTool = {
|
|
6
|
+
name: "actions",
|
|
7
|
+
description: "View action history for boards and cards.",
|
|
8
|
+
operations: {
|
|
9
|
+
boardActions: {
|
|
10
|
+
method: "GET",
|
|
11
|
+
path: "/boards/{boardId}/actions",
|
|
12
|
+
description: "Get action history for a board",
|
|
13
|
+
},
|
|
14
|
+
cardActions: {
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: "/cards/{cardId}/actions",
|
|
17
|
+
description: "Get action history for a card",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
inputSchema: buildGroupedSchema(["boardActions", "cardActions"], {
|
|
21
|
+
boardActions: "Get board action history",
|
|
22
|
+
cardActions: "Get card action history",
|
|
23
|
+
}, {
|
|
24
|
+
id: {
|
|
25
|
+
description: "Board ID (for boardActions) or Card ID (for cardActions)",
|
|
26
|
+
requiredFor: ["boardActions", "cardActions"],
|
|
27
|
+
},
|
|
28
|
+
query: {
|
|
29
|
+
beforeId: { type: "string", description: "Get actions before this ID (pagination)" },
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Attachments tool - manages card attachments
|
|
35
|
+
*/
|
|
36
|
+
export const attachmentsTool = {
|
|
37
|
+
name: "attachments",
|
|
38
|
+
description: "Manage attachments on Planka cards.",
|
|
39
|
+
operations: {
|
|
40
|
+
create: {
|
|
41
|
+
method: "POST",
|
|
42
|
+
path: "/cards/{cardId}/attachments",
|
|
43
|
+
description: "Add an attachment to a card",
|
|
44
|
+
},
|
|
45
|
+
update: {
|
|
46
|
+
method: "PATCH",
|
|
47
|
+
path: "/attachments/{id}",
|
|
48
|
+
description: "Update attachment properties",
|
|
49
|
+
},
|
|
50
|
+
delete: {
|
|
51
|
+
method: "DELETE",
|
|
52
|
+
path: "/attachments/{id}",
|
|
53
|
+
description: "Delete an attachment",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
inputSchema: buildGroupedSchema(["create", "update", "delete"], {
|
|
57
|
+
create: "Add attachment to card",
|
|
58
|
+
update: "Update attachment",
|
|
59
|
+
delete: "Delete attachment",
|
|
60
|
+
}, {
|
|
61
|
+
id: {
|
|
62
|
+
description: "Card ID (for create) or Attachment ID (for update, delete)",
|
|
63
|
+
requiredFor: ["create", "update", "delete"],
|
|
64
|
+
},
|
|
65
|
+
data: {
|
|
66
|
+
description: "Attachment data: { type: 'file'|'link', name?: string, url?: string (for link) }. Binary file uploads are not supported by this MCP server; use type 'link'.",
|
|
67
|
+
requiredFor: ["create", "update"],
|
|
68
|
+
properties: {
|
|
69
|
+
type: { type: "string", enum: ["file", "link"], description: "Attachment type", required: true },
|
|
70
|
+
name: { type: "string", description: "Attachment name" },
|
|
71
|
+
url: { type: "string", description: "URL (for link attachments)" },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Board Members tool - manages board memberships
|
|
78
|
+
*/
|
|
79
|
+
export const boardMembersTool = {
|
|
80
|
+
name: "boardMembers",
|
|
81
|
+
description: "Manage user memberships on Planka boards.",
|
|
82
|
+
operations: {
|
|
83
|
+
add: {
|
|
84
|
+
method: "POST",
|
|
85
|
+
path: "/boards/{boardId}/board-memberships",
|
|
86
|
+
description: "Add a user to a board",
|
|
87
|
+
},
|
|
88
|
+
update: {
|
|
89
|
+
method: "PATCH",
|
|
90
|
+
path: "/board-memberships/{id}",
|
|
91
|
+
description: "Update membership role",
|
|
92
|
+
},
|
|
93
|
+
remove: {
|
|
94
|
+
method: "DELETE",
|
|
95
|
+
path: "/board-memberships/{id}",
|
|
96
|
+
description: "Remove a user from a board",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
inputSchema: buildGroupedSchema(["add", "update", "remove"], {
|
|
100
|
+
add: "Add user to board",
|
|
101
|
+
update: "Update membership role",
|
|
102
|
+
remove: "Remove user from board",
|
|
103
|
+
}, {
|
|
104
|
+
id: {
|
|
105
|
+
description: "Board ID (for add) or Board Membership ID (for update, remove)",
|
|
106
|
+
requiredFor: ["add", "update", "remove"],
|
|
107
|
+
},
|
|
108
|
+
data: {
|
|
109
|
+
description: "Membership data: { userId: string, role: 'editor'|'viewer', canComment?: boolean }",
|
|
110
|
+
requiredFor: ["add", "update"],
|
|
111
|
+
properties: {
|
|
112
|
+
userId: { type: "string", description: "User ID", required: true },
|
|
113
|
+
role: { type: "string", enum: ["editor", "viewer"], description: "Membership role", required: true },
|
|
114
|
+
canComment: { type: "boolean", description: "Whether member can comment" },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
}),
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Custom Fields tool - manages custom field groups and fields
|
|
121
|
+
*/
|
|
122
|
+
export const customFieldsTool = {
|
|
123
|
+
name: "customFields",
|
|
124
|
+
description: "Manage custom fields and field groups in Planka.",
|
|
125
|
+
operations: {
|
|
126
|
+
// Base groups (project level)
|
|
127
|
+
createBaseGroup: {
|
|
128
|
+
method: "POST",
|
|
129
|
+
path: "/projects/{projectId}/base-custom-field-groups",
|
|
130
|
+
description: "Create a base custom field group template",
|
|
131
|
+
},
|
|
132
|
+
updateBaseGroup: {
|
|
133
|
+
method: "PATCH",
|
|
134
|
+
path: "/base-custom-field-groups/{id}",
|
|
135
|
+
description: "Update a base custom field group",
|
|
136
|
+
},
|
|
137
|
+
deleteBaseGroup: {
|
|
138
|
+
method: "DELETE",
|
|
139
|
+
path: "/base-custom-field-groups/{id}",
|
|
140
|
+
description: "Delete a base custom field group",
|
|
141
|
+
},
|
|
142
|
+
// Board/Card groups
|
|
143
|
+
createBoardGroup: {
|
|
144
|
+
method: "POST",
|
|
145
|
+
path: "/boards/{boardId}/custom-field-groups",
|
|
146
|
+
description: "Create a custom field group on a board",
|
|
147
|
+
},
|
|
148
|
+
createCardGroup: {
|
|
149
|
+
method: "POST",
|
|
150
|
+
path: "/cards/{cardId}/custom-field-groups",
|
|
151
|
+
description: "Create a custom field group on a card",
|
|
152
|
+
},
|
|
153
|
+
getGroup: {
|
|
154
|
+
method: "GET",
|
|
155
|
+
path: "/custom-field-groups/{id}",
|
|
156
|
+
description: "Get a custom field group with fields",
|
|
157
|
+
},
|
|
158
|
+
updateGroup: {
|
|
159
|
+
method: "PATCH",
|
|
160
|
+
path: "/custom-field-groups/{id}",
|
|
161
|
+
description: "Update a custom field group",
|
|
162
|
+
},
|
|
163
|
+
deleteGroup: {
|
|
164
|
+
method: "DELETE",
|
|
165
|
+
path: "/custom-field-groups/{id}",
|
|
166
|
+
description: "Delete a custom field group",
|
|
167
|
+
},
|
|
168
|
+
// Fields
|
|
169
|
+
createFieldInBase: {
|
|
170
|
+
method: "POST",
|
|
171
|
+
path: "/base-custom-field-groups/{baseCustomFieldGroupId}/custom-fields",
|
|
172
|
+
description: "Create a field in a base group",
|
|
173
|
+
},
|
|
174
|
+
createField: {
|
|
175
|
+
method: "POST",
|
|
176
|
+
path: "/custom-field-groups/{customFieldGroupId}/custom-fields",
|
|
177
|
+
description: "Create a field in a group",
|
|
178
|
+
},
|
|
179
|
+
updateField: {
|
|
180
|
+
method: "PATCH",
|
|
181
|
+
path: "/custom-fields/{id}",
|
|
182
|
+
description: "Update a custom field",
|
|
183
|
+
},
|
|
184
|
+
deleteField: {
|
|
185
|
+
method: "DELETE",
|
|
186
|
+
path: "/custom-fields/{id}",
|
|
187
|
+
description: "Delete a custom field",
|
|
188
|
+
},
|
|
189
|
+
// Field values
|
|
190
|
+
setValue: {
|
|
191
|
+
method: "PATCH",
|
|
192
|
+
path: "/cards/{cardId}/custom-field-values/customFieldGroupId:{customFieldGroupId}:customFieldId:{customFieldId}",
|
|
193
|
+
description: "Set a custom field value on a card",
|
|
194
|
+
},
|
|
195
|
+
clearValue: {
|
|
196
|
+
method: "DELETE",
|
|
197
|
+
path: "/cards/{cardId}/custom-field-values/customFieldGroupId:{customFieldGroupId}:customFieldId:{customFieldId}",
|
|
198
|
+
description: "Clear a custom field value",
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
inputSchema: buildGroupedSchema(["createBaseGroup", "updateBaseGroup", "deleteBaseGroup", "createBoardGroup", "createCardGroup", "getGroup", "updateGroup", "deleteGroup", "createFieldInBase", "createField", "updateField", "deleteField", "setValue", "clearValue"], {
|
|
202
|
+
createBaseGroup: "Create base field group",
|
|
203
|
+
updateBaseGroup: "Update base field group",
|
|
204
|
+
deleteBaseGroup: "Delete base field group",
|
|
205
|
+
createBoardGroup: "Create board field group",
|
|
206
|
+
createCardGroup: "Create card field group",
|
|
207
|
+
getGroup: "Get field group",
|
|
208
|
+
updateGroup: "Update field group",
|
|
209
|
+
deleteGroup: "Delete field group",
|
|
210
|
+
createFieldInBase: "Create field in base group",
|
|
211
|
+
createField: "Create field in group",
|
|
212
|
+
updateField: "Update field",
|
|
213
|
+
deleteField: "Delete field",
|
|
214
|
+
setValue: "Set field value",
|
|
215
|
+
clearValue: "Clear field value",
|
|
216
|
+
}, {
|
|
217
|
+
id: {
|
|
218
|
+
description: "Resource ID - varies by action (project, board, card, group, or field ID)",
|
|
219
|
+
requiredFor: ["createBaseGroup", "updateBaseGroup", "deleteBaseGroup", "createBoardGroup", "createCardGroup", "getGroup", "updateGroup", "deleteGroup", "createFieldInBase", "createField", "updateField", "deleteField", "setValue", "clearValue"],
|
|
220
|
+
},
|
|
221
|
+
data: {
|
|
222
|
+
description: "Field/group data: { name: string, position: number (both required when creating groups/fields), content?: string (for setValue), customFieldGroupId?: string, customFieldId?: string }",
|
|
223
|
+
requiredFor: ["createBaseGroup", "updateBaseGroup", "createBoardGroup", "createCardGroup", "updateGroup", "createFieldInBase", "createField", "updateField", "setValue"],
|
|
224
|
+
properties: {
|
|
225
|
+
name: { type: "string", description: "Group/field name", required: true },
|
|
226
|
+
position: { type: "number", description: "Position (required when creating groups/fields)", required: true },
|
|
227
|
+
content: { type: "string", description: "Field value (for setValue)" },
|
|
228
|
+
customFieldGroupId: { type: "string", description: "Group ID" },
|
|
229
|
+
customFieldId: { type: "string", description: "Field ID" },
|
|
230
|
+
baseCustomFieldGroupId: { type: "string", description: "Base group ID (for createFieldInBase)" },
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
}),
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Notifications tool - manages notifications and notification services
|
|
237
|
+
*/
|
|
238
|
+
export const notificationsTool = {
|
|
239
|
+
name: "notifications",
|
|
240
|
+
description: "Manage Planka notifications and notification services.",
|
|
241
|
+
operations: {
|
|
242
|
+
list: {
|
|
243
|
+
method: "GET",
|
|
244
|
+
path: "/notifications",
|
|
245
|
+
description: "Get all unread notifications",
|
|
246
|
+
},
|
|
247
|
+
get: {
|
|
248
|
+
method: "GET",
|
|
249
|
+
path: "/notifications/{id}",
|
|
250
|
+
description: "Get a specific notification",
|
|
251
|
+
},
|
|
252
|
+
markRead: {
|
|
253
|
+
method: "PATCH",
|
|
254
|
+
path: "/notifications/{id}",
|
|
255
|
+
description: "Mark a notification as read",
|
|
256
|
+
},
|
|
257
|
+
markAllRead: {
|
|
258
|
+
method: "POST",
|
|
259
|
+
path: "/notifications/read-all",
|
|
260
|
+
description: "Mark all notifications as read",
|
|
261
|
+
},
|
|
262
|
+
markCardRead: {
|
|
263
|
+
method: "POST",
|
|
264
|
+
path: "/cards/{id}/read-notifications",
|
|
265
|
+
description: "Mark all notifications for a card as read",
|
|
266
|
+
},
|
|
267
|
+
createUserService: {
|
|
268
|
+
method: "POST",
|
|
269
|
+
path: "/users/{userId}/notification-services",
|
|
270
|
+
description: "Create a user notification service",
|
|
271
|
+
},
|
|
272
|
+
createBoardService: {
|
|
273
|
+
method: "POST",
|
|
274
|
+
path: "/boards/{boardId}/notification-services",
|
|
275
|
+
description: "Create a board notification service",
|
|
276
|
+
},
|
|
277
|
+
updateService: {
|
|
278
|
+
method: "PATCH",
|
|
279
|
+
path: "/notification-services/{id}",
|
|
280
|
+
description: "Update a notification service",
|
|
281
|
+
},
|
|
282
|
+
deleteService: {
|
|
283
|
+
method: "DELETE",
|
|
284
|
+
path: "/notification-services/{id}",
|
|
285
|
+
description: "Delete a notification service",
|
|
286
|
+
},
|
|
287
|
+
testService: {
|
|
288
|
+
method: "POST",
|
|
289
|
+
path: "/notification-services/{id}/test",
|
|
290
|
+
description: "Test a notification service",
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
inputSchema: buildGroupedSchema(["list", "get", "markRead", "markAllRead", "markCardRead", "createUserService", "createBoardService", "updateService", "deleteService", "testService"], {
|
|
294
|
+
list: "List unread notifications",
|
|
295
|
+
get: "Get notification",
|
|
296
|
+
markRead: "Mark notification read",
|
|
297
|
+
markAllRead: "Mark all read",
|
|
298
|
+
markCardRead: "Mark card notifications read",
|
|
299
|
+
createUserService: "Create user notification service",
|
|
300
|
+
createBoardService: "Create board notification service",
|
|
301
|
+
updateService: "Update notification service",
|
|
302
|
+
deleteService: "Delete notification service",
|
|
303
|
+
testService: "Test notification service",
|
|
304
|
+
}, {
|
|
305
|
+
id: {
|
|
306
|
+
description: "Notification ID, Card ID, User ID, Board ID, or Service ID depending on action",
|
|
307
|
+
requiredFor: ["get", "markRead", "markCardRead", "createUserService", "createBoardService", "updateService", "deleteService", "testService"],
|
|
308
|
+
},
|
|
309
|
+
data: {
|
|
310
|
+
description: "Service data: { url: string, format: 'text'|'markdown'|'html' }. Note: user notification services can only be created for the authenticated user's own ID.",
|
|
311
|
+
requiredFor: ["markRead", "createUserService", "createBoardService", "updateService"],
|
|
312
|
+
properties: {
|
|
313
|
+
url: { type: "string", description: "Notification service URL", required: true },
|
|
314
|
+
format: { type: "string", enum: ["text", "markdown", "html"], description: "Message format", required: true },
|
|
315
|
+
isRead: { type: "boolean", description: "Mark notification as read (for markRead)" },
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
}),
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Background Images tool - manages project background images
|
|
322
|
+
*/
|
|
323
|
+
export const backgroundImagesTool = {
|
|
324
|
+
name: "backgroundImages",
|
|
325
|
+
description: "Manage background images for Planka projects.",
|
|
326
|
+
operations: {
|
|
327
|
+
upload: {
|
|
328
|
+
method: "POST",
|
|
329
|
+
path: "/projects/{projectId}/background-images",
|
|
330
|
+
description: "Upload a background image",
|
|
331
|
+
},
|
|
332
|
+
delete: {
|
|
333
|
+
method: "DELETE",
|
|
334
|
+
path: "/background-images/{id}",
|
|
335
|
+
description: "Delete a background image",
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
inputSchema: buildGroupedSchema(["upload", "delete"], {
|
|
339
|
+
upload: "Upload background image",
|
|
340
|
+
delete: "Delete background image",
|
|
341
|
+
}, {
|
|
342
|
+
id: {
|
|
343
|
+
description: "Project ID (for upload) or Background Image ID (for delete)",
|
|
344
|
+
requiredFor: ["upload", "delete"],
|
|
345
|
+
},
|
|
346
|
+
data: {
|
|
347
|
+
description: "Image data (for upload)",
|
|
348
|
+
requiredFor: ["upload"],
|
|
349
|
+
},
|
|
350
|
+
}),
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Card Extras tool - extended card operations
|
|
354
|
+
*/
|
|
355
|
+
export const cardExtrasTool = {
|
|
356
|
+
name: "cardExtras",
|
|
357
|
+
description: "Extended card operations in Planka.",
|
|
358
|
+
operations: {
|
|
359
|
+
duplicate: {
|
|
360
|
+
method: "POST",
|
|
361
|
+
path: "/cards/{id}/duplicate",
|
|
362
|
+
description: "Duplicate a card with all content",
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
inputSchema: buildGroupedSchema(["duplicate"], {
|
|
366
|
+
duplicate: "Duplicate a card",
|
|
367
|
+
}, {
|
|
368
|
+
id: {
|
|
369
|
+
description: "Card ID to duplicate",
|
|
370
|
+
requiredFor: ["duplicate"],
|
|
371
|
+
},
|
|
372
|
+
data: {
|
|
373
|
+
description: "Duplicate options: { position: number (required — Planka requires a position for the copy) }",
|
|
374
|
+
requiredFor: ["duplicate"],
|
|
375
|
+
properties: {
|
|
376
|
+
position: { type: "number", description: "Position for the duplicated card", required: true },
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
}),
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Comment Extras tool - extended comment operations
|
|
383
|
+
*/
|
|
384
|
+
export const commentExtrasTool = {
|
|
385
|
+
name: "commentExtras",
|
|
386
|
+
description: "Extended comment operations in Planka.",
|
|
387
|
+
operations: {
|
|
388
|
+
update: {
|
|
389
|
+
method: "PATCH",
|
|
390
|
+
path: "/comments/{id}",
|
|
391
|
+
description: "Update a comment",
|
|
392
|
+
},
|
|
393
|
+
delete: {
|
|
394
|
+
method: "DELETE",
|
|
395
|
+
path: "/comments/{id}",
|
|
396
|
+
description: "Delete a comment",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
inputSchema: buildGroupedSchema(["update", "delete"], {
|
|
400
|
+
update: "Update a comment",
|
|
401
|
+
delete: "Delete a comment",
|
|
402
|
+
}, {
|
|
403
|
+
id: {
|
|
404
|
+
description: "Comment ID",
|
|
405
|
+
requiredFor: ["update", "delete"],
|
|
406
|
+
},
|
|
407
|
+
data: {
|
|
408
|
+
description: "Comment data: { text: string }",
|
|
409
|
+
requiredFor: ["update"],
|
|
410
|
+
},
|
|
411
|
+
}),
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* List Extras tool - extended list operations
|
|
415
|
+
*/
|
|
416
|
+
export const listExtrasTool = {
|
|
417
|
+
name: "listExtras",
|
|
418
|
+
description: "Extended list operations in Planka.",
|
|
419
|
+
operations: {
|
|
420
|
+
clear: {
|
|
421
|
+
method: "POST",
|
|
422
|
+
path: "/lists/{id}/clear",
|
|
423
|
+
description: "Move all cards in a list to trash",
|
|
424
|
+
},
|
|
425
|
+
moveCards: {
|
|
426
|
+
method: "POST",
|
|
427
|
+
path: "/lists/{id}/move-cards",
|
|
428
|
+
description: "Move all cards to another list",
|
|
429
|
+
},
|
|
430
|
+
sort: {
|
|
431
|
+
method: "POST",
|
|
432
|
+
path: "/lists/{id}/sort",
|
|
433
|
+
description: "Sort cards in a list",
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
inputSchema: buildGroupedSchema(["clear", "moveCards", "sort"], {
|
|
437
|
+
clear: "Clear list (trash all cards)",
|
|
438
|
+
moveCards: "Move all cards to another list",
|
|
439
|
+
sort: "Sort cards in list",
|
|
440
|
+
}, {
|
|
441
|
+
id: {
|
|
442
|
+
description: "List ID",
|
|
443
|
+
requiredFor: ["clear", "moveCards", "sort"],
|
|
444
|
+
},
|
|
445
|
+
data: {
|
|
446
|
+
description: "Options: { listId?: string (target for moveCards), fieldName?: 'name'|'dueDate'|'createdAt' (for sort), order?: 'asc'|'desc' (for sort) }",
|
|
447
|
+
requiredFor: ["moveCards", "sort"],
|
|
448
|
+
},
|
|
449
|
+
}),
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* Task Extras tool - extended task operations
|
|
453
|
+
*/
|
|
454
|
+
export const taskExtrasTool = {
|
|
455
|
+
name: "taskExtras",
|
|
456
|
+
description: "Extended task and task list operations in Planka.",
|
|
457
|
+
operations: {
|
|
458
|
+
updateList: {
|
|
459
|
+
method: "PATCH",
|
|
460
|
+
path: "/task-lists/{id}",
|
|
461
|
+
description: "Update a task list",
|
|
462
|
+
},
|
|
463
|
+
deleteList: {
|
|
464
|
+
method: "DELETE",
|
|
465
|
+
path: "/task-lists/{id}",
|
|
466
|
+
description: "Delete a task list",
|
|
467
|
+
},
|
|
468
|
+
deleteTask: {
|
|
469
|
+
method: "DELETE",
|
|
470
|
+
path: "/tasks/{id}",
|
|
471
|
+
description: "Delete a task",
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
inputSchema: buildGroupedSchema(["updateList", "deleteList", "deleteTask"], {
|
|
475
|
+
updateList: "Update task list",
|
|
476
|
+
deleteList: "Delete task list",
|
|
477
|
+
deleteTask: "Delete task",
|
|
478
|
+
}, {
|
|
479
|
+
id: {
|
|
480
|
+
description: "Task List ID (for updateList, deleteList) or Task ID (for deleteTask)",
|
|
481
|
+
requiredFor: ["updateList", "deleteList", "deleteTask"],
|
|
482
|
+
},
|
|
483
|
+
data: {
|
|
484
|
+
description: "Task list data: { name?: string, position?: number }",
|
|
485
|
+
requiredFor: ["updateList"],
|
|
486
|
+
},
|
|
487
|
+
}),
|
|
488
|
+
};
|
|
489
|
+
/**
|
|
490
|
+
* Label Extras tool - extended label operations
|
|
491
|
+
*/
|
|
492
|
+
export const labelExtrasTool = {
|
|
493
|
+
name: "labelExtras",
|
|
494
|
+
description: "Extended label operations in Planka.",
|
|
495
|
+
operations: {
|
|
496
|
+
update: {
|
|
497
|
+
method: "PATCH",
|
|
498
|
+
path: "/labels/{id}",
|
|
499
|
+
description: "Update a label",
|
|
500
|
+
},
|
|
501
|
+
delete: {
|
|
502
|
+
method: "DELETE",
|
|
503
|
+
path: "/labels/{id}",
|
|
504
|
+
description: "Delete a label",
|
|
505
|
+
},
|
|
506
|
+
removeFromCard: {
|
|
507
|
+
method: "DELETE",
|
|
508
|
+
path: "/cards/{cardId}/card-labels/labelId:{labelId}",
|
|
509
|
+
description: "Remove a label from a card",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
inputSchema: buildGroupedSchema(["update", "delete", "removeFromCard"], {
|
|
513
|
+
update: "Update a label",
|
|
514
|
+
delete: "Delete a label",
|
|
515
|
+
removeFromCard: "Remove label from card",
|
|
516
|
+
}, {
|
|
517
|
+
id: {
|
|
518
|
+
description: "Label ID (for update, delete) or Card ID (for removeFromCard)",
|
|
519
|
+
requiredFor: ["update", "delete", "removeFromCard"],
|
|
520
|
+
},
|
|
521
|
+
data: {
|
|
522
|
+
description: "Label data: { name?: string, color?: string, position?: number } for update; { labelId: string, cardId: string } for removeFromCard",
|
|
523
|
+
requiredFor: ["update", "removeFromCard"],
|
|
524
|
+
},
|
|
525
|
+
}),
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Card Member Extras tool - extended card membership operations
|
|
529
|
+
*/
|
|
530
|
+
export const cardMemberExtrasTool = {
|
|
531
|
+
name: "cardMemberExtras",
|
|
532
|
+
description: "Extended card membership operations in Planka.",
|
|
533
|
+
operations: {
|
|
534
|
+
remove: {
|
|
535
|
+
method: "DELETE",
|
|
536
|
+
path: "/cards/{cardId}/card-memberships/userId:{userId}",
|
|
537
|
+
description: "Remove a user from a card",
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
inputSchema: buildGroupedSchema(["remove"], {
|
|
541
|
+
remove: "Remove user from card",
|
|
542
|
+
}, {
|
|
543
|
+
id: {
|
|
544
|
+
description: "Card ID",
|
|
545
|
+
requiredFor: ["remove"],
|
|
546
|
+
},
|
|
547
|
+
data: {
|
|
548
|
+
description: "Membership data: { userId: string, cardId: string }",
|
|
549
|
+
requiredFor: ["remove"],
|
|
550
|
+
properties: {
|
|
551
|
+
userId: { type: "string", description: "User ID to remove", required: true },
|
|
552
|
+
cardId: { type: "string", description: "Card ID", required: true },
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
}),
|
|
556
|
+
};
|
|
557
|
+
/**
|
|
558
|
+
* User Info tool - get user information (non-admin)
|
|
559
|
+
*/
|
|
560
|
+
export const userInfoTool = {
|
|
561
|
+
name: "userInfo",
|
|
562
|
+
description: "Get user profile information.",
|
|
563
|
+
operations: {
|
|
564
|
+
get: {
|
|
565
|
+
method: "GET",
|
|
566
|
+
path: "/users/{id}",
|
|
567
|
+
description: "Get a user's profile",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
inputSchema: buildGroupedSchema(["get"], {
|
|
571
|
+
get: "Get user profile",
|
|
572
|
+
}, {
|
|
573
|
+
id: {
|
|
574
|
+
description: "User ID",
|
|
575
|
+
requiredFor: ["get"],
|
|
576
|
+
},
|
|
577
|
+
}),
|
|
578
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool definition for Planka MCP server
|
|
3
|
+
* Supports grouped tools with multiple actions/operations
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Defines a single API operation within a grouped tool
|
|
7
|
+
*/
|
|
8
|
+
export interface ToolOperation {
|
|
9
|
+
/** HTTP method */
|
|
10
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
11
|
+
/** API path with parameter placeholders (e.g., /projects/{id}) */
|
|
12
|
+
path: string;
|
|
13
|
+
/** Whether this endpoint requires authentication */
|
|
14
|
+
requiresAuth?: boolean;
|
|
15
|
+
/** Description of this specific operation */
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Grouped tool definition - multiple operations under one tool
|
|
20
|
+
*/
|
|
21
|
+
export interface GroupedToolDefinition {
|
|
22
|
+
/** Tool name (lowercase, used as MCP tool identifier) */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Human-readable description of what the tool does */
|
|
25
|
+
description: string;
|
|
26
|
+
/** Map of action names to their operations */
|
|
27
|
+
operations: Record<string, ToolOperation>;
|
|
28
|
+
/** Input schema for MCP tool */
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object";
|
|
31
|
+
properties: Record<string, any>;
|
|
32
|
+
required: string[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** JSON Schema property definition for a `data` field. */
|
|
36
|
+
export interface DataProperty {
|
|
37
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
38
|
+
description?: string;
|
|
39
|
+
enum?: (string | number)[];
|
|
40
|
+
required?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Helper to build input schema for grouped tools
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildGroupedSchema(actions: string[], actionDescriptions: Record<string, string>, params?: {
|
|
46
|
+
id?: {
|
|
47
|
+
description: string;
|
|
48
|
+
requiredFor?: string[];
|
|
49
|
+
};
|
|
50
|
+
data?: {
|
|
51
|
+
description: string;
|
|
52
|
+
requiredFor?: string[];
|
|
53
|
+
/** Typed fields exposed as real JSON Schema so clients know what to send. */
|
|
54
|
+
properties?: Record<string, DataProperty>;
|
|
55
|
+
};
|
|
56
|
+
query?: Record<string, {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}>;
|
|
60
|
+
extra?: Record<string, any>;
|
|
61
|
+
}): GroupedToolDefinition["inputSchema"];
|