@omnicoreos/planka-mcp 0.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/CONTRIBUTING.md +37 -0
  3. package/CREDITS.md +39 -0
  4. package/LICENSE +22 -0
  5. package/README.es.md +213 -0
  6. package/README.md +213 -0
  7. package/dist/client.d.ts +96 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +281 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/errors.d.ts +85 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/errors.js +226 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/identity.generated.d.ts +3 -0
  16. package/dist/identity.generated.d.ts.map +1 -0
  17. package/dist/identity.generated.js +4 -0
  18. package/dist/identity.generated.js.map +1 -0
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +93 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/operations/attachments.d.ts +34 -0
  24. package/dist/operations/attachments.d.ts.map +1 -0
  25. package/dist/operations/attachments.js +89 -0
  26. package/dist/operations/attachments.js.map +1 -0
  27. package/dist/operations/board-id.d.ts +9 -0
  28. package/dist/operations/board-id.d.ts.map +1 -0
  29. package/dist/operations/board-id.js +86 -0
  30. package/dist/operations/board-id.js.map +1 -0
  31. package/dist/operations/boards.d.ts +143 -0
  32. package/dist/operations/boards.d.ts.map +1 -0
  33. package/dist/operations/boards.js +391 -0
  34. package/dist/operations/boards.js.map +1 -0
  35. package/dist/operations/cards.d.ts +36 -0
  36. package/dist/operations/cards.d.ts.map +1 -0
  37. package/dist/operations/cards.js +81 -0
  38. package/dist/operations/cards.js.map +1 -0
  39. package/dist/operations/comments.d.ts +28 -0
  40. package/dist/operations/comments.d.ts.map +1 -0
  41. package/dist/operations/comments.js +53 -0
  42. package/dist/operations/comments.js.map +1 -0
  43. package/dist/operations/labels.d.ts +60 -0
  44. package/dist/operations/labels.d.ts.map +1 -0
  45. package/dist/operations/labels.js +146 -0
  46. package/dist/operations/labels.js.map +1 -0
  47. package/dist/operations/lists.d.ts +15 -0
  48. package/dist/operations/lists.d.ts.map +1 -0
  49. package/dist/operations/lists.js +40 -0
  50. package/dist/operations/lists.js.map +1 -0
  51. package/dist/operations/projects.d.ts +24 -0
  52. package/dist/operations/projects.d.ts.map +1 -0
  53. package/dist/operations/projects.js +61 -0
  54. package/dist/operations/projects.js.map +1 -0
  55. package/dist/operations/tasks.d.ts +30 -0
  56. package/dist/operations/tasks.d.ts.map +1 -0
  57. package/dist/operations/tasks.js +111 -0
  58. package/dist/operations/tasks.js.map +1 -0
  59. package/dist/schemas/entities.d.ts +389 -0
  60. package/dist/schemas/entities.d.ts.map +1 -0
  61. package/dist/schemas/entities.js +202 -0
  62. package/dist/schemas/entities.js.map +1 -0
  63. package/dist/schemas/requests.d.ts +539 -0
  64. package/dist/schemas/requests.d.ts.map +1 -0
  65. package/dist/schemas/requests.js +187 -0
  66. package/dist/schemas/requests.js.map +1 -0
  67. package/dist/schemas/responses.d.ts +2626 -0
  68. package/dist/schemas/responses.d.ts.map +1 -0
  69. package/dist/schemas/responses.js +75 -0
  70. package/dist/schemas/responses.js.map +1 -0
  71. package/dist/tools/attachments.d.ts +270 -0
  72. package/dist/tools/attachments.d.ts.map +1 -0
  73. package/dist/tools/attachments.js +247 -0
  74. package/dist/tools/attachments.js.map +1 -0
  75. package/dist/tools/cards.d.ts +401 -0
  76. package/dist/tools/cards.d.ts.map +1 -0
  77. package/dist/tools/cards.js +368 -0
  78. package/dist/tools/cards.js.map +1 -0
  79. package/dist/tools/comments.d.ts +217 -0
  80. package/dist/tools/comments.d.ts.map +1 -0
  81. package/dist/tools/comments.js +208 -0
  82. package/dist/tools/comments.js.map +1 -0
  83. package/dist/tools/index.d.ts +1293 -0
  84. package/dist/tools/index.d.ts.map +1 -0
  85. package/dist/tools/index.js +62 -0
  86. package/dist/tools/index.js.map +1 -0
  87. package/dist/tools/labels.d.ts +214 -0
  88. package/dist/tools/labels.d.ts.map +1 -0
  89. package/dist/tools/labels.js +302 -0
  90. package/dist/tools/labels.js.map +1 -0
  91. package/dist/tools/lists.d.ts +117 -0
  92. package/dist/tools/lists.d.ts.map +1 -0
  93. package/dist/tools/lists.js +178 -0
  94. package/dist/tools/lists.js.map +1 -0
  95. package/dist/tools/navigation.d.ts +106 -0
  96. package/dist/tools/navigation.d.ts.map +1 -0
  97. package/dist/tools/navigation.js +151 -0
  98. package/dist/tools/navigation.js.map +1 -0
  99. package/dist/tools/queries.d.ts +380 -0
  100. package/dist/tools/queries.d.ts.map +1 -0
  101. package/dist/tools/queries.js +256 -0
  102. package/dist/tools/queries.js.map +1 -0
  103. package/dist/tools/tasks.d.ts +223 -0
  104. package/dist/tools/tasks.d.ts.map +1 -0
  105. package/dist/tools/tasks.js +169 -0
  106. package/dist/tools/tasks.js.map +1 -0
  107. package/docs/planka-2x-gotchas.md +192 -0
  108. package/docs/tools.md +659 -0
  109. package/docs/troubleshooting.md +138 -0
  110. package/package.json +71 -0
  111. package/project.identity.json +7 -0
  112. package/scripts/bootstrap-board.mjs +160 -0
  113. package/scripts/lib/planka-api.mjs +244 -0
  114. package/scripts/lib/workflow-template.mjs +26 -0
  115. package/scripts/setup.mjs +236 -0
  116. package/scripts/setup.sh +48 -0
  117. package/scripts/sync-identity.mjs +57 -0
  118. package/server.json +43 -0
  119. package/tests/smoke/planka-smoke.mjs +920 -0
  120. package/workflow/README.md +232 -0
  121. package/workflow/board-template.md +115 -0
  122. package/workflow/skills/planka-close-card/SKILL.md +81 -0
  123. package/workflow/skills/planka-orchestrator/SKILL.md +126 -0
  124. package/workflow/worktrees/README.md +104 -0
  125. package/workflow/worktrees/wt.conf.example +24 -0
  126. package/workflow/worktrees/wt.sh +345 -0
