@chykalophia/clickup-mcp-server 3.4.0 → 4.1.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/build/clickup-client/attachments-enhanced.js +4 -1
- package/build/clickup-client/attachments-enhanced.js.map +1 -1
- package/build/clickup-client/auth.js.map +1 -1
- package/build/clickup-client/chat-enhanced.js +3 -1
- package/build/clickup-client/chat-enhanced.js.map +1 -1
- package/build/clickup-client/checklists.js.map +1 -1
- package/build/clickup-client/comments-enhanced.js +4 -3
- package/build/clickup-client/comments-enhanced.js.map +1 -1
- package/build/clickup-client/comments.js +2 -1
- package/build/clickup-client/comments.js.map +1 -1
- package/build/clickup-client/custom-fields-enhanced.js +7 -7
- package/build/clickup-client/custom-fields-enhanced.js.map +1 -1
- package/build/clickup-client/dependencies-enhanced.js.map +1 -1
- package/build/clickup-client/docs-enhanced.d.ts +1 -1
- package/build/clickup-client/docs-enhanced.js +35 -7
- package/build/clickup-client/docs-enhanced.js.map +1 -1
- package/build/clickup-client/docs.js +6 -6
- package/build/clickup-client/docs.js.map +1 -1
- package/build/clickup-client/folders.js.map +1 -1
- package/build/clickup-client/goals-enhanced.js.map +1 -1
- package/build/clickup-client/index.js +2 -2
- package/build/clickup-client/index.js.map +1 -1
- package/build/clickup-client/lists.js.map +1 -1
- package/build/clickup-client/secure-client.js +7 -6
- package/build/clickup-client/secure-client.js.map +1 -1
- package/build/clickup-client/tasks.d.ts +41 -0
- package/build/clickup-client/tasks.js +128 -2
- package/build/clickup-client/tasks.js.map +1 -1
- package/build/clickup-client/time-tracking-enhanced.js +2 -6
- package/build/clickup-client/time-tracking-enhanced.js.map +1 -1
- package/build/clickup-client/views-enhanced.js.map +1 -1
- package/build/clickup-client/webhooks-enhanced.js +4 -3
- package/build/clickup-client/webhooks-enhanced.js.map +1 -1
- package/build/index-efficiency-simple.js +81 -50
- package/build/index-efficiency-simple.js.map +1 -1
- package/build/index-enhanced.js +1 -0
- package/build/index-enhanced.js.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/resources/checklist-resources.js +1 -0
- package/build/resources/checklist-resources.js.map +1 -1
- package/build/resources/comment-resources.js +1 -0
- package/build/resources/comment-resources.js.map +1 -1
- package/build/resources/doc-resources.js +1 -0
- package/build/resources/doc-resources.js.map +1 -1
- package/build/resources/folder-resources.js +1 -0
- package/build/resources/folder-resources.js.map +1 -1
- package/build/resources/list-resources.js +1 -0
- package/build/resources/list-resources.js.map +1 -1
- package/build/resources/space-resources.js +1 -0
- package/build/resources/space-resources.js.map +1 -1
- package/build/resources/task-resources.js +1 -0
- package/build/resources/task-resources.js.map +1 -1
- package/build/schemas/attachments-schemas.js +16 -10
- package/build/schemas/attachments-schemas.js.map +1 -1
- package/build/schemas/chat-schemas.d.ts +7 -7
- package/build/schemas/chat-schemas.js +22 -6
- package/build/schemas/chat-schemas.js.map +1 -1
- package/build/schemas/custom-field-schemas.d.ts +80 -80
- package/build/schemas/custom-field-schemas.js +27 -11
- package/build/schemas/custom-field-schemas.js.map +1 -1
- package/build/schemas/dependencies-schemas.d.ts +11 -11
- package/build/schemas/dependencies-schemas.js +14 -11
- package/build/schemas/dependencies-schemas.js.map +1 -1
- package/build/schemas/document-schemas.d.ts +14 -14
- package/build/schemas/document-schemas.js +38 -14
- package/build/schemas/document-schemas.js.map +1 -1
- package/build/schemas/goals-schemas.d.ts +50 -50
- package/build/schemas/goals-schemas.js +4 -1
- package/build/schemas/goals-schemas.js.map +1 -1
- package/build/schemas/task-schemas.d.ts +382 -0
- package/build/schemas/task-schemas.js +115 -0
- package/build/schemas/task-schemas.js.map +1 -0
- package/build/schemas/time-tracking-schemas.d.ts +20 -20
- package/build/schemas/time-tracking-schemas.js +11 -10
- package/build/schemas/time-tracking-schemas.js.map +1 -1
- package/build/schemas/views-schemas.d.ts +2 -2
- package/build/schemas/views-schemas.js +9 -9
- package/build/schemas/views-schemas.js.map +1 -1
- package/build/schemas/webhook-schemas.js +3 -3
- package/build/schemas/webhook-schemas.js.map +1 -1
- package/build/tools/attachments-tools-setup.js +146 -65
- package/build/tools/attachments-tools-setup.js.map +1 -1
- package/build/tools/chat-tools.js +233 -106
- package/build/tools/chat-tools.js.map +1 -1
- package/build/tools/checklist-tools.js +13 -5
- package/build/tools/checklist-tools.js.map +1 -1
- package/build/tools/comment-tools.js +35 -14
- package/build/tools/comment-tools.js.map +1 -1
- package/build/tools/custom-field-tools.js +192 -67
- package/build/tools/custom-field-tools.js.map +1 -1
- package/build/tools/dependencies-tools-setup.js +133 -58
- package/build/tools/dependencies-tools-setup.js.map +1 -1
- package/build/tools/doc-tools-enhanced.js +153 -45
- package/build/tools/doc-tools-enhanced.js.map +1 -1
- package/build/tools/doc-tools.js +4 -1
- package/build/tools/doc-tools.js.map +1 -1
- package/build/tools/goals-tools.js +113 -41
- package/build/tools/goals-tools.js.map +1 -1
- package/build/tools/helper-tools.js +131 -53
- package/build/tools/helper-tools.js.map +1 -1
- package/build/tools/space-tools.js.map +1 -1
- package/build/tools/task-tools.js +501 -21
- package/build/tools/task-tools.js.map +1 -1
- package/build/tools/test-task-update.d.ts +2 -0
- package/build/tools/test-task-update.js +124 -0
- package/build/tools/test-task-update.js.map +1 -0
- package/build/tools/time-tracking-tools.js +105 -36
- package/build/tools/time-tracking-tools.js.map +1 -1
- package/build/tools/views-tools-setup.js +124 -61
- package/build/tools/views-tools-setup.js.map +1 -1
- package/build/tools/webhook-tools-setup.js +175 -72
- package/build/tools/webhook-tools-setup.js.map +1 -1
- package/build/tools/webhook-tools.js +51 -18
- package/build/tools/webhook-tools.js.map +1 -1
- package/build/utils/clickup-comment-formatter.js +55 -25
- package/build/utils/clickup-comment-formatter.js.map +1 -1
- package/build/utils/context-aware-suggestions.js +42 -22
- package/build/utils/context-aware-suggestions.js.map +1 -1
- package/build/utils/error-handling.js +29 -13
- package/build/utils/error-handling.js.map +1 -1
- package/build/utils/markdown-styling.js.map +1 -1
- package/build/utils/markdown.d.ts +5 -4
- package/build/utils/markdown.js +24 -19
- package/build/utils/markdown.js.map +1 -1
- package/build/utils/security.d.ts +76 -0
- package/build/utils/security.js +280 -25
- package/build/utils/security.js.map +1 -1
- package/build/utils/tool-efficiency.js +21 -12
- package/build/utils/tool-efficiency.js.map +1 -1
- package/package.json +5 -5
- package/LICENSE +0 -21
- package/README.md +0 -510
|
@@ -16,18 +16,22 @@ export function setupChatTools(server) {
|
|
|
16
16
|
const filter = GetChannelsFilterSchema.parse(args);
|
|
17
17
|
const result = await chatClient.getChannels(filter);
|
|
18
18
|
return {
|
|
19
|
-
content: [
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
20
21
|
type: 'text',
|
|
21
22
|
text: `Found ${result.channels.length} channels:\n\n${JSON.stringify(result, null, 2)}`
|
|
22
|
-
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
catch (error) {
|
|
26
28
|
return {
|
|
27
|
-
content: [
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
28
31
|
type: 'text',
|
|
29
32
|
text: `Error getting chat channels: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
30
|
-
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
31
35
|
isError: true
|
|
32
36
|
};
|
|
33
37
|
}
|
|
@@ -36,26 +40,36 @@ export function setupChatTools(server) {
|
|
|
36
40
|
workspace_id: z.string().min(1).describe('The ID of the workspace to create the channel in'),
|
|
37
41
|
name: z.string().min(1).max(255).describe('The name of the channel'),
|
|
38
42
|
description: z.string().optional().describe('Optional description of the channel'),
|
|
39
|
-
type: z
|
|
40
|
-
|
|
43
|
+
type: z
|
|
44
|
+
.enum(['public', 'private', 'direct'])
|
|
45
|
+
.default('public')
|
|
46
|
+
.describe('The type of channel'),
|
|
47
|
+
members: z
|
|
48
|
+
.array(z.number())
|
|
49
|
+
.optional()
|
|
50
|
+
.describe('Array of user IDs to add as initial members'),
|
|
41
51
|
is_private: z.boolean().optional().describe('Whether the channel is private')
|
|
42
52
|
}, async (args) => {
|
|
43
53
|
try {
|
|
44
54
|
const request = CreateChannelSchema.parse(args);
|
|
45
55
|
const result = await chatClient.createChannel(request);
|
|
46
56
|
return {
|
|
47
|
-
content: [
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
48
59
|
type: 'text',
|
|
49
60
|
text: `Channel created successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
50
|
-
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
51
63
|
};
|
|
52
64
|
}
|
|
53
65
|
catch (error) {
|
|
54
66
|
return {
|
|
55
|
-
content: [
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
56
69
|
type: 'text',
|
|
57
70
|
text: `Error creating chat channel: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
58
|
-
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
59
73
|
isError: true
|
|
60
74
|
};
|
|
61
75
|
}
|
|
@@ -65,51 +79,68 @@ export function setupChatTools(server) {
|
|
|
65
79
|
parent_type: z.enum(['space', 'folder', 'list']).describe('The type of parent container'),
|
|
66
80
|
name: z.string().min(1).max(255).describe('The name of the channel'),
|
|
67
81
|
description: z.string().optional().describe('Optional description of the channel'),
|
|
68
|
-
type: z
|
|
69
|
-
|
|
82
|
+
type: z
|
|
83
|
+
.enum(['public', 'private', 'direct'])
|
|
84
|
+
.default('public')
|
|
85
|
+
.describe('The type of channel'),
|
|
86
|
+
members: z
|
|
87
|
+
.array(z.number())
|
|
88
|
+
.optional()
|
|
89
|
+
.describe('Array of user IDs to add as initial members'),
|
|
70
90
|
is_private: z.boolean().optional().describe('Whether the channel is private')
|
|
71
91
|
}, async (args) => {
|
|
72
92
|
try {
|
|
73
93
|
const request = CreateChannelOnParentSchema.parse(args);
|
|
74
94
|
const result = await chatClient.createChannelOnParent(request);
|
|
75
95
|
return {
|
|
76
|
-
content: [
|
|
96
|
+
content: [
|
|
97
|
+
{
|
|
77
98
|
type: 'text',
|
|
78
99
|
text: `Channel created on ${args.parent_type} successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
79
|
-
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
80
102
|
};
|
|
81
103
|
}
|
|
82
104
|
catch (error) {
|
|
83
105
|
return {
|
|
84
|
-
content: [
|
|
106
|
+
content: [
|
|
107
|
+
{
|
|
85
108
|
type: 'text',
|
|
86
109
|
text: `Error creating channel on parent: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
87
|
-
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
88
112
|
isError: true
|
|
89
113
|
};
|
|
90
114
|
}
|
|
91
115
|
});
|
|
92
116
|
server.tool('clickup_create_direct_message', 'Create a direct message channel between specific users for private conversations.', {
|
|
93
117
|
workspace_id: z.string().min(1).describe('The ID of the workspace'),
|
|
94
|
-
members: z
|
|
118
|
+
members: z
|
|
119
|
+
.array(z.number())
|
|
120
|
+
.min(2)
|
|
121
|
+
.describe('Array of user IDs to include in the direct message (minimum 2)'),
|
|
95
122
|
name: z.string().optional().describe('Optional name for the direct message channel')
|
|
96
123
|
}, async (args) => {
|
|
97
124
|
try {
|
|
98
125
|
const request = CreateDirectMessageSchema.parse(args);
|
|
99
126
|
const result = await chatClient.createDirectMessage(request);
|
|
100
127
|
return {
|
|
101
|
-
content: [
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
102
130
|
type: 'text',
|
|
103
131
|
text: `Direct message channel created successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
104
|
-
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
105
134
|
};
|
|
106
135
|
}
|
|
107
136
|
catch (error) {
|
|
108
137
|
return {
|
|
109
|
-
content: [
|
|
138
|
+
content: [
|
|
139
|
+
{
|
|
110
140
|
type: 'text',
|
|
111
141
|
text: `Error creating direct message: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
112
|
-
}
|
|
142
|
+
}
|
|
143
|
+
],
|
|
113
144
|
isError: true
|
|
114
145
|
};
|
|
115
146
|
}
|
|
@@ -120,23 +151,27 @@ export function setupChatTools(server) {
|
|
|
120
151
|
try {
|
|
121
152
|
const result = await chatClient.getChannel(args.channel_id);
|
|
122
153
|
return {
|
|
123
|
-
content: [
|
|
154
|
+
content: [
|
|
155
|
+
{
|
|
124
156
|
type: 'text',
|
|
125
157
|
text: `Channel details:\n\n${JSON.stringify(result, null, 2)}`
|
|
126
|
-
}
|
|
158
|
+
}
|
|
159
|
+
]
|
|
127
160
|
};
|
|
128
161
|
}
|
|
129
162
|
catch (error) {
|
|
130
163
|
return {
|
|
131
|
-
content: [
|
|
164
|
+
content: [
|
|
165
|
+
{
|
|
132
166
|
type: 'text',
|
|
133
167
|
text: `Error getting channel: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
134
|
-
}
|
|
168
|
+
}
|
|
169
|
+
],
|
|
135
170
|
isError: true
|
|
136
171
|
};
|
|
137
172
|
}
|
|
138
173
|
});
|
|
139
|
-
server.tool('clickup_update_chat_channel',
|
|
174
|
+
server.tool('clickup_update_chat_channel', "Update a chat channel's name, description, or privacy settings.", {
|
|
140
175
|
channel_id: z.string().min(1).describe('The ID of the channel to update'),
|
|
141
176
|
name: z.string().min(1).max(255).optional().describe('New name for the channel'),
|
|
142
177
|
description: z.string().optional().describe('New description for the channel'),
|
|
@@ -146,18 +181,22 @@ export function setupChatTools(server) {
|
|
|
146
181
|
const request = UpdateChannelSchema.parse(args);
|
|
147
182
|
const result = await chatClient.updateChannel(request);
|
|
148
183
|
return {
|
|
149
|
-
content: [
|
|
184
|
+
content: [
|
|
185
|
+
{
|
|
150
186
|
type: 'text',
|
|
151
187
|
text: `Channel updated successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
152
|
-
}
|
|
188
|
+
}
|
|
189
|
+
]
|
|
153
190
|
};
|
|
154
191
|
}
|
|
155
192
|
catch (error) {
|
|
156
193
|
return {
|
|
157
|
-
content: [
|
|
194
|
+
content: [
|
|
195
|
+
{
|
|
158
196
|
type: 'text',
|
|
159
197
|
text: `Error updating channel: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
160
|
-
}
|
|
198
|
+
}
|
|
199
|
+
],
|
|
161
200
|
isError: true
|
|
162
201
|
};
|
|
163
202
|
}
|
|
@@ -171,18 +210,22 @@ export function setupChatTools(server) {
|
|
|
171
210
|
try {
|
|
172
211
|
const result = await chatClient.getChannelFollowers(args.channel_id);
|
|
173
212
|
return {
|
|
174
|
-
content: [
|
|
213
|
+
content: [
|
|
214
|
+
{
|
|
175
215
|
type: 'text',
|
|
176
216
|
text: `Channel followers (${result.followers.length}):\n\n${JSON.stringify(result, null, 2)}`
|
|
177
|
-
}
|
|
217
|
+
}
|
|
218
|
+
]
|
|
178
219
|
};
|
|
179
220
|
}
|
|
180
221
|
catch (error) {
|
|
181
222
|
return {
|
|
182
|
-
content: [
|
|
223
|
+
content: [
|
|
224
|
+
{
|
|
183
225
|
type: 'text',
|
|
184
226
|
text: `Error getting channel followers: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
185
|
-
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
186
229
|
isError: true
|
|
187
230
|
};
|
|
188
231
|
}
|
|
@@ -193,18 +236,22 @@ export function setupChatTools(server) {
|
|
|
193
236
|
try {
|
|
194
237
|
const result = await chatClient.getChannelMembers(args.channel_id);
|
|
195
238
|
return {
|
|
196
|
-
content: [
|
|
239
|
+
content: [
|
|
240
|
+
{
|
|
197
241
|
type: 'text',
|
|
198
242
|
text: `Channel members (${result.members.length}):\n\n${JSON.stringify(result, null, 2)}`
|
|
199
|
-
}
|
|
243
|
+
}
|
|
244
|
+
]
|
|
200
245
|
};
|
|
201
246
|
}
|
|
202
247
|
catch (error) {
|
|
203
248
|
return {
|
|
204
|
-
content: [
|
|
249
|
+
content: [
|
|
250
|
+
{
|
|
205
251
|
type: 'text',
|
|
206
252
|
text: `Error getting channel members: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
207
|
-
}
|
|
253
|
+
}
|
|
254
|
+
],
|
|
208
255
|
isError: true
|
|
209
256
|
};
|
|
210
257
|
}
|
|
@@ -217,18 +264,22 @@ export function setupChatTools(server) {
|
|
|
217
264
|
const request = AddChannelMemberSchema.parse(args);
|
|
218
265
|
await chatClient.addChannelMember(request);
|
|
219
266
|
return {
|
|
220
|
-
content: [
|
|
267
|
+
content: [
|
|
268
|
+
{
|
|
221
269
|
type: 'text',
|
|
222
270
|
text: `User ${args.user_id} added to channel ${args.channel_id} successfully`
|
|
223
|
-
}
|
|
271
|
+
}
|
|
272
|
+
]
|
|
224
273
|
};
|
|
225
274
|
}
|
|
226
275
|
catch (error) {
|
|
227
276
|
return {
|
|
228
|
-
content: [
|
|
277
|
+
content: [
|
|
278
|
+
{
|
|
229
279
|
type: 'text',
|
|
230
280
|
text: `Error adding channel member: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
231
|
-
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
232
283
|
isError: true
|
|
233
284
|
};
|
|
234
285
|
}
|
|
@@ -241,18 +292,22 @@ export function setupChatTools(server) {
|
|
|
241
292
|
const request = RemoveChannelMemberSchema.parse(args);
|
|
242
293
|
await chatClient.removeChannelMember(request);
|
|
243
294
|
return {
|
|
244
|
-
content: [
|
|
295
|
+
content: [
|
|
296
|
+
{
|
|
245
297
|
type: 'text',
|
|
246
298
|
text: `User ${args.user_id} removed from channel ${args.channel_id} successfully`
|
|
247
|
-
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
248
301
|
};
|
|
249
302
|
}
|
|
250
303
|
catch (error) {
|
|
251
304
|
return {
|
|
252
|
-
content: [
|
|
305
|
+
content: [
|
|
306
|
+
{
|
|
253
307
|
type: 'text',
|
|
254
308
|
text: `Error removing channel member: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
255
|
-
}
|
|
309
|
+
}
|
|
310
|
+
],
|
|
256
311
|
isError: true
|
|
257
312
|
};
|
|
258
313
|
}
|
|
@@ -262,7 +317,12 @@ export function setupChatTools(server) {
|
|
|
262
317
|
// ========================================
|
|
263
318
|
server.tool('clickup_get_chat_channel_messages', 'Retrieve messages from a chat channel with pagination and filtering options.', {
|
|
264
319
|
channel_id: z.string().min(1).describe('The ID of the channel to get messages from'),
|
|
265
|
-
limit: z
|
|
320
|
+
limit: z
|
|
321
|
+
.number()
|
|
322
|
+
.min(1)
|
|
323
|
+
.max(100)
|
|
324
|
+
.optional()
|
|
325
|
+
.describe('Maximum number of messages to return (1-100)'),
|
|
266
326
|
before: z.string().optional().describe('Get messages before this message ID'),
|
|
267
327
|
after: z.string().optional().describe('Get messages after this message ID')
|
|
268
328
|
}, async (args) => {
|
|
@@ -270,18 +330,22 @@ export function setupChatTools(server) {
|
|
|
270
330
|
const filter = GetMessagesFilterSchema.parse(args);
|
|
271
331
|
const result = await chatClient.getChannelMessages(filter);
|
|
272
332
|
return {
|
|
273
|
-
content: [
|
|
333
|
+
content: [
|
|
334
|
+
{
|
|
274
335
|
type: 'text',
|
|
275
336
|
text: `Retrieved ${result.messages.length} messages:\n\n${JSON.stringify(result, null, 2)}`
|
|
276
|
-
}
|
|
337
|
+
}
|
|
338
|
+
]
|
|
277
339
|
};
|
|
278
340
|
}
|
|
279
341
|
catch (error) {
|
|
280
342
|
return {
|
|
281
|
-
content: [
|
|
343
|
+
content: [
|
|
344
|
+
{
|
|
282
345
|
type: 'text',
|
|
283
346
|
text: `Error getting channel messages: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
284
|
-
}
|
|
347
|
+
}
|
|
348
|
+
],
|
|
285
349
|
isError: true
|
|
286
350
|
};
|
|
287
351
|
}
|
|
@@ -289,7 +353,10 @@ export function setupChatTools(server) {
|
|
|
289
353
|
server.tool('clickup_send_chat_message', 'Send a message to a chat channel with optional mentions and attachments.', {
|
|
290
354
|
channel_id: z.string().min(1).describe('The ID of the channel to send the message to'),
|
|
291
355
|
text: z.string().min(1).describe('The text content of the message'),
|
|
292
|
-
mentions: z
|
|
356
|
+
mentions: z
|
|
357
|
+
.array(z.number())
|
|
358
|
+
.optional()
|
|
359
|
+
.describe('Array of user IDs to mention in the message'),
|
|
293
360
|
attachments: z.array(z.string()).optional().describe('Array of attachment IDs to include'),
|
|
294
361
|
reply_to: z.string().optional().describe('ID of the message this is replying to')
|
|
295
362
|
}, async (args) => {
|
|
@@ -297,18 +364,22 @@ export function setupChatTools(server) {
|
|
|
297
364
|
const request = SendMessageSchema.parse(args);
|
|
298
365
|
const result = await chatClient.sendMessage(request);
|
|
299
366
|
return {
|
|
300
|
-
content: [
|
|
367
|
+
content: [
|
|
368
|
+
{
|
|
301
369
|
type: 'text',
|
|
302
370
|
text: `Message sent successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
303
|
-
}
|
|
371
|
+
}
|
|
372
|
+
]
|
|
304
373
|
};
|
|
305
374
|
}
|
|
306
375
|
catch (error) {
|
|
307
376
|
return {
|
|
308
|
-
content: [
|
|
377
|
+
content: [
|
|
378
|
+
{
|
|
309
379
|
type: 'text',
|
|
310
380
|
text: `Error sending message: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
311
|
-
}
|
|
381
|
+
}
|
|
382
|
+
],
|
|
312
383
|
isError: true
|
|
313
384
|
};
|
|
314
385
|
}
|
|
@@ -323,18 +394,22 @@ export function setupChatTools(server) {
|
|
|
323
394
|
const request = UpdateMessageSchema.parse(args);
|
|
324
395
|
const result = await chatClient.updateMessage(request);
|
|
325
396
|
return {
|
|
326
|
-
content: [
|
|
397
|
+
content: [
|
|
398
|
+
{
|
|
327
399
|
type: 'text',
|
|
328
400
|
text: `Message updated successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
329
|
-
}
|
|
401
|
+
}
|
|
402
|
+
]
|
|
330
403
|
};
|
|
331
404
|
}
|
|
332
405
|
catch (error) {
|
|
333
406
|
return {
|
|
334
|
-
content: [
|
|
407
|
+
content: [
|
|
408
|
+
{
|
|
335
409
|
type: 'text',
|
|
336
410
|
text: `Error updating message: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
337
|
-
}
|
|
411
|
+
}
|
|
412
|
+
],
|
|
338
413
|
isError: true
|
|
339
414
|
};
|
|
340
415
|
}
|
|
@@ -346,18 +421,22 @@ export function setupChatTools(server) {
|
|
|
346
421
|
try {
|
|
347
422
|
await chatClient.deleteMessage(args.channel_id, args.message_id);
|
|
348
423
|
return {
|
|
349
|
-
content: [
|
|
424
|
+
content: [
|
|
425
|
+
{
|
|
350
426
|
type: 'text',
|
|
351
427
|
text: `Message ${args.message_id} deleted successfully from channel ${args.channel_id}`
|
|
352
|
-
}
|
|
428
|
+
}
|
|
429
|
+
]
|
|
353
430
|
};
|
|
354
431
|
}
|
|
355
432
|
catch (error) {
|
|
356
433
|
return {
|
|
357
|
-
content: [
|
|
434
|
+
content: [
|
|
435
|
+
{
|
|
358
436
|
type: 'text',
|
|
359
437
|
text: `Error deleting message: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
360
|
-
}
|
|
438
|
+
}
|
|
439
|
+
],
|
|
361
440
|
isError: true
|
|
362
441
|
};
|
|
363
442
|
}
|
|
@@ -368,7 +447,12 @@ export function setupChatTools(server) {
|
|
|
368
447
|
server.tool('clickup_get_chat_message_replies', 'Retrieve all replies to a specific message in a chat channel.', {
|
|
369
448
|
channel_id: z.string().min(1).describe('The ID of the channel containing the message'),
|
|
370
449
|
message_id: z.string().min(1).describe('The ID of the message to get replies for'),
|
|
371
|
-
limit: z
|
|
450
|
+
limit: z
|
|
451
|
+
.number()
|
|
452
|
+
.min(1)
|
|
453
|
+
.max(100)
|
|
454
|
+
.optional()
|
|
455
|
+
.describe('Maximum number of replies to return (1-100)'),
|
|
372
456
|
before: z.string().optional().describe('Get replies before this reply ID'),
|
|
373
457
|
after: z.string().optional().describe('Get replies after this reply ID')
|
|
374
458
|
}, async (args) => {
|
|
@@ -376,18 +460,22 @@ export function setupChatTools(server) {
|
|
|
376
460
|
const filter = GetRepliesFilterSchema.parse(args);
|
|
377
461
|
const result = await chatClient.getMessageReplies(filter);
|
|
378
462
|
return {
|
|
379
|
-
content: [
|
|
463
|
+
content: [
|
|
464
|
+
{
|
|
380
465
|
type: 'text',
|
|
381
466
|
text: `Retrieved ${result.replies.length} replies:\n\n${JSON.stringify(result, null, 2)}`
|
|
382
|
-
}
|
|
467
|
+
}
|
|
468
|
+
]
|
|
383
469
|
};
|
|
384
470
|
}
|
|
385
471
|
catch (error) {
|
|
386
472
|
return {
|
|
387
|
-
content: [
|
|
473
|
+
content: [
|
|
474
|
+
{
|
|
388
475
|
type: 'text',
|
|
389
476
|
text: `Error getting message replies: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
390
|
-
}
|
|
477
|
+
}
|
|
478
|
+
],
|
|
391
479
|
isError: true
|
|
392
480
|
};
|
|
393
481
|
}
|
|
@@ -396,25 +484,32 @@ export function setupChatTools(server) {
|
|
|
396
484
|
channel_id: z.string().min(1).describe('The ID of the channel containing the message'),
|
|
397
485
|
message_id: z.string().min(1).describe('The ID of the message to reply to'),
|
|
398
486
|
text: z.string().min(1).describe('The text content of the reply'),
|
|
399
|
-
mentions: z
|
|
487
|
+
mentions: z
|
|
488
|
+
.array(z.number())
|
|
489
|
+
.optional()
|
|
490
|
+
.describe('Array of user IDs to mention in the reply'),
|
|
400
491
|
attachments: z.array(z.string()).optional().describe('Array of attachment IDs to include')
|
|
401
492
|
}, async (args) => {
|
|
402
493
|
try {
|
|
403
494
|
const request = CreateReplySchema.parse(args);
|
|
404
495
|
const result = await chatClient.createReply(request);
|
|
405
496
|
return {
|
|
406
|
-
content: [
|
|
497
|
+
content: [
|
|
498
|
+
{
|
|
407
499
|
type: 'text',
|
|
408
500
|
text: `Reply created successfully:\n\n${JSON.stringify(result, null, 2)}`
|
|
409
|
-
}
|
|
501
|
+
}
|
|
502
|
+
]
|
|
410
503
|
};
|
|
411
504
|
}
|
|
412
505
|
catch (error) {
|
|
413
506
|
return {
|
|
414
|
-
content: [
|
|
507
|
+
content: [
|
|
508
|
+
{
|
|
415
509
|
type: 'text',
|
|
416
510
|
text: `Error creating reply: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
417
|
-
}
|
|
511
|
+
}
|
|
512
|
+
],
|
|
418
513
|
isError: true
|
|
419
514
|
};
|
|
420
515
|
}
|
|
@@ -429,18 +524,22 @@ export function setupChatTools(server) {
|
|
|
429
524
|
try {
|
|
430
525
|
const result = await chatClient.getMessageReactions(args.channel_id, args.message_id);
|
|
431
526
|
return {
|
|
432
|
-
content: [
|
|
527
|
+
content: [
|
|
528
|
+
{
|
|
433
529
|
type: 'text',
|
|
434
530
|
text: `Message reactions:\n\n${JSON.stringify(result, null, 2)}`
|
|
435
|
-
}
|
|
531
|
+
}
|
|
532
|
+
]
|
|
436
533
|
};
|
|
437
534
|
}
|
|
438
535
|
catch (error) {
|
|
439
536
|
return {
|
|
440
|
-
content: [
|
|
537
|
+
content: [
|
|
538
|
+
{
|
|
441
539
|
type: 'text',
|
|
442
540
|
text: `Error getting message reactions: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
443
|
-
}
|
|
541
|
+
}
|
|
542
|
+
],
|
|
444
543
|
isError: true
|
|
445
544
|
};
|
|
446
545
|
}
|
|
@@ -454,18 +553,22 @@ export function setupChatTools(server) {
|
|
|
454
553
|
const request = CreateReactionSchema.parse(args);
|
|
455
554
|
await chatClient.createReaction(request);
|
|
456
555
|
return {
|
|
457
|
-
content: [
|
|
556
|
+
content: [
|
|
557
|
+
{
|
|
458
558
|
type: 'text',
|
|
459
559
|
text: `Reaction ${args.reaction} added to message ${args.message_id} successfully`
|
|
460
|
-
}
|
|
560
|
+
}
|
|
561
|
+
]
|
|
461
562
|
};
|
|
462
563
|
}
|
|
463
564
|
catch (error) {
|
|
464
565
|
return {
|
|
465
|
-
content: [
|
|
566
|
+
content: [
|
|
567
|
+
{
|
|
466
568
|
type: 'text',
|
|
467
569
|
text: `Error creating reaction: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
468
|
-
}
|
|
570
|
+
}
|
|
571
|
+
],
|
|
469
572
|
isError: true
|
|
470
573
|
};
|
|
471
574
|
}
|
|
@@ -479,18 +582,22 @@ export function setupChatTools(server) {
|
|
|
479
582
|
const request = DeleteReactionSchema.parse(args);
|
|
480
583
|
await chatClient.deleteReaction(request);
|
|
481
584
|
return {
|
|
482
|
-
content: [
|
|
585
|
+
content: [
|
|
586
|
+
{
|
|
483
587
|
type: 'text',
|
|
484
588
|
text: `Reaction ${args.reaction} removed from message ${args.message_id} successfully`
|
|
485
|
-
}
|
|
589
|
+
}
|
|
590
|
+
]
|
|
486
591
|
};
|
|
487
592
|
}
|
|
488
593
|
catch (error) {
|
|
489
594
|
return {
|
|
490
|
-
content: [
|
|
595
|
+
content: [
|
|
596
|
+
{
|
|
491
597
|
type: 'text',
|
|
492
598
|
text: `Error deleting reaction: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
493
|
-
}
|
|
599
|
+
}
|
|
600
|
+
],
|
|
494
601
|
isError: true
|
|
495
602
|
};
|
|
496
603
|
}
|
|
@@ -505,18 +612,22 @@ export function setupChatTools(server) {
|
|
|
505
612
|
try {
|
|
506
613
|
const result = await chatClient.getTaggedUsers(args.channel_id, args.message_id);
|
|
507
614
|
return {
|
|
508
|
-
content: [
|
|
615
|
+
content: [
|
|
616
|
+
{
|
|
509
617
|
type: 'text',
|
|
510
618
|
text: `Tagged users in message:\n\n${JSON.stringify(result, null, 2)}`
|
|
511
|
-
}
|
|
619
|
+
}
|
|
620
|
+
]
|
|
512
621
|
};
|
|
513
622
|
}
|
|
514
623
|
catch (error) {
|
|
515
624
|
return {
|
|
516
|
-
content: [
|
|
625
|
+
content: [
|
|
626
|
+
{
|
|
517
627
|
type: 'text',
|
|
518
628
|
text: `Error getting tagged users: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
519
|
-
}
|
|
629
|
+
}
|
|
630
|
+
],
|
|
520
631
|
isError: true
|
|
521
632
|
};
|
|
522
633
|
}
|
|
@@ -528,18 +639,22 @@ export function setupChatTools(server) {
|
|
|
528
639
|
try {
|
|
529
640
|
const result = await chatClient.searchChannels(args.workspace_id, args.query);
|
|
530
641
|
return {
|
|
531
|
-
content: [
|
|
642
|
+
content: [
|
|
643
|
+
{
|
|
532
644
|
type: 'text',
|
|
533
645
|
text: `Found ${result.channels.length} channels matching "${args.query}":\n\n${JSON.stringify(result, null, 2)}`
|
|
534
|
-
}
|
|
646
|
+
}
|
|
647
|
+
]
|
|
535
648
|
};
|
|
536
649
|
}
|
|
537
650
|
catch (error) {
|
|
538
651
|
return {
|
|
539
|
-
content: [
|
|
652
|
+
content: [
|
|
653
|
+
{
|
|
540
654
|
type: 'text',
|
|
541
655
|
text: `Error searching channels: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
542
|
-
}
|
|
656
|
+
}
|
|
657
|
+
],
|
|
543
658
|
isError: true
|
|
544
659
|
};
|
|
545
660
|
}
|
|
@@ -550,18 +665,22 @@ export function setupChatTools(server) {
|
|
|
550
665
|
try {
|
|
551
666
|
const result = await chatClient.getChannelStats(args.channel_id);
|
|
552
667
|
return {
|
|
553
|
-
content: [
|
|
668
|
+
content: [
|
|
669
|
+
{
|
|
554
670
|
type: 'text',
|
|
555
671
|
text: `Channel statistics:\n\n${JSON.stringify(result, null, 2)}`
|
|
556
|
-
}
|
|
672
|
+
}
|
|
673
|
+
]
|
|
557
674
|
};
|
|
558
675
|
}
|
|
559
676
|
catch (error) {
|
|
560
677
|
return {
|
|
561
|
-
content: [
|
|
678
|
+
content: [
|
|
679
|
+
{
|
|
562
680
|
type: 'text',
|
|
563
681
|
text: `Error getting channel stats: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
564
|
-
}
|
|
682
|
+
}
|
|
683
|
+
],
|
|
565
684
|
isError: true
|
|
566
685
|
};
|
|
567
686
|
}
|
|
@@ -572,18 +691,22 @@ export function setupChatTools(server) {
|
|
|
572
691
|
try {
|
|
573
692
|
await chatClient.markChannelAsRead(args.channel_id);
|
|
574
693
|
return {
|
|
575
|
-
content: [
|
|
694
|
+
content: [
|
|
695
|
+
{
|
|
576
696
|
type: 'text',
|
|
577
697
|
text: `Channel ${args.channel_id} marked as read successfully`
|
|
578
|
-
}
|
|
698
|
+
}
|
|
699
|
+
]
|
|
579
700
|
};
|
|
580
701
|
}
|
|
581
702
|
catch (error) {
|
|
582
703
|
return {
|
|
583
|
-
content: [
|
|
704
|
+
content: [
|
|
705
|
+
{
|
|
584
706
|
type: 'text',
|
|
585
707
|
text: `Error marking channel as read: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
586
|
-
}
|
|
708
|
+
}
|
|
709
|
+
],
|
|
587
710
|
isError: true
|
|
588
711
|
};
|
|
589
712
|
}
|
|
@@ -594,18 +717,22 @@ export function setupChatTools(server) {
|
|
|
594
717
|
try {
|
|
595
718
|
const result = await chatClient.getUnreadCount(args.channel_id);
|
|
596
719
|
return {
|
|
597
|
-
content: [
|
|
720
|
+
content: [
|
|
721
|
+
{
|
|
598
722
|
type: 'text',
|
|
599
723
|
text: `Unread messages in channel ${args.channel_id}: ${result.unread_count}`
|
|
600
|
-
}
|
|
724
|
+
}
|
|
725
|
+
]
|
|
601
726
|
};
|
|
602
727
|
}
|
|
603
728
|
catch (error) {
|
|
604
729
|
return {
|
|
605
|
-
content: [
|
|
730
|
+
content: [
|
|
731
|
+
{
|
|
606
732
|
type: 'text',
|
|
607
733
|
text: `Error getting unread count: ${error instanceof Error ? error.message : 'Unknown error'}`
|
|
608
|
-
}
|
|
734
|
+
}
|
|
735
|
+
],
|
|
609
736
|
isError: true
|
|
610
737
|
};
|
|
611
738
|
}
|