@@ -0,0 +1,368 @@
1
+ /**
2
+ * Card tools for PLANKA MCP server.
3
+ */
4
+ import { createCard, getCard, updateCard, moveCard, deleteCard, } from "../operations/cards.js";
5
+ import { createTasks } from "../operations/tasks.js";
6
+ import { addLabelToCard } from "../operations/labels.js";
7
+ import { PlankaError } from "../errors.js";
8
+ /**
9
+ * Tool: planka_create_card
10
+ * Create a new card on a board.
11
+ */
12
+ export const createCardTool = {
13
+ name: "planka_create_card",
14
+ description: "Create a new card on a board. Optionally add tasks (checklist items) at the same time.",
15
+ inputSchema: {
16
+ type: "object",
17
+ properties: {
18
+ listId: {
19
+ type: "string",
20
+ description: "The list to create the card in",
21
+ },
22
+ name: {
23
+ type: "string",
24
+ description: "Card title",
25
+ },
26
+ description: {
27
+ type: "string",
28
+ description: "Card description (markdown supported)",
29
+ },
30
+ tasks: {
31
+ type: "array",
32
+ items: { type: "string" },
33
+ description: "Optional: Task names to add as a checklist",
34
+ },
35
+ dueDate: {
36
+ type: "string",
37
+ description: "Due date in ISO format",
38
+ },
39
+ labelIds: {
40
+ type: "array",
41
+ items: { type: "string" },
42
+ description: "Optional: Label IDs to attach",
43
+ },
44
+ },
45
+ required: ["listId", "name"],
46
+ },
47
+ handler: async (params) => {
48
+ try {
49
+ // Create the card
50
+ const card = await createCard({
51
+ listId: params.listId,
52
+ name: params.name,
53
+ description: params.description,
54
+ dueDate: params.dueDate,
55
+ });
56
+ // Add tasks if provided
57
+ if (params.tasks && params.tasks.length > 0) {
58
+ await createTasks({
59
+ cardId: card.id,
60
+ tasks: params.tasks.map((name) => ({ name })),
61
+ });
62
+ }
63
+ // Add labels if provided
64
+ let labelsAttached = 0;
65
+ const labelErrors = [];
66
+ if (params.labelIds && params.labelIds.length > 0) {
67
+ for (const labelId of params.labelIds) {
68
+ try {
69
+ await addLabelToCard({ cardId: card.id, labelId });
70
+ labelsAttached++;
71
+ }
72
+ catch (error) {
73
+ // Track failed labels but continue
74
+ labelErrors.push(labelId);
75
+ }
76
+ }
77
+ }
78
+ return {
79
+ content: [
80
+ {
81
+ type: "text",
82
+ text: JSON.stringify({
83
+ success: true,
84
+ card: {
85
+ id: card.id,
86
+ name: card.name,
87
+ listId: card.listId,
88
+ },
89
+ tasksCreated: params.tasks?.length || 0,
90
+ labelsAttached,
91
+ ...(labelErrors.length > 0 && { labelErrors }),
92
+ }, null, 2),
93
+ },
94
+ ],
95
+ };
96
+ }
97
+ catch (error) {
98
+ if (error instanceof PlankaError) {
99
+ return {
100
+ content: [{ type: "text", text: `Error: ${error.message}` }],
101
+ isError: true,
102
+ };
103
+ }
104
+ throw error;
105
+ }
106
+ },
107
+ };
108
+ /**
109
+ * Tool: planka_get_card
110
+ * Get full details of a card.
111
+ */
112
+ export const getCardTool = {
113
+ name: "planka_get_card",
114
+ description: "Get full details of a card including tasks, comments, labels, and attachments.",
115
+ inputSchema: {
116
+ type: "object",
117
+ properties: {
118
+ cardId: {
119
+ type: "string",
120
+ description: "The card ID",
121
+ },
122
+ },
123
+ required: ["cardId"],
124
+ },
125
+ handler: async (params) => {
126
+ try {
127
+ const details = await getCard({ cardId: params.cardId });
128
+ const formatted = {
129
+ card: {
130
+ id: details.card.id,
131
+ name: details.card.name,
132
+ description: details.card.description,
133
+ listId: details.card.listId,
134
+ boardId: details.card.boardId,
135
+ dueDate: details.card.dueDate,
136
+ isCompleted: details.card.isCompleted,
137
+ createdAt: details.card.createdAt,
138
+ },
139
+ tasks: details.tasks.map((t) => ({
140
+ id: t.id,
141
+ name: t.name,
142
+ isCompleted: t.isCompleted,
143
+ })),
144
+ comments: details.comments.map((c) => ({
145
+ id: c.id,
146
+ text: c.text,
147
+ author: c.authorName,
148
+ createdAt: c.createdAt,
149
+ })),
150
+ labels: details.cardLabels.map((cl) => {
151
+ const label = details.labels.find((l) => l.id === cl.labelId);
152
+ return {
153
+ id: cl.labelId,
154
+ name: label?.name,
155
+ color: label?.color,
156
+ };
157
+ }),
158
+ attachments: details.attachments.map((a) => ({
159
+ id: a.id,
160
+ name: a.name,
161
+ })),
162
+ };
163
+ return {
164
+ content: [
165
+ {
166
+ type: "text",
167
+ text: JSON.stringify(formatted, null, 2),
168
+ },
169
+ ],
170
+ };
171
+ }
172
+ catch (error) {
173
+ if (error instanceof PlankaError) {
174
+ return {
175
+ content: [{ type: "text", text: `Error: ${error.message}` }],
176
+ isError: true,
177
+ };
178
+ }
179
+ throw error;
180
+ }
181
+ },
182
+ };
183
+ /**
184
+ * Tool: planka_update_card
185
+ * Update a card's properties.
186
+ */
187
+ export const updateCardTool = {
188
+ name: "planka_update_card",
189
+ description: "Update a card's properties (name, description, due date, completion status).",
190
+ inputSchema: {
191
+ type: "object",
192
+ properties: {
193
+ cardId: {
194
+ type: "string",
195
+ description: "The card ID",
196
+ },
197
+ name: {
198
+ type: "string",
199
+ description: "New card title",
200
+ },
201
+ description: {
202
+ type: ["string", "null"],
203
+ description: "New description (null to clear)",
204
+ },
205
+ dueDate: {
206
+ type: ["string", "null"],
207
+ description: "New due date (null to clear)",
208
+ },
209
+ isCompleted: {
210
+ type: "boolean",
211
+ description: "Mark card as complete/incomplete",
212
+ },
213
+ },
214
+ required: ["cardId"],
215
+ },
216
+ handler: async (params) => {
217
+ try {
218
+ const { cardId, ...updates } = params;
219
+ // Only include defined fields
220
+ const patch = { cardId };
221
+ if (updates.name !== undefined)
222
+ patch.name = updates.name;
223
+ if (updates.description !== undefined)
224
+ patch.description = updates.description;
225
+ if (updates.dueDate !== undefined)
226
+ patch.dueDate = updates.dueDate;
227
+ if (updates.isCompleted !== undefined)
228
+ patch.isCompleted = updates.isCompleted;
229
+ const card = await updateCard(patch);
230
+ return {
231
+ content: [
232
+ {
233
+ type: "text",
234
+ text: JSON.stringify({
235
+ success: true,
236
+ card: {
237
+ id: card.id,
238
+ name: card.name,
239
+ description: card.description,
240
+ dueDate: card.dueDate,
241
+ isCompleted: card.isCompleted,
242
+ },
243
+ }, null, 2),
244
+ },
245
+ ],
246
+ };
247
+ }
248
+ catch (error) {
249
+ if (error instanceof PlankaError) {
250
+ return {
251
+ content: [{ type: "text", text: `Error: ${error.message}` }],
252
+ isError: true,
253
+ };
254
+ }
255
+ throw error;
256
+ }
257
+ },
258
+ };
259
+ /**
260
+ * Tool: planka_move_card
261
+ * Move a card to a different list or position.
262
+ */
263
+ export const moveCardTool = {
264
+ name: "planka_move_card",
265
+ description: "Move a card to a different list or position. Use this for workflow transitions (e.g., 'To Do' -> 'In Progress').",
266
+ inputSchema: {
267
+ type: "object",
268
+ properties: {
269
+ cardId: {
270
+ type: "string",
271
+ description: "The card ID",
272
+ },
273
+ listId: {
274
+ type: "string",
275
+ description: "Target list ID",
276
+ },
277
+ position: {
278
+ type: "number",
279
+ description: "Position in the list (lower = higher). Default: end of list",
280
+ },
281
+ },
282
+ required: ["cardId", "listId"],
283
+ },
284
+ handler: async (params) => {
285
+ try {
286
+ const card = await moveCard({
287
+ cardId: params.cardId,
288
+ listId: params.listId,
289
+ position: params.position ?? 65536,
290
+ });
291
+ return {
292
+ content: [
293
+ {
294
+ type: "text",
295
+ text: JSON.stringify({
296
+ success: true,
297
+ card: {
298
+ id: card.id,
299
+ name: card.name,
300
+ listId: card.listId,
301
+ },
302
+ }, null, 2),
303
+ },
304
+ ],
305
+ };
306
+ }
307
+ catch (error) {
308
+ if (error instanceof PlankaError) {
309
+ return {
310
+ content: [{ type: "text", text: `Error: ${error.message}` }],
311
+ isError: true,
312
+ };
313
+ }
314
+ throw error;
315
+ }
316
+ },
317
+ };
318
+ /**
319
+ * Tool: planka_delete_card
320
+ * Permanently delete a card.
321
+ */
322
+ export const deleteCardTool = {
323
+ name: "planka_delete_card",
324
+ description: "Permanently delete a card. This cannot be undone.",
325
+ inputSchema: {
326
+ type: "object",
327
+ properties: {
328
+ cardId: {
329
+ type: "string",
330
+ description: "The card ID to delete",
331
+ },
332
+ },
333
+ required: ["cardId"],
334
+ },
335
+ handler: async (params) => {
336
+ try {
337
+ await deleteCard({ cardId: params.cardId });
338
+ return {
339
+ content: [
340
+ {
341
+ type: "text",
342
+ text: JSON.stringify({
343
+ success: true,
344
+ message: `Card ${params.cardId} deleted`,
345
+ }, null, 2),
346
+ },
347
+ ],
348
+ };
349
+ }
350
+ catch (error) {
351
+ if (error instanceof PlankaError) {
352
+ return {
353
+ content: [{ type: "text", text: `Error: ${error.message}` }],
354
+ isError: true,
355
+ };
356
+ }
357
+ throw error;
358
+ }
359
+ },
360
+ };
361
+ export const cardTools = [
362
+ createCardTool,
363
+ getCardTool,
364
+ updateCardTool,
365
+ moveCardTool,
366
+ deleteCardTool,
367
+ ];
368
+ //# sourceMappingURL=cards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/tools/cards.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,GACX,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,wFAAwF;IAC1F,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,YAAY;aAC1B;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,4CAA4C;aAC1D;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;aACtC;YACD,QAAQ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AE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;oBACrE,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,cAAc;IACd,WAAW;IACX,cAAc;IACd,YAAY;IACZ,cAAc;CACf,CAAC"}
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Tool: planka_add_comment
3
+ * Add a comment to a card.
4
+ */
5
+ export declare const addCommentTool: {
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: "object";
10
+ properties: {
11
+ cardId: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ text: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ };
20
+ required: string[];
21
+ };
22
+ handler: (params: {
23
+ cardId: string;
24
+ text: string;
25
+ }) => Promise<{
26
+ content: {
27
+ type: "text";
28
+ text: string;
29
+ }[];
30
+ isError?: undefined;
31
+ } | {
32
+ content: {
33
+ type: "text";
34
+ text: string;
35
+ }[];
36
+ isError: boolean;
37
+ }>;
38
+ };
39
+ /**
40
+ * Tool: planka_get_comments
41
+ * Get all comments on a card.
42
+ */
43
+ export declare const getCommentsTool: {
44
+ name: string;
45
+ description: string;
46
+ inputSchema: {
47
+ type: "object";
48
+ properties: {
49
+ cardId: {
50
+ type: string;
51
+ description: string;
52
+ };
53
+ };
54
+ required: string[];
55
+ };
56
+ handler: (params: {
57
+ cardId: string;
58
+ }) => Promise<{
59
+ content: {
60
+ type: "text";
61
+ text: string;
62
+ }[];
63
+ isError?: undefined;
64
+ } | {
65
+ content: {
66
+ type: "text";
67
+ text: string;
68
+ }[];
69
+ isError: boolean;
70
+ }>;
71
+ };
72
+ /**
73
+ * Tool: planka_manage_comment
74
+ * Update or delete an existing comment.
75
+ */
76
+ export declare const manageCommentTool: {
77
+ name: string;
78
+ description: string;
79
+ inputSchema: {
80
+ type: "object";
81
+ properties: {
82
+ action: {
83
+ type: string;
84
+ enum: string[];
85
+ description: string;
86
+ };
87
+ commentId: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ text: {
92
+ type: string;
93
+ description: string;
94
+ };
95
+ };
96
+ required: string[];
97
+ };
98
+ handler: (params: {
99
+ action: "update" | "delete";
100
+ commentId: string;
101
+ text?: string;
102
+ }) => Promise<{
103
+ content: {
104
+ type: "text";
105
+ text: string;
106
+ }[];
107
+ isError: boolean;
108
+ } | {
109
+ content: {
110
+ type: "text";
111
+ text: string;
112
+ }[];
113
+ isError?: undefined;
114
+ }>;
115
+ };
116
+ export declare const commentTools: ({
117
+ name: string;
118
+ description: string;
119
+ inputSchema: {
120
+ type: "object";
121
+ properties: {
122
+ cardId: {
123
+ type: string;
124
+ description: string;
125
+ };
126
+ text: {
127
+ type: string;
128
+ description: string;
129
+ };
130
+ };
131
+ required: string[];
132
+ };
133
+ handler: (params: {
134
+ cardId: string;
135
+ text: string;
136
+ }) => Promise<{
137
+ content: {
138
+ type: "text";
139
+ text: string;
140
+ }[];
141
+ isError?: undefined;
142
+ } | {
143
+ content: {
144
+ type: "text";
145
+ text: string;
146
+ }[];
147
+ isError: boolean;
148
+ }>;
149
+ } | {
150
+ name: string;
151
+ description: string;
152
+ inputSchema: {
153
+ type: "object";
154
+ properties: {
155
+ cardId: {
156
+ type: string;
157
+ description: string;
158
+ };
159
+ };
160
+ required: string[];
161
+ };
162
+ handler: (params: {
163
+ cardId: string;
164
+ }) => Promise<{
165
+ content: {
166
+ type: "text";
167
+ text: string;
168
+ }[];
169
+ isError?: undefined;
170
+ } | {
171
+ content: {
172
+ type: "text";
173
+ text: string;
174
+ }[];
175
+ isError: boolean;
176
+ }>;
177
+ } | {
178
+ name: string;
179
+ description: string;
180
+ inputSchema: {
181
+ type: "object";
182
+ properties: {
183
+ action: {
184
+ type: string;
185
+ enum: string[];
186
+ description: string;
187
+ };
188
+ commentId: {
189
+ type: string;
190
+ description: string;
191
+ };
192
+ text: {
193
+ type: string;
194
+ description: string;
195
+ };
196
+ };
197
+ required: string[];
198
+ };
199
+ handler: (params: {
200
+ action: "update" | "delete";
201
+ commentId: string;
202
+ text?: string;
203
+ }) => Promise<{
204
+ content: {
205
+ type: "text";
206
+ text: string;
207
+ }[];
208
+ isError: boolean;
209
+ } | {
210
+ content: {
211
+ type: "text";
212
+ text: string;
213
+ }[];
214
+ isError?: undefined;
215
+ }>;
216
+ })[];
217
+ //# sourceMappingURL=comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/tools/comments.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;sBAkBD;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;CAoCzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;sBAaF;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;CAmC3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;sBAuBJ;QACtB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;;;;;;;;;;;;;CA8EF,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;sBA3MC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;sBAuDhC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAgElB;QACtB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;;;;;;;;;;;;;IAgF6E,CAAC"}