terse-types 0.0.1
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/README.md +44 -0
- package/dist/ApiRouteBuilder.d.ts +185 -0
- package/dist/ApiRouteBuilder.js +11 -0
- package/dist/ApiRoutes.json +184 -0
- package/dist/ApprovalTypes.d.ts +28 -0
- package/dist/ApprovalTypes.js +7 -0
- package/dist/ClientBoundTools.d.ts +36 -0
- package/dist/ClientBoundTools.js +36 -0
- package/dist/Configs.d.ts +628 -0
- package/dist/Configs.js +868 -0
- package/dist/DonatedState.d.ts +4 -0
- package/dist/DonatedState.js +12 -0
- package/dist/Entities.d.ts +7 -0
- package/dist/Entities.js +8 -0
- package/dist/FrontendRoutes.json +28 -0
- package/dist/FrontendRoutesBuilder.d.ts +30 -0
- package/dist/FrontendRoutesBuilder.js +13 -0
- package/dist/Integrations.d.ts +254 -0
- package/dist/Integrations.js +210 -0
- package/dist/InvalidationKeys.d.ts +52 -0
- package/dist/InvalidationKeys.js +165 -0
- package/dist/ModelEvents.d.ts +175 -0
- package/dist/ModelEvents.js +28 -0
- package/dist/Notifications.d.ts +42 -0
- package/dist/Notifications.js +5 -0
- package/dist/RunHistoryTypes.d.ts +103 -0
- package/dist/RunHistoryTypes.js +29 -0
- package/dist/SentNotifications.d.ts +29 -0
- package/dist/SentNotifications.js +12 -0
- package/dist/SocketEvents.d.ts +48 -0
- package/dist/SocketEvents.js +52 -0
- package/dist/Survey.d.ts +9 -0
- package/dist/Survey.js +1 -0
- package/dist/TicketSystem.d.ts +153 -0
- package/dist/TicketSystem.js +20 -0
- package/dist/ToolDisplayUtils.d.ts +29 -0
- package/dist/ToolDisplayUtils.js +1162 -0
- package/dist/Tools.d.ts +9202 -0
- package/dist/Tools.js +2099 -0
- package/dist/ToolsTypes.d.ts +17 -0
- package/dist/ToolsTypes.js +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/types.d.ts +704 -0
- package/dist/types.js +115 -0
- package/package.json +45 -0
package/dist/Tools.js
ADDED
|
@@ -0,0 +1,2099 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { runHistoryActionBaseSchema } from "./RunHistoryTypes.js";
|
|
3
|
+
import { LinearStateName } from "./TicketSystem.js";
|
|
4
|
+
export const toolOutputBaseSchema = z.object({
|
|
5
|
+
success: z.boolean(),
|
|
6
|
+
actions: z.array(runHistoryActionBaseSchema).optional()
|
|
7
|
+
});
|
|
8
|
+
export const toolOutputSuccessSchema = toolOutputBaseSchema.extend({
|
|
9
|
+
success: z.literal(true)
|
|
10
|
+
});
|
|
11
|
+
export const toolOutputFailureSchema = toolOutputBaseSchema.extend({
|
|
12
|
+
success: z.literal(false)
|
|
13
|
+
});
|
|
14
|
+
export function defineTool(def) {
|
|
15
|
+
return def;
|
|
16
|
+
}
|
|
17
|
+
const linearStateNameValues = Object.values(LinearStateName);
|
|
18
|
+
const dateLikeSchema = z.union([z.string(), z.date()]);
|
|
19
|
+
export const linearTeamSchema = z.object({
|
|
20
|
+
id: z.string(),
|
|
21
|
+
name: z.string(),
|
|
22
|
+
key: z.string()
|
|
23
|
+
});
|
|
24
|
+
export const linearIssueAssigneeSchema = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
name: z.string(),
|
|
27
|
+
email: z.string().optional()
|
|
28
|
+
});
|
|
29
|
+
export const linearIssueTeamSchema = linearTeamSchema;
|
|
30
|
+
export const linearIssueProjectSchema = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
name: z.string()
|
|
33
|
+
});
|
|
34
|
+
export const linearIssueSummarySchema = z.object({
|
|
35
|
+
id: z.string(),
|
|
36
|
+
identifier: z.string(),
|
|
37
|
+
title: z.string(),
|
|
38
|
+
description: z.string().nullable().optional(),
|
|
39
|
+
state: z.string(),
|
|
40
|
+
priority: z.number().nullable().optional(),
|
|
41
|
+
assignee: linearIssueAssigneeSchema.nullable(),
|
|
42
|
+
url: z.string(),
|
|
43
|
+
createdAt: dateLikeSchema,
|
|
44
|
+
updatedAt: dateLikeSchema
|
|
45
|
+
});
|
|
46
|
+
export const linearIssueDetailSchema = linearIssueSummarySchema.extend({
|
|
47
|
+
team: linearIssueTeamSchema.nullable(),
|
|
48
|
+
project: linearIssueProjectSchema.nullable(),
|
|
49
|
+
dueDate: dateLikeSchema.optional(),
|
|
50
|
+
estimate: z.number().nullable().optional()
|
|
51
|
+
});
|
|
52
|
+
export const linearIssueHandleSchema = z.object({
|
|
53
|
+
id: z.string(),
|
|
54
|
+
identifier: z.string(),
|
|
55
|
+
title: z.string(),
|
|
56
|
+
description: z.string().nullable().optional(),
|
|
57
|
+
url: z.string(),
|
|
58
|
+
createdAt: dateLikeSchema.optional(),
|
|
59
|
+
updatedAt: dateLikeSchema.optional()
|
|
60
|
+
});
|
|
61
|
+
export const linearCommentHandleSchema = z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
body: z.string().optional(),
|
|
64
|
+
createdAt: dateLikeSchema.optional(),
|
|
65
|
+
updatedAt: dateLikeSchema.optional()
|
|
66
|
+
});
|
|
67
|
+
export const linearReadTicketCommentSchema = z.object({
|
|
68
|
+
id: z.string(),
|
|
69
|
+
body: z.string(),
|
|
70
|
+
authorId: z.string(),
|
|
71
|
+
createdAt: z.string()
|
|
72
|
+
});
|
|
73
|
+
export const linearStateSummarySchema = z.object({
|
|
74
|
+
id: z.string(),
|
|
75
|
+
name: z.string(),
|
|
76
|
+
type: z.string(),
|
|
77
|
+
color: z.string(),
|
|
78
|
+
teamId: z.string()
|
|
79
|
+
});
|
|
80
|
+
export const linearLabelSummarySchema = z.object({
|
|
81
|
+
id: z.string(),
|
|
82
|
+
name: z.string(),
|
|
83
|
+
color: z.string(),
|
|
84
|
+
teamId: z.string()
|
|
85
|
+
});
|
|
86
|
+
export const linearProjectSummarySchema = z.object({
|
|
87
|
+
id: z.string(),
|
|
88
|
+
name: z.string(),
|
|
89
|
+
description: z.string().optional(),
|
|
90
|
+
teamId: z.string()
|
|
91
|
+
});
|
|
92
|
+
export const linearUserSummarySchema = z.object({
|
|
93
|
+
id: z.string(),
|
|
94
|
+
name: z.string(),
|
|
95
|
+
email: z.string(),
|
|
96
|
+
avatarUrl: z.string().optional()
|
|
97
|
+
});
|
|
98
|
+
export const linearSearchPaginationSchema = z.object({
|
|
99
|
+
hasNextPage: z.boolean(),
|
|
100
|
+
endCursor: z.string().nullable(),
|
|
101
|
+
limit: z.number().nullable()
|
|
102
|
+
});
|
|
103
|
+
export const slackUserResponseSchema = z.object({
|
|
104
|
+
id: z.string(),
|
|
105
|
+
name: z.string()
|
|
106
|
+
});
|
|
107
|
+
export const slackChannelListItemSchema = z.object({
|
|
108
|
+
id: z.string().optional(),
|
|
109
|
+
name: z.string(),
|
|
110
|
+
isPrivate: z.boolean(),
|
|
111
|
+
isIm: z.boolean(),
|
|
112
|
+
isMpim: z.boolean(),
|
|
113
|
+
userId: z.string().optional()
|
|
114
|
+
});
|
|
115
|
+
export const slackConversationMessageSchema = z.object({
|
|
116
|
+
userId: z.string().optional(),
|
|
117
|
+
userName: z.string().optional(),
|
|
118
|
+
text: z.string(),
|
|
119
|
+
timestamp: z.string().optional(),
|
|
120
|
+
threadTs: z.string().optional()
|
|
121
|
+
});
|
|
122
|
+
export const jiraIssueStateSchema = z.object({
|
|
123
|
+
id: z.string(),
|
|
124
|
+
name: z.string()
|
|
125
|
+
});
|
|
126
|
+
export const jiraIssueAssigneeSchema = z.object({
|
|
127
|
+
id: z.string(),
|
|
128
|
+
name: z.string(),
|
|
129
|
+
email: z.string().optional()
|
|
130
|
+
});
|
|
131
|
+
export const jiraIssueProjectRefSchema = z.object({
|
|
132
|
+
id: z.string(),
|
|
133
|
+
name: z.string(),
|
|
134
|
+
key: z.string()
|
|
135
|
+
});
|
|
136
|
+
export const jiraIssueTypeRefSchema = z.object({
|
|
137
|
+
id: z.string(),
|
|
138
|
+
name: z.string()
|
|
139
|
+
});
|
|
140
|
+
export const jiraRichDescriptionSchema = z.union([z.string(), z.record(z.string(), z.unknown())]);
|
|
141
|
+
export const jiraIssueSummarySchema = z.object({
|
|
142
|
+
id: z.string().optional(),
|
|
143
|
+
key: z.string(),
|
|
144
|
+
identifier: z.string(),
|
|
145
|
+
title: z.string().optional(),
|
|
146
|
+
description: jiraRichDescriptionSchema.optional(),
|
|
147
|
+
state: jiraIssueStateSchema.optional(),
|
|
148
|
+
priority: z.number().optional(),
|
|
149
|
+
assignee: jiraIssueAssigneeSchema.nullable().optional(),
|
|
150
|
+
labels: z.array(z.string()).optional(),
|
|
151
|
+
dueDate: z.string().optional(),
|
|
152
|
+
project: jiraIssueProjectRefSchema.optional(),
|
|
153
|
+
issueType: jiraIssueTypeRefSchema.optional(),
|
|
154
|
+
url: z.string().optional(),
|
|
155
|
+
createdAt: z.string().optional(),
|
|
156
|
+
updatedAt: z.string().optional()
|
|
157
|
+
});
|
|
158
|
+
export const gitHubPaginationSchema = z.object({
|
|
159
|
+
page: z.number(),
|
|
160
|
+
perPage: z.number(),
|
|
161
|
+
hasMore: z.boolean()
|
|
162
|
+
});
|
|
163
|
+
export const gitHubCodeSearchResultSchema = z.object({
|
|
164
|
+
index: z.number(),
|
|
165
|
+
repository: z.string(),
|
|
166
|
+
path: z.string(),
|
|
167
|
+
url: z.string(),
|
|
168
|
+
snippets: z.string()
|
|
169
|
+
});
|
|
170
|
+
export const gitHubCodeGrepResultSchema = z.object({
|
|
171
|
+
index: z.number(),
|
|
172
|
+
repository: z.string(),
|
|
173
|
+
file: z.string(),
|
|
174
|
+
url: z.string(),
|
|
175
|
+
matches: z.string()
|
|
176
|
+
});
|
|
177
|
+
export const gitHubPullRequestSummarySchema = z.object({
|
|
178
|
+
number: z.number(),
|
|
179
|
+
title: z.string(),
|
|
180
|
+
description: z.string(),
|
|
181
|
+
author: z.string(),
|
|
182
|
+
state: z.string(),
|
|
183
|
+
merged: z.boolean(),
|
|
184
|
+
mergedAt: z.string().optional(),
|
|
185
|
+
createdAt: z.string(),
|
|
186
|
+
closedAt: z.string().optional(),
|
|
187
|
+
labels: z.array(z.string()),
|
|
188
|
+
baseBranch: z.string(),
|
|
189
|
+
headBranch: z.string(),
|
|
190
|
+
url: z.string()
|
|
191
|
+
});
|
|
192
|
+
export const gitHubDirectoryEntrySchema = z.object({
|
|
193
|
+
name: z.string().optional(),
|
|
194
|
+
path: z.string().optional(),
|
|
195
|
+
type: z.literal("directory").optional()
|
|
196
|
+
});
|
|
197
|
+
export const gitHubFileEntrySchema = z.object({
|
|
198
|
+
name: z.string().optional(),
|
|
199
|
+
path: z.string(),
|
|
200
|
+
type: z.literal("file").optional(),
|
|
201
|
+
size: z.number().optional()
|
|
202
|
+
});
|
|
203
|
+
export const gitHubOtherEntrySchema = z.object({
|
|
204
|
+
name: z.string(),
|
|
205
|
+
type: z.string()
|
|
206
|
+
});
|
|
207
|
+
export const gitHubCommitSummarySchema = z.object({
|
|
208
|
+
sha: z.string(),
|
|
209
|
+
fullSha: z.string(),
|
|
210
|
+
message: z.string(),
|
|
211
|
+
fullMessage: z.string(),
|
|
212
|
+
author: z.string(),
|
|
213
|
+
date: z.string(),
|
|
214
|
+
url: z.string()
|
|
215
|
+
});
|
|
216
|
+
export const gitHubPullRequestRefSchema = z.object({
|
|
217
|
+
number: z.number(),
|
|
218
|
+
title: z.string(),
|
|
219
|
+
state: z.string(),
|
|
220
|
+
merged: z.boolean(),
|
|
221
|
+
baseBranch: z.string(),
|
|
222
|
+
headBranch: z.string(),
|
|
223
|
+
url: z.string()
|
|
224
|
+
});
|
|
225
|
+
export const notionLooseObjectSchema = z.record(z.string(), z.unknown());
|
|
226
|
+
export const notionUserReferenceSchema = z.object({
|
|
227
|
+
id: z.string(),
|
|
228
|
+
name: z.string().optional(),
|
|
229
|
+
object: z.string().optional()
|
|
230
|
+
});
|
|
231
|
+
export const notionFileReferenceSchema = z.object({
|
|
232
|
+
name: z.string(),
|
|
233
|
+
type: z.string(),
|
|
234
|
+
file: z.string().optional(),
|
|
235
|
+
external: z.string().optional()
|
|
236
|
+
});
|
|
237
|
+
export const notionDateReferenceSchema = z.object({
|
|
238
|
+
start: z.string().optional(),
|
|
239
|
+
end: z.string().nullable().optional(),
|
|
240
|
+
time_zone: z.string().nullable().optional()
|
|
241
|
+
});
|
|
242
|
+
export const notionReadablePropertyValueSchema = z.union([
|
|
243
|
+
z.string(),
|
|
244
|
+
z.number(),
|
|
245
|
+
z.boolean(),
|
|
246
|
+
z.null(),
|
|
247
|
+
z.array(z.string()),
|
|
248
|
+
notionDateReferenceSchema,
|
|
249
|
+
notionUserReferenceSchema,
|
|
250
|
+
z.array(notionUserReferenceSchema),
|
|
251
|
+
z.array(notionFileReferenceSchema),
|
|
252
|
+
notionLooseObjectSchema
|
|
253
|
+
]);
|
|
254
|
+
export const notionPageParentSchema = notionLooseObjectSchema;
|
|
255
|
+
export const notionPageBlockSchema = z.lazy(() => z.object({
|
|
256
|
+
id: z.string(),
|
|
257
|
+
type: z.string(),
|
|
258
|
+
object: z.string(),
|
|
259
|
+
created_time: z.string().optional(),
|
|
260
|
+
last_edited_time: z.string().optional(),
|
|
261
|
+
created_by: notionUserReferenceSchema.optional(),
|
|
262
|
+
last_edited_by: notionUserReferenceSchema.optional(),
|
|
263
|
+
has_children: z.boolean().optional(),
|
|
264
|
+
archived: z.boolean().optional(),
|
|
265
|
+
content: z.string().optional(),
|
|
266
|
+
rich_text: z.array(notionLooseObjectSchema).optional(),
|
|
267
|
+
checked: z.boolean().optional(),
|
|
268
|
+
language: z.string().optional(),
|
|
269
|
+
icon: notionLooseObjectSchema.optional(),
|
|
270
|
+
table_width: z.number().optional(),
|
|
271
|
+
has_column_header: z.boolean().optional(),
|
|
272
|
+
has_row_header: z.boolean().optional(),
|
|
273
|
+
caption: z.string().optional(),
|
|
274
|
+
file: z.string().optional(),
|
|
275
|
+
external: z.string().optional(),
|
|
276
|
+
url: z.string().optional(),
|
|
277
|
+
page_id: z.string().optional(),
|
|
278
|
+
database_id: z.string().optional(),
|
|
279
|
+
children: z.array(notionPageBlockSchema).optional()
|
|
280
|
+
}));
|
|
281
|
+
export const notionPageQueryMetadataSchema = z.object({
|
|
282
|
+
page_id: z.string(),
|
|
283
|
+
object: z.string(),
|
|
284
|
+
url: z.string().optional(),
|
|
285
|
+
public_url: z.string().nullable().optional(),
|
|
286
|
+
created_time: z.string().optional(),
|
|
287
|
+
last_edited_time: z.string().optional(),
|
|
288
|
+
archived: z.boolean().optional(),
|
|
289
|
+
icon: notionLooseObjectSchema.nullable().optional(),
|
|
290
|
+
cover: notionLooseObjectSchema.nullable().optional(),
|
|
291
|
+
parent: notionPageParentSchema.optional(),
|
|
292
|
+
created_by: notionUserReferenceSchema.optional(),
|
|
293
|
+
last_edited_by: notionUserReferenceSchema.optional(),
|
|
294
|
+
in_trash: z.boolean().optional()
|
|
295
|
+
});
|
|
296
|
+
export const notionDatabaseRowMutationResultSchema = toolOutputSuccessSchema.extend({
|
|
297
|
+
action: z.enum(["created", "updated"]),
|
|
298
|
+
page_id: z.string(),
|
|
299
|
+
url: z.string().optional()
|
|
300
|
+
});
|
|
301
|
+
export const notionSchemaPropertySchema = z.object({
|
|
302
|
+
type: z.string(),
|
|
303
|
+
id: z.string(),
|
|
304
|
+
options: z.array(z.string()).optional(),
|
|
305
|
+
format_example: z.string().optional()
|
|
306
|
+
});
|
|
307
|
+
export const notionDatabaseQueryPageSchema = z.object({
|
|
308
|
+
page_id: z.string(),
|
|
309
|
+
properties: z.record(z.string(), notionReadablePropertyValueSchema),
|
|
310
|
+
url: z.string().optional(),
|
|
311
|
+
created_time: z.string().optional(),
|
|
312
|
+
last_edited_time: z.string().optional()
|
|
313
|
+
});
|
|
314
|
+
export const notionQueryDatabaseFailureSchema = toolOutputFailureSchema.extend({
|
|
315
|
+
pages: z.array(notionDatabaseQueryPageSchema),
|
|
316
|
+
total_returned: z.literal(0),
|
|
317
|
+
has_more: z.literal(false),
|
|
318
|
+
next_cursor: z.null(),
|
|
319
|
+
error: z.string(),
|
|
320
|
+
hint: z.string()
|
|
321
|
+
});
|
|
322
|
+
export const notionQueryDatabaseSuccessSchema = toolOutputSuccessSchema.extend({
|
|
323
|
+
pages: z.array(notionDatabaseQueryPageSchema),
|
|
324
|
+
total_returned: z.number(),
|
|
325
|
+
has_more: z.boolean(),
|
|
326
|
+
next_cursor: z.string().nullable()
|
|
327
|
+
});
|
|
328
|
+
export const notionModifyBlocksAppendResultSchema = z.object({
|
|
329
|
+
operation: z.literal("append"),
|
|
330
|
+
actions: z.array(runHistoryActionBaseSchema),
|
|
331
|
+
block_ids: z.array(z.string()),
|
|
332
|
+
blocks_count: z.number()
|
|
333
|
+
});
|
|
334
|
+
export const notionModifyBlocksUpdateResultSchema = z.object({
|
|
335
|
+
operation: z.literal("update"),
|
|
336
|
+
actions: z.array(runHistoryActionBaseSchema),
|
|
337
|
+
block_id: z.string()
|
|
338
|
+
});
|
|
339
|
+
export const notionModifyBlocksDeleteResultSchema = z.object({
|
|
340
|
+
operation: z.literal("delete"),
|
|
341
|
+
actions: z.array(runHistoryActionBaseSchema),
|
|
342
|
+
block_id: z.string()
|
|
343
|
+
});
|
|
344
|
+
export const notionModifyBlocksOperationResultSchema = z.union([notionModifyBlocksAppendResultSchema, notionModifyBlocksUpdateResultSchema, notionModifyBlocksDeleteResultSchema]);
|
|
345
|
+
export const notionModifyBlocksAppendSuccessSchema = toolOutputSuccessSchema.extend({
|
|
346
|
+
operation: z.literal("append"),
|
|
347
|
+
block_ids: z.array(z.string()),
|
|
348
|
+
blocks_count: z.number()
|
|
349
|
+
});
|
|
350
|
+
export const notionModifyBlocksSingleBlockSuccessSchema = toolOutputSuccessSchema.extend({
|
|
351
|
+
operation: z.enum(["update", "delete"]),
|
|
352
|
+
block_id: z.string()
|
|
353
|
+
});
|
|
354
|
+
export const notionModifyBlocksBatchSuccessSchema = toolOutputSuccessSchema.extend({
|
|
355
|
+
operations: z.array(notionModifyBlocksOperationResultSchema),
|
|
356
|
+
block_ids: z.array(z.string()),
|
|
357
|
+
total_operations: z.number()
|
|
358
|
+
});
|
|
359
|
+
export const notionModifyBlocksSuccessSchema = z.union([notionModifyBlocksAppendSuccessSchema, notionModifyBlocksSingleBlockSuccessSchema, notionModifyBlocksBatchSuccessSchema]);
|
|
360
|
+
export const notionModifyBlocksFailureSchema = toolOutputFailureSchema.extend({
|
|
361
|
+
error: z.string(),
|
|
362
|
+
block_ids: z.array(z.string()),
|
|
363
|
+
operations: z.array(notionModifyBlocksOperationResultSchema).optional(),
|
|
364
|
+
failed_at_index: z.number().optional(),
|
|
365
|
+
total_operations: z.number().optional(),
|
|
366
|
+
hint: z.string().optional(),
|
|
367
|
+
retry_instructions: z.string().optional()
|
|
368
|
+
});
|
|
369
|
+
export const notionWorkspaceUserSchema = z.object({
|
|
370
|
+
id: z.string(),
|
|
371
|
+
name: z.string(),
|
|
372
|
+
email: z.string().optional()
|
|
373
|
+
});
|
|
374
|
+
export const gmailHeaderSchema = z.object({
|
|
375
|
+
key: z.string(),
|
|
376
|
+
value: z.string()
|
|
377
|
+
});
|
|
378
|
+
export const gmailSendSummarySchema = z.object({
|
|
379
|
+
message_id: z.string(),
|
|
380
|
+
thread_id: z.string(),
|
|
381
|
+
to: z.string(),
|
|
382
|
+
subject: z.string(),
|
|
383
|
+
summary: z.string(),
|
|
384
|
+
is_reply: z.boolean()
|
|
385
|
+
});
|
|
386
|
+
export const gmailDraftSummarySchema = z.object({
|
|
387
|
+
draft_id: z.string(),
|
|
388
|
+
message_id: z.string(),
|
|
389
|
+
thread_id: z.string(),
|
|
390
|
+
draft_url: z.string(),
|
|
391
|
+
to: z.string(),
|
|
392
|
+
subject: z.string(),
|
|
393
|
+
summary: z.string(),
|
|
394
|
+
is_reply: z.boolean()
|
|
395
|
+
});
|
|
396
|
+
export const confluencePageSpaceSchema = z.object({
|
|
397
|
+
id: z.union([z.string(), z.number()]),
|
|
398
|
+
key: z.string(),
|
|
399
|
+
name: z.string(),
|
|
400
|
+
type: z.string()
|
|
401
|
+
});
|
|
402
|
+
export const confluencePageVersionAuthorSchema = z.object({
|
|
403
|
+
type: z.string(),
|
|
404
|
+
username: z.string().optional(),
|
|
405
|
+
userKey: z.string().optional(),
|
|
406
|
+
accountId: z.string().optional(),
|
|
407
|
+
displayName: z.string().optional()
|
|
408
|
+
});
|
|
409
|
+
export const confluencePageVersionSchema = z.object({
|
|
410
|
+
number: z.number(),
|
|
411
|
+
when: z.string(),
|
|
412
|
+
message: z.string().optional(),
|
|
413
|
+
by: confluencePageVersionAuthorSchema.optional()
|
|
414
|
+
});
|
|
415
|
+
export const confluenceBodyRepresentationSchema = z.object({
|
|
416
|
+
value: z.string(),
|
|
417
|
+
representation: z.string()
|
|
418
|
+
});
|
|
419
|
+
export const confluenceBodyContentSchema = z.object({
|
|
420
|
+
storage: confluenceBodyRepresentationSchema.optional(),
|
|
421
|
+
view: confluenceBodyRepresentationSchema.optional(),
|
|
422
|
+
export_view: confluenceBodyRepresentationSchema.optional()
|
|
423
|
+
});
|
|
424
|
+
export const confluencePageRelationSchema = z.object({
|
|
425
|
+
id: z.string(),
|
|
426
|
+
title: z.string(),
|
|
427
|
+
type: z.string()
|
|
428
|
+
});
|
|
429
|
+
export const confluenceCommentPositionSchema = z.object({
|
|
430
|
+
start: z.number(),
|
|
431
|
+
end: z.number()
|
|
432
|
+
});
|
|
433
|
+
export const confluencePageQueryResultSchema = z.object({
|
|
434
|
+
page_id: z.string(),
|
|
435
|
+
title: z.string(),
|
|
436
|
+
type: z.string(),
|
|
437
|
+
status: z.string(),
|
|
438
|
+
space: confluencePageSpaceSchema.optional(),
|
|
439
|
+
version: confluencePageVersionSchema.optional(),
|
|
440
|
+
created_date: z.string().optional(),
|
|
441
|
+
last_modified: z.string().optional(),
|
|
442
|
+
url: z.string().optional(),
|
|
443
|
+
body: confluenceBodyContentSchema,
|
|
444
|
+
body_text: z.string(),
|
|
445
|
+
ancestors: z.array(confluencePageRelationSchema),
|
|
446
|
+
descendants: z.array(confluencePageRelationSchema),
|
|
447
|
+
ancestors_count: z.number(),
|
|
448
|
+
descendants_count: z.number()
|
|
449
|
+
});
|
|
450
|
+
export const posthogSeverityLevelSchema = z.enum(["error", "warn", "info", "debug"]);
|
|
451
|
+
export const posthogSessionSummarySchema = z.object({
|
|
452
|
+
id: z.string(),
|
|
453
|
+
startTime: z.string().optional(),
|
|
454
|
+
endTime: z.string().optional(),
|
|
455
|
+
duration: z.number().optional(),
|
|
456
|
+
eventsCount: z.number(),
|
|
457
|
+
sessionUrl: z.string(),
|
|
458
|
+
personId: z.string(),
|
|
459
|
+
distinctId: z.string()
|
|
460
|
+
});
|
|
461
|
+
export const posthogSearchSessionsPaginationSchema = z.object({
|
|
462
|
+
limit: z.number(),
|
|
463
|
+
offset: z.number(),
|
|
464
|
+
hasNext: z.boolean(),
|
|
465
|
+
hasPrevious: z.boolean(),
|
|
466
|
+
nextOffset: z.number().nullable(),
|
|
467
|
+
previousOffset: z.number().nullable()
|
|
468
|
+
});
|
|
469
|
+
export const posthogSearchSessionsFoundSchema = toolOutputSuccessSchema.extend({
|
|
470
|
+
userEmail: z.string(),
|
|
471
|
+
projectId: z.string(),
|
|
472
|
+
personFound: z.literal(true),
|
|
473
|
+
personId: z.string(),
|
|
474
|
+
distinctId: z.string(),
|
|
475
|
+
totalSessions: z.number(),
|
|
476
|
+
sessions: z.array(posthogSessionSummarySchema),
|
|
477
|
+
sessionsLink: z.string(),
|
|
478
|
+
pagination: posthogSearchSessionsPaginationSchema,
|
|
479
|
+
message: z.string()
|
|
480
|
+
});
|
|
481
|
+
export const posthogSearchSessionsNotFoundSchema = toolOutputSuccessSchema.extend({
|
|
482
|
+
userEmail: z.string(),
|
|
483
|
+
projectId: z.string(),
|
|
484
|
+
personFound: z.literal(false),
|
|
485
|
+
sessions: z.array(posthogSessionSummarySchema).length(0),
|
|
486
|
+
totalSessions: z.literal(0),
|
|
487
|
+
message: z.string()
|
|
488
|
+
});
|
|
489
|
+
export const posthogLogEntrySchema = z.object({
|
|
490
|
+
id: z.string(),
|
|
491
|
+
timestamp: z.string().optional(),
|
|
492
|
+
level: z.string(),
|
|
493
|
+
message: z.string(),
|
|
494
|
+
service: z.string(),
|
|
495
|
+
attributes: z.record(z.string(), z.unknown())
|
|
496
|
+
});
|
|
497
|
+
export const posthogOffsetPaginationSchema = z.object({
|
|
498
|
+
limit: z.number(),
|
|
499
|
+
offset: z.number(),
|
|
500
|
+
hasMore: z.boolean(),
|
|
501
|
+
nextOffset: z.number().nullable(),
|
|
502
|
+
showing: z.string()
|
|
503
|
+
});
|
|
504
|
+
export const posthogEventCountSchema = z.object({
|
|
505
|
+
eventName: z.string(),
|
|
506
|
+
count: z.number()
|
|
507
|
+
});
|
|
508
|
+
export const posthogEventSummarySchema = z.object({
|
|
509
|
+
id: z.string(),
|
|
510
|
+
event: z.string(),
|
|
511
|
+
timestamp: z.string().optional(),
|
|
512
|
+
distinctId: z.string().optional(),
|
|
513
|
+
url: z.string().optional()
|
|
514
|
+
});
|
|
515
|
+
export const posthogSessionEventTypeSchema = z.enum(["click", "input", "scroll", "console", "network_error", "navigation", "custom", "page_load", "viewport_resize"]);
|
|
516
|
+
export const posthogSessionEventSchema = z.object({
|
|
517
|
+
type: posthogSessionEventTypeSchema,
|
|
518
|
+
timestamp: z.number(),
|
|
519
|
+
relativeTime: z.number(),
|
|
520
|
+
data: z.record(z.string(), z.unknown())
|
|
521
|
+
});
|
|
522
|
+
export const posthogSessionConsoleLogSchema = z.object({
|
|
523
|
+
timestamp: z.string(),
|
|
524
|
+
level: z.string(),
|
|
525
|
+
message: z.string()
|
|
526
|
+
});
|
|
527
|
+
export const posthogSessionEventsSummarySchema = z.object({
|
|
528
|
+
totalRawEvents: z.number(),
|
|
529
|
+
meaningfulEventsReturned: z.number(),
|
|
530
|
+
consoleLogsReturned: z.number()
|
|
531
|
+
});
|
|
532
|
+
export const linearCreateTicketInputSchema = z.object({
|
|
533
|
+
integrationId: z.string().describe("The integration ID of the Linear workspace to use."),
|
|
534
|
+
ticket: z.object({
|
|
535
|
+
title: z.string(),
|
|
536
|
+
teamId: z.string(),
|
|
537
|
+
description: z.string().nullable().optional(),
|
|
538
|
+
stateId: z.string().nullable().optional(),
|
|
539
|
+
priority: z.number().nullable().optional(),
|
|
540
|
+
projectId: z.string().nullable().optional(),
|
|
541
|
+
labelIds: z.array(z.string()).nullable().optional(),
|
|
542
|
+
assigneeId: z.string().nullable().optional()
|
|
543
|
+
})
|
|
544
|
+
});
|
|
545
|
+
export const linearUpdateTicketUpdatesSchema = z.object({
|
|
546
|
+
title: z.string().nullable().optional().describe("The updated title of the ticket."),
|
|
547
|
+
description: z.string().nullable().optional().describe("The updated description of the ticket."),
|
|
548
|
+
stateId: z.string().nullable().optional().describe("The ID of the state to set. Use linear_get_states to find available states."),
|
|
549
|
+
priority: z.number().nullable().optional().describe("The priority of the ticket. 0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low."),
|
|
550
|
+
projectId: z.string().nullable().optional().describe("The ID of the project to associate with the ticket. Use linear_get_projects to find available projects."),
|
|
551
|
+
labelIds: z.array(z.string()).nullable().optional().describe("The IDs of labels to add to the ticket. Use linear_get_labels to find available labels."),
|
|
552
|
+
assigneeId: z.string().nullable().optional().describe("The ID of the user to assign the ticket to. Use linear_get_users to find available users and their IDs.")
|
|
553
|
+
});
|
|
554
|
+
export const linearUpdateTicketInputSchema = z.object({
|
|
555
|
+
integrationId: z.string().describe("The integration ID of the Linear workspace to use."),
|
|
556
|
+
issueId: z.string().describe("The ID of the Linear issue to update. Use linear_search_ticket to find the issue ID."),
|
|
557
|
+
updates: linearUpdateTicketUpdatesSchema
|
|
558
|
+
});
|
|
559
|
+
export const linearAddCommentInputSchema = z.object({
|
|
560
|
+
integrationId: z.string().describe("The integration ID of the Linear workspace to use."),
|
|
561
|
+
issueId: z.string().describe("The ID of the Linear issue to add the comment to. Use linear_search_ticket to find the issue ID."),
|
|
562
|
+
body: z.string().describe("The comment text to add to the issue.")
|
|
563
|
+
});
|
|
564
|
+
export const linearSearchTicketDateFilterFieldSchema = z.enum(["updatedAt", "createdAt"]);
|
|
565
|
+
export const linearSearchTicketInputSchema = z.object({
|
|
566
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use."),
|
|
567
|
+
searchTerm: z
|
|
568
|
+
.string()
|
|
569
|
+
.optional()
|
|
570
|
+
.default("")
|
|
571
|
+
.describe(`Plain-text keyword search (matched against titles, descriptions, etc.).
|
|
572
|
+
Do NOT include operators or field filters. Use dedicated parameters instead.
|
|
573
|
+
✓ "block kit"
|
|
574
|
+
✗ "team:TER state:Done updated:>2026-02-04 block kit"`),
|
|
575
|
+
stateNames: z
|
|
576
|
+
.array(z.nativeEnum(LinearStateName))
|
|
577
|
+
.nullable()
|
|
578
|
+
.optional()
|
|
579
|
+
.describe(`Filter to only include issues with these state names. Available states: ${linearStateNameValues.join(", ")}.`),
|
|
580
|
+
dateFilterField: linearSearchTicketDateFilterFieldSchema
|
|
581
|
+
.nullable()
|
|
582
|
+
.optional()
|
|
583
|
+
.describe("Which date field to filter on. Required if using dateAfter or dateBefore. Options: 'updatedAt' (when issue was last modified) or 'createdAt' (when issue was created)."),
|
|
584
|
+
dateAfter: z
|
|
585
|
+
.string()
|
|
586
|
+
.nullable()
|
|
587
|
+
.optional()
|
|
588
|
+
.describe("Filter to only include issues where the dateFilterField is on or after this date. ISO 8601 format (e.g., '2026-01-01' or '2026-01-01T00:00:00Z')."),
|
|
589
|
+
dateBefore: z
|
|
590
|
+
.string()
|
|
591
|
+
.nullable()
|
|
592
|
+
.optional()
|
|
593
|
+
.describe("Filter to only include issues where the dateFilterField is on or before this date. ISO 8601 format (e.g., '2026-02-01' or '2026-02-01T23:59:59Z')."),
|
|
594
|
+
limit: z.number().nullable().optional().describe("Maximum number of issues to return. Defaults to 10 if not provided."),
|
|
595
|
+
after: z.string().nullable().optional().describe("Cursor for pagination. Use the endCursor from the previous response to fetch the next page of results.")
|
|
596
|
+
});
|
|
597
|
+
export const linearReadTicketInputSchema = z.object({
|
|
598
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use."),
|
|
599
|
+
issueId: z.string().describe("The Linear issue ID (UUID) or identifier (e.g. 'PROJ-123')."),
|
|
600
|
+
includeComments: z.boolean().nullable().optional().describe("Whether to include comments. Defaults to true.")
|
|
601
|
+
});
|
|
602
|
+
export const linearGetStatesInputSchema = z.object({
|
|
603
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use."),
|
|
604
|
+
teamId: z.string().nullable().optional().describe("Optional team ID to limit results to that team's states.")
|
|
605
|
+
});
|
|
606
|
+
export const linearGetLabelsInputSchema = z.object({
|
|
607
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use."),
|
|
608
|
+
teamId: z.string().nullable().optional().describe("Optional team ID to limit results to that team's labels.")
|
|
609
|
+
});
|
|
610
|
+
export const linearGetProjectsInputSchema = z.object({
|
|
611
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use."),
|
|
612
|
+
teamId: z.string().nullable().optional().describe("Optional team ID to limit results to that team's projects.")
|
|
613
|
+
});
|
|
614
|
+
export const linearGetTeamsInputSchema = z.object({
|
|
615
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use.")
|
|
616
|
+
});
|
|
617
|
+
export const linearGetUsersInputSchema = z.object({
|
|
618
|
+
integrationId: z.string().describe("The integration ID of the Linear integration to use.")
|
|
619
|
+
});
|
|
620
|
+
export const slackSendMessageInputSchema = z.object({
|
|
621
|
+
integrationId: z.string().describe("The integration ID of the Slack workspace to use."),
|
|
622
|
+
channelId: z.string().describe("Slack channel or DM channel ID from the configured output destinations."),
|
|
623
|
+
message: z.string().describe("Message content (mrkdwn). Used as fallback for Block Kit or main message."),
|
|
624
|
+
thread_ts: z
|
|
625
|
+
.string()
|
|
626
|
+
.nullable()
|
|
627
|
+
.optional()
|
|
628
|
+
.describe("Thread timestamp to reply to existing thread. If sending a message to a thread, this should be the timestamp of the thread to reply to. If sending an unthreaded message, this should be set to null."),
|
|
629
|
+
blocks: z.string().nullable().optional().describe("Block Kit JSON array string for interactive messages with buttons, structured layouts")
|
|
630
|
+
});
|
|
631
|
+
export const slackListChannelsTypesSchema = z.enum(["public", "private", "im", "mpim", "all"]);
|
|
632
|
+
export const slackListChannelsInputSchema = z.object({
|
|
633
|
+
integrationId: z.string().describe("The integration ID of the Slack workspace (user_slack_integrations id)."),
|
|
634
|
+
types: slackListChannelsTypesSchema.nullable().optional().describe("Filter by type: public (public channels), private (private channels), im (DMs), mpim (group DMs), or all. Defaults to all."),
|
|
635
|
+
limit: z.number().min(1).max(500).nullable().optional().default(100).describe("Maximum number of conversations to return."),
|
|
636
|
+
cursor: z.string().nullable().optional().describe("Pagination cursor from a previous response (nextCursor). Omit on first call.")
|
|
637
|
+
});
|
|
638
|
+
export const slackListUsersInputSchema = z.object({
|
|
639
|
+
integrationId: z.string().describe("The integration ID of the Slack workspace (user_slack_integrations id)."),
|
|
640
|
+
query: z.string().nullable().optional().describe("Optional search query to filter users by name. Case-insensitive partial match.")
|
|
641
|
+
});
|
|
642
|
+
export const slackReadConversationInputSchema = z.object({
|
|
643
|
+
integrationId: z.string().describe("The integration ID of the Slack workspace (user_slack_integrations id)."),
|
|
644
|
+
channelId: z.string().describe("The Slack channel ID to read (from slack_list_channels)."),
|
|
645
|
+
limit: z.number().min(1).max(200).nullable().optional().default(50).describe("Maximum number of messages to return."),
|
|
646
|
+
cursor: z.string().nullable().optional().describe("Pagination cursor from a previous response (nextCursor). Omit on first call.")
|
|
647
|
+
});
|
|
648
|
+
export const jiraAssigneeInputSchema = z
|
|
649
|
+
.object({
|
|
650
|
+
email: z.string().describe("The assignee email")
|
|
651
|
+
})
|
|
652
|
+
.nullable();
|
|
653
|
+
export const jiraCreateTicketInputSchema = z.object({
|
|
654
|
+
integrationId: z.string().describe("The integration ID of the Atlassian/Jira integration to use."),
|
|
655
|
+
title: z.string().describe("The issue title/summary. This is required."),
|
|
656
|
+
description: z.string().nullable().optional().describe("The issue description in plain text or markdown format."),
|
|
657
|
+
projectKey: z.string().describe('The Jira project key (e.g., "PROJ", "TEAM"). This is required.'),
|
|
658
|
+
issueType: z.string().nullable().optional().describe('The Jira issue type (e.g., "Task", "Bug", "Story", "Epic", "Subtask", "Improvement", "New Feature")').default("Task"),
|
|
659
|
+
assignee: jiraAssigneeInputSchema.optional().describe("The assignee of the ticket"),
|
|
660
|
+
priority: z.number().nullable().optional().describe("The priority of the ticket (number, typically 1-5)"),
|
|
661
|
+
labels: z.array(z.string()).nullable().optional().describe("The labels for the ticket (array of label names)"),
|
|
662
|
+
dueDate: z.string().nullable().optional().describe('The due date for the ticket in format "yyyy-MM-dd" (e.g., "2024-12-31"). Note: Jira requires the due date format to be yyyy-MM-dd.')
|
|
663
|
+
});
|
|
664
|
+
export const jiraUpdateTicketInputSchema = z.object({
|
|
665
|
+
integrationId: z.string().describe("The integration ID of the Atlassian/Jira integration to use."),
|
|
666
|
+
issueKey: z.string().describe('The key of the Jira issue to update (e.g., "PROJ-123"). This is required.'),
|
|
667
|
+
title: z.string().nullable().optional().describe("The issue title/summary."),
|
|
668
|
+
description: z.string().nullable().optional().describe("The issue description in plain text or markdown format."),
|
|
669
|
+
status: z.string().nullable().optional().describe('The status name to transition to (e.g., "In Progress", "Done", "To Do").'),
|
|
670
|
+
assignee: jiraAssigneeInputSchema.optional().describe("The assignee of the ticket. Set to null to unassign."),
|
|
671
|
+
priority: z.number().nullable().optional().describe("The priority of the ticket (number, typically 1-5)."),
|
|
672
|
+
labels: z.array(z.string()).nullable().optional().describe("The labels for the ticket (array of label names). This replaces all existing labels."),
|
|
673
|
+
dueDate: z
|
|
674
|
+
.string()
|
|
675
|
+
.nullable()
|
|
676
|
+
.optional()
|
|
677
|
+
.describe('The due date for the ticket in format "yyyy-MM-dd" (e.g., "2024-12-31"). Note: Jira requires the due date format to be yyyy-MM-dd. Set to null to remove due date.')
|
|
678
|
+
});
|
|
679
|
+
export const jiraSearchTicketInputSchema = z.object({
|
|
680
|
+
integrationId: z.string().describe("The integration ID of the Atlassian/Jira integration to use."),
|
|
681
|
+
jql: z.string().nullable().optional().describe("JQL (Jira Query Language) query to search for issues. If not provided, will search all issues."),
|
|
682
|
+
text: z.string().nullable().optional().describe('Text to search for in issue titles and descriptions. If provided, will be converted to JQL: text ~ "search term"'),
|
|
683
|
+
projectKey: z.string().nullable().optional().describe('Filter by Jira project key (e.g., "PROJ", "TEAM")'),
|
|
684
|
+
assigneeEmail: z.string().nullable().optional().describe("Filter by assignee email address"),
|
|
685
|
+
status: z.string().nullable().optional().describe('Filter by status name (e.g., "In Progress", "Done", "To Do")'),
|
|
686
|
+
limit: z.number().nullable().optional().describe("Maximum number of issues to return. Defaults to 50 if not provided."),
|
|
687
|
+
nextPageToken: z
|
|
688
|
+
.string()
|
|
689
|
+
.nullable()
|
|
690
|
+
.optional()
|
|
691
|
+
.describe("Token from a previous search response to retrieve the next page of results. Use the nextPageToken value from the previous response to paginate through all results.")
|
|
692
|
+
});
|
|
693
|
+
export const searchGitHubCodeInputSchema = z.object({
|
|
694
|
+
repositoryNames: z.array(z.string()).describe("Array of repository full names (owner/repo format) to search in."),
|
|
695
|
+
query: z.string().describe('The search query. Use natural language or code-specific terms. Examples: "authentication middleware", "class UserRepository", "handleSubmit form validation"'),
|
|
696
|
+
language: z.string().nullable().optional().describe('Filter by programming language (e.g., "typescript", "python", "javascript"). Use null to search all languages.'),
|
|
697
|
+
filename: z.string().nullable().optional().describe('Filter by filename pattern (e.g., "*.test.ts" for test files, "*.config.*" for config files). Use null to search all files.'),
|
|
698
|
+
path: z.string().nullable().optional().describe('Filter by path (e.g., "src/components" to only search in that directory). Use null to search everywhere.'),
|
|
699
|
+
perPage: z.number().describe("Number of results to return (default: 10, max: 100)"),
|
|
700
|
+
page: z
|
|
701
|
+
.number()
|
|
702
|
+
.int()
|
|
703
|
+
.min(1)
|
|
704
|
+
.nullable()
|
|
705
|
+
.describe("Page number for pagination (default: 1). Use this to fetch additional results if there are more than perPage results. Use null for page 1. Must be a positive integer >= 1.")
|
|
706
|
+
});
|
|
707
|
+
export const grepGitHubCodeInputSchema = z.object({
|
|
708
|
+
repositoryNames: z.array(z.string()).describe("Array of repository full names (owner/repo format) to search in."),
|
|
709
|
+
pattern: z.string().describe('The exact text pattern to search for. For function calls, include the opening parenthesis (e.g., "fetchUser("). For strings, include quotes if needed.'),
|
|
710
|
+
fileExtension: z.string().nullable().optional().describe('Filter by file extension (e.g., "ts", "js", "py"). Do not include the dot. Use null to search all file types.'),
|
|
711
|
+
path: z.string().nullable().optional().describe('Filter by directory path (e.g., "src/services" to only search in that directory). Use null to search everywhere.'),
|
|
712
|
+
perPage: z.number().describe("Number of results to return (default: 20, max: 100)"),
|
|
713
|
+
page: z
|
|
714
|
+
.number()
|
|
715
|
+
.int()
|
|
716
|
+
.min(1)
|
|
717
|
+
.nullable()
|
|
718
|
+
.describe("Page number for pagination (default: 1). Use this to fetch additional results if there are more than perPage results. Use null for page 1. Must be a positive integer >= 1.")
|
|
719
|
+
});
|
|
720
|
+
export const readGitHubFileInputSchema = z.object({
|
|
721
|
+
repository: z.string().describe('The repository in "owner/repo" format (e.g., "facebook/react"). Must be one of the configured repositories.'),
|
|
722
|
+
path: z.string().describe('The file path within the repository (e.g., "src/components/Button.tsx" or "README.md")'),
|
|
723
|
+
startLine: z.number().nullable().optional().describe("Start reading from this line number (1-indexed). Use with endLine for partial file reads. Use null to start from beginning."),
|
|
724
|
+
endLine: z.number().nullable().optional().describe("Stop reading at this line number (1-indexed, inclusive). Use with startLine for partial file reads. Use null to read to end.")
|
|
725
|
+
});
|
|
726
|
+
export const listGitHubDirectoryInputSchema = z.object({
|
|
727
|
+
repository: z.string().describe('The repository in "owner/repo" format (e.g., "facebook/react"). Must be one of the configured repositories.'),
|
|
728
|
+
path: z.string().describe('The directory path to list (e.g., "src/components"). Use empty string "" for root directory.'),
|
|
729
|
+
recursive: z.boolean().describe("If true, list all files recursively (can be large for big repos). Use false for single-level listing.")
|
|
730
|
+
});
|
|
731
|
+
export const listGitHubPullRequestsInputSchema = z.object({
|
|
732
|
+
repository: z.string().describe('Repository in "owner/repo" format (e.g., "facebook/react"). Must be one of the configured repositories.'),
|
|
733
|
+
state: z.enum(["open", "closed", "all"]).describe('Filter by PR state. Use "closed" to see merged PRs, "open" for in-progress, or "all" for both.'),
|
|
734
|
+
since: z
|
|
735
|
+
.string()
|
|
736
|
+
.nullable()
|
|
737
|
+
.describe('Start date in YYYY-MM-DD format (e.g., "2024-01-15"). Only PRs updated on or after this date (starting at 00:00:00) are included. Use null for no start filter.'),
|
|
738
|
+
until: z.string().nullable().describe('End date in YYYY-MM-DD format (e.g., "2024-01-15"). Only PRs updated on or before this date (ending at 23:59:59) are included. Use null for no end filter.'),
|
|
739
|
+
perPage: z.number().describe("Number of results to return (default: 20, max: 100)"),
|
|
740
|
+
page: z
|
|
741
|
+
.number()
|
|
742
|
+
.int()
|
|
743
|
+
.min(1)
|
|
744
|
+
.nullable()
|
|
745
|
+
.describe("Page number for pagination (default: 1). Use this to fetch additional PRs if there are more than perPage results. Use null for page 1. Must be a positive integer >= 1.")
|
|
746
|
+
});
|
|
747
|
+
export const listGitHubCommitsInputSchema = z.object({
|
|
748
|
+
repository: z.string().describe('Repository in "owner/repo" format (e.g., "facebook/react"). Must be one of the configured repositories.'),
|
|
749
|
+
since: z
|
|
750
|
+
.string()
|
|
751
|
+
.nullable()
|
|
752
|
+
.describe('Start of time window (ISO date string, e.g., "2024-01-01" or "2024-01-15T00:00:00Z"). Only commits after this date are included. Use null for no start filter.'),
|
|
753
|
+
until: z.string().nullable().optional().describe("End of time window (ISO date string). Only commits before this date are included. Use null for no end filter."),
|
|
754
|
+
branch: z.string().nullable().optional().describe('Branch name to list commits from (e.g., "main", "develop"). Use null for the repository\'s default branch.'),
|
|
755
|
+
path: z.string().nullable().optional().describe('Only include commits that affect this file or directory path (e.g., "src/components" or "package.json"). Use null for all paths.'),
|
|
756
|
+
author: z.string().nullable().optional().describe("Filter commits by author (GitHub username or email). Use null for all authors."),
|
|
757
|
+
perPage: z.number().describe("Number of results to return (default: 30, max: 100)")
|
|
758
|
+
});
|
|
759
|
+
export const summarizeGitHubPullRequestDiffInputSchema = z.object({
|
|
760
|
+
repository: z.string().describe('The repository in "owner/repo" format (e.g., "facebook/react"). Must be one of the configured repositories.'),
|
|
761
|
+
pullNumber: z.number().describe("The pull request number (e.g., 123 for PR #123)"),
|
|
762
|
+
page: z
|
|
763
|
+
.number()
|
|
764
|
+
.int()
|
|
765
|
+
.min(1)
|
|
766
|
+
.nullable()
|
|
767
|
+
.describe("Page number for pagination (default: 1). Use this to fetch additional files if a PR has more than 100 files. Use null for page 1. Must be a positive integer >= 1."),
|
|
768
|
+
context: z
|
|
769
|
+
.string()
|
|
770
|
+
.nullable()
|
|
771
|
+
.describe('Optional high-level context about what you\'re looking for in this PR. This helps the sub-agent focus its analysis. For example: "I need to understand the authentication changes" or "Focus on database migration changes". Use null if no specific context.')
|
|
772
|
+
});
|
|
773
|
+
export const notionCreateOrUpdatePageInputSchema = z.object({
|
|
774
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
775
|
+
page_id: z.string().nullable().optional().describe("ID of an existing page to update. Omit or null to create a new subpage under parentPageId."),
|
|
776
|
+
parentPageId: z
|
|
777
|
+
.string()
|
|
778
|
+
.optional()
|
|
779
|
+
.nullable()
|
|
780
|
+
.describe("Required for create: the allowed page ID under which to create the new subpage (from the Notion config list). Ignored when page_id is provided for update."),
|
|
781
|
+
title: z.string().describe("The page title (used for both create and update).")
|
|
782
|
+
});
|
|
783
|
+
export const notionCreateOrUpdateDatabaseRowInputSchema = z.object({
|
|
784
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
785
|
+
databaseId: z.string().describe("The Notion database ID (data source ID)."),
|
|
786
|
+
page_id: z.string().nullable().describe("The ID of the row to update (from notion_query_database). MUST be null to create a new row. Provide a valid page ID to update an existing row."),
|
|
787
|
+
properties_json: z
|
|
788
|
+
.string()
|
|
789
|
+
.describe('JSON string with property names and Notion-formatted values. Example: "{\\"Name\\": {\\"title\\": [{\\"text\\": {\\"content\\": \\"New Item\\"}}]}, \\"Status\\": {\\"select\\": {\\"name\\": \\"In Progress\\"}}}"')
|
|
790
|
+
});
|
|
791
|
+
export const notionModifyBlocksInputSchema = z.object({
|
|
792
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
793
|
+
pageId: z.string().describe("The Notion page ID to modify."),
|
|
794
|
+
operation_json: z.string().describe(`JSON string: a single operation object OR an array of operation objects (executed in order).
|
|
795
|
+
Each operation: operation ("append"|"update"|"delete"); for append: blocks (array), optional parent_block_id, optional after_block_id; for update: block_id, block; for delete: block_id.
|
|
796
|
+
Append with after_block_id inserts after that block; omit for end of page/parent.`)
|
|
797
|
+
});
|
|
798
|
+
export const notionQueryPageInputSchema = z.object({
|
|
799
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
800
|
+
pageId: z.string().describe("The Notion page ID to query.")
|
|
801
|
+
});
|
|
802
|
+
export const notionQueryDatabaseInputSchema = z.object({
|
|
803
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
804
|
+
databaseId: z.string().describe("The Notion database ID (data source ID) to query."),
|
|
805
|
+
filter_properties: z
|
|
806
|
+
.array(z.string())
|
|
807
|
+
.nullable()
|
|
808
|
+
.optional()
|
|
809
|
+
.describe("Array of property names or IDs to include in results. Only these properties will be returned, improving performance. Use property names from the database schema."),
|
|
810
|
+
filter: z.string().nullable().optional()
|
|
811
|
+
.describe(`JSON string with filter object to query pages matching specific criteria. Supports complex filtering with AND/OR logic, property filters, and timestamp filters.
|
|
812
|
+
|
|
813
|
+
BASIC STRUCTURE:
|
|
814
|
+
- Property filter: { "property": "Property Name", "type": { "condition": value } }
|
|
815
|
+
- Timestamp filter: { "timestamp": "created_time" | "last_edited_time", "created_time" | "last_edited_time": { "condition": value } }
|
|
816
|
+
- Compound filter: { "and": [...] } or { "or": [...] } to combine multiple filters (nesting supported up to 2 levels)
|
|
817
|
+
|
|
818
|
+
PROPERTY FILTER TYPES AND CONDITIONS:
|
|
819
|
+
|
|
820
|
+
1. CHECKBOX: { "property": "Name", "checkbox": { "equals": true|false } | { "does_not_equal": true|false } }
|
|
821
|
+
|
|
822
|
+
2. DATE: { "property": "Name", "date": {
|
|
823
|
+
"after": "2021-05-10" | "2021-05-10T12:00:00" | "2021-10-15T12:00:00-07:00",
|
|
824
|
+
"before": "2021-05-10",
|
|
825
|
+
"equals": "2021-05-10",
|
|
826
|
+
"on_or_after": "2021-05-10",
|
|
827
|
+
"on_or_before": "2021-05-10",
|
|
828
|
+
"is_empty": true,
|
|
829
|
+
"is_not_empty": true,
|
|
830
|
+
"past_week": {},
|
|
831
|
+
"past_month": {},
|
|
832
|
+
"past_year": {},
|
|
833
|
+
"next_week": {},
|
|
834
|
+
"next_month": {},
|
|
835
|
+
"next_year": {},
|
|
836
|
+
"this_week": {}
|
|
837
|
+
} }
|
|
838
|
+
|
|
839
|
+
3. FILES: { "property": "Name", "files": { "is_empty": true } | { "is_not_empty": true } }
|
|
840
|
+
|
|
841
|
+
4. FORMULA: { "property": "Name", "formula": {
|
|
842
|
+
"checkbox": { checkbox conditions },
|
|
843
|
+
"date": { date conditions },
|
|
844
|
+
"number": { number conditions },
|
|
845
|
+
"string": { rich_text conditions }
|
|
846
|
+
} }
|
|
847
|
+
|
|
848
|
+
5. MULTI_SELECT: { "property": "Name", "multi_select": {
|
|
849
|
+
"contains": "Value",
|
|
850
|
+
"does_not_contain": "Value",
|
|
851
|
+
"is_empty": true,
|
|
852
|
+
"is_not_empty": true
|
|
853
|
+
} }
|
|
854
|
+
|
|
855
|
+
6. NUMBER: { "property": "Name", "number": {
|
|
856
|
+
"equals": 42,
|
|
857
|
+
"does_not_equal": 42,
|
|
858
|
+
"greater_than": 42,
|
|
859
|
+
"less_than": 42,
|
|
860
|
+
"greater_than_or_equal_to": 42,
|
|
861
|
+
"less_than_or_equal_to": 42,
|
|
862
|
+
"is_empty": true,
|
|
863
|
+
"is_not_empty": true
|
|
864
|
+
} }
|
|
865
|
+
|
|
866
|
+
7. PEOPLE (also for created_by, last_edited_by): { "property": "Name", "people": {
|
|
867
|
+
"contains": "uuid-v4",
|
|
868
|
+
"does_not_contain": "uuid-v4",
|
|
869
|
+
"is_empty": true,
|
|
870
|
+
"is_not_empty": true
|
|
871
|
+
} }
|
|
872
|
+
|
|
873
|
+
8. RELATION: { "property": "Name", "relation": {
|
|
874
|
+
"contains": "uuid-v4",
|
|
875
|
+
"does_not_contain": "uuid-v4",
|
|
876
|
+
"is_empty": true,
|
|
877
|
+
"is_not_empty": true
|
|
878
|
+
} }
|
|
879
|
+
|
|
880
|
+
9. RICH_TEXT (also title): { "property": "Name", "rich_text": {
|
|
881
|
+
"contains": "string",
|
|
882
|
+
"does_not_contain": "string",
|
|
883
|
+
"does_not_equal": "string",
|
|
884
|
+
"ends_with": "string",
|
|
885
|
+
"equals": "string",
|
|
886
|
+
"is_empty": true,
|
|
887
|
+
"is_not_empty": true,
|
|
888
|
+
"starts_with": "string"
|
|
889
|
+
} }
|
|
890
|
+
|
|
891
|
+
10. ROLLUP: { "property": "Name", "rollup": {
|
|
892
|
+
"any": { filter condition },
|
|
893
|
+
"every": { filter condition },
|
|
894
|
+
"none": { filter condition },
|
|
895
|
+
"date": { date conditions },
|
|
896
|
+
"number": { number conditions }
|
|
897
|
+
} }
|
|
898
|
+
|
|
899
|
+
11. SELECT: { "property": "Name", "select": {
|
|
900
|
+
"equals": "Value",
|
|
901
|
+
"does_not_equal": "Value",
|
|
902
|
+
"is_empty": true,
|
|
903
|
+
"is_not_empty": true
|
|
904
|
+
} }
|
|
905
|
+
|
|
906
|
+
12. STATUS: { "property": "Name", "status": {
|
|
907
|
+
"equals": "Value",
|
|
908
|
+
"does_not_equal": "Value",
|
|
909
|
+
"is_empty": true,
|
|
910
|
+
"is_not_empty": true
|
|
911
|
+
} }
|
|
912
|
+
|
|
913
|
+
13. TIMESTAMP: { "timestamp": "created_time" | "last_edited_time", "created_time" | "last_edited_time": {
|
|
914
|
+
same conditions as DATE filter (after, before, equals, on_or_after, on_or_before, is_empty, is_not_empty, past_week, past_month, past_year, next_week, next_month, next_year, this_week)
|
|
915
|
+
} }
|
|
916
|
+
NOTE: Do NOT include "property" field for timestamp filters.
|
|
917
|
+
|
|
918
|
+
14. VERIFICATION: { "property": "Name", "verification": { "status": "verified" | "expired" | "none" } }
|
|
919
|
+
|
|
920
|
+
15. UNIQUE_ID: { "property": "Name", "unique_id": {
|
|
921
|
+
"equals": 42,
|
|
922
|
+
"does_not_equal": 42,
|
|
923
|
+
"greater_than": 42,
|
|
924
|
+
"less_than": 42,
|
|
925
|
+
"greater_than_or_equal_to": 42,
|
|
926
|
+
"less_than_or_equal_to": 42
|
|
927
|
+
} }
|
|
928
|
+
|
|
929
|
+
COMPOUND FILTERS:
|
|
930
|
+
- AND: { "and": [filter1, filter2, ...] } - all conditions must match
|
|
931
|
+
- OR: { "or": [filter1, filter2, ...] } - any condition can match
|
|
932
|
+
- Nesting: Can nest AND/OR up to 2 levels deep
|
|
933
|
+
|
|
934
|
+
EXAMPLES:
|
|
935
|
+
- Simple: "{\\"property\\": \\"Task completed\\", \\"checkbox\\": {\\"equals\\": true}}"
|
|
936
|
+
- Compound: "{\\"and\\": [{\\"property\\": \\"Done\\", \\"checkbox\\": {\\"equals\\": true}}, {\\"or\\": [{\\"property\\": \\"Tags\\", \\"multi_select\\": {\\"contains\\": \\"A\\"}}, {\\"property\\": \\"Tags\\", \\"multi_select\\": {\\"contains\\": \\"B\\"}}]}]}"
|
|
937
|
+
- Timestamp: "{\\"timestamp\\": \\"created_time\\", \\"created_time\\": {\\"on_or_after\\": \\"2023-02-08\\"}}"`),
|
|
938
|
+
page_size: z.number().int().min(1).max(100).nullable().optional().describe("Number of results per page (1-100). Default returns all results. Use pagination for large databases."),
|
|
939
|
+
start_cursor: z.string().nullable().optional().describe("Cursor from previous response to fetch next page. Use next_cursor from response when has_more is true."),
|
|
940
|
+
result_type: z.enum(["page", "data_source"]).nullable().optional().describe("Filter results to only pages or data sources. Only relevant for wiki databases.")
|
|
941
|
+
});
|
|
942
|
+
export const notionGetSchemaInputSchema = z.object({
|
|
943
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
944
|
+
databaseId: z.string().describe("The Notion database ID (data source ID) to get the schema for.")
|
|
945
|
+
});
|
|
946
|
+
export const notionFetchRelatedEventsInputSchema = z.object({
|
|
947
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
948
|
+
pageId: z.string().describe("The Notion page ID (not used directly, but required for consistency)."),
|
|
949
|
+
block_id: z.string().describe("The Notion block ID to fetch related events for")
|
|
950
|
+
});
|
|
951
|
+
export const notionListUsersInputSchema = z.object({
|
|
952
|
+
integrationId: z.string().describe("The integration ID of the Notion workspace to use."),
|
|
953
|
+
query: z.string().nullable().optional().describe("Optional search query to filter users by name. Case-insensitive partial match.")
|
|
954
|
+
});
|
|
955
|
+
export const gmailSendEmailInputSchema = z.object({
|
|
956
|
+
integrationId: z.string().describe("The integration ID of the Gmail account to use."),
|
|
957
|
+
to: z.string().describe("Recipient email address(es). Multiple addresses can be comma-separated."),
|
|
958
|
+
subject: z.string().describe("Email subject line"),
|
|
959
|
+
body: z.string().nullable().optional().describe("Plain text email body content. Do not include image URLs here — images cannot be embedded in plain text."),
|
|
960
|
+
html_body: z
|
|
961
|
+
.string()
|
|
962
|
+
.nullable()
|
|
963
|
+
.optional()
|
|
964
|
+
.describe('HTML email body content. If provided with body, sends multipart/alternative. NEVER use <img src="https://..."> with remote URLs — they will expire. Images must be passed via image_urls and referenced as <img src="cid:image-1.png">.'),
|
|
965
|
+
thread_id: z.string().nullable().optional().describe("Gmail Thread ID (numeric string from the email event, NOT the Message-ID header). Omit for new emails."),
|
|
966
|
+
cc: z.string().nullable().optional().describe("CC recipient email address(es). Multiple addresses can be comma-separated."),
|
|
967
|
+
bcc: z.string().nullable().optional().describe("BCC recipient email address(es). Multiple addresses can be comma-separated."),
|
|
968
|
+
image_urls: z
|
|
969
|
+
.array(z.string())
|
|
970
|
+
.nullable()
|
|
971
|
+
.optional()
|
|
972
|
+
.describe('URLs of images to embed in the email. Must be signed URLs from our internal GCS image bucket. Each image is downloaded and base64-encoded as an inline MIME attachment with a Content-ID. Images are assigned sequential filenames: image-1.png, image-2.png, etc. (extension reflects actual MIME type). You MUST reference each one in html_body as <img src="cid:image-1.png">, <img src="cid:image-2.png">, etc. Do NOT put the raw URLs in html_body.'),
|
|
973
|
+
custom_headers: z
|
|
974
|
+
.array(gmailHeaderSchema)
|
|
975
|
+
.nullable()
|
|
976
|
+
.optional()
|
|
977
|
+
.describe('Custom email headers as key-value pairs. Useful for adding headers like List-Unsubscribe, List-Unsubscribe-Post, X-Priority, etc. Example: {"List-Unsubscribe": "<mailto:unsubscribe@example.com>", "List-Unsubscribe-Post": "List-Unsubscribe=One-Click"}')
|
|
978
|
+
});
|
|
979
|
+
export const gmailCreateDraftInputSchema = gmailSendEmailInputSchema.extend({
|
|
980
|
+
thread_id: z.string().nullable().optional().describe("Gmail Thread ID (numeric string from the email event, NOT the Message-ID header). Omit for new drafts.")
|
|
981
|
+
});
|
|
982
|
+
export const confluenceQueryPageInputSchema = z.object({
|
|
983
|
+
integrationId: z.string().describe("The integration ID of the Atlassian/Confluence integration to use."),
|
|
984
|
+
pageId: z.string().describe("The Confluence page ID to query.")
|
|
985
|
+
});
|
|
986
|
+
export const confluenceAddCommentInputSchema = z.object({
|
|
987
|
+
integrationId: z.string().describe("The integration ID of the Atlassian/Confluence integration to use."),
|
|
988
|
+
pageId: z.string().describe("The Confluence page ID to add a comment to."),
|
|
989
|
+
comment_text: z.string().describe("The text content of the comment to add."),
|
|
990
|
+
text_to_comment_on: z
|
|
991
|
+
.string()
|
|
992
|
+
.nullable()
|
|
993
|
+
.optional()
|
|
994
|
+
.describe("Optional: The specific text in the page that this comment refers to. If provided, the tool will try to find this text and attach the comment to it. If not provided, you must specify start_position and end_position."),
|
|
995
|
+
start_position: z
|
|
996
|
+
.number()
|
|
997
|
+
.nullable()
|
|
998
|
+
.optional()
|
|
999
|
+
.describe("Optional: The start character position (offset) in the page storage format where the comment should be attached. Required if text_to_comment_on is not provided."),
|
|
1000
|
+
end_position: z
|
|
1001
|
+
.number()
|
|
1002
|
+
.nullable()
|
|
1003
|
+
.optional()
|
|
1004
|
+
.describe("Optional: The end character position (offset) in the page storage format where the comment should be attached. Required if text_to_comment_on is not provided.")
|
|
1005
|
+
});
|
|
1006
|
+
export const searchPosthogSessionsInputSchema = z.object({
|
|
1007
|
+
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
1008
|
+
projectId: z.string().describe("The PostHog project ID."),
|
|
1009
|
+
userEmail: z.string().describe("The email address of the user to query session recordings for. Must be a valid email address."),
|
|
1010
|
+
limit: z.number().default(10).describe("Maximum number of session recordings to return (default: 10, max: 100)"),
|
|
1011
|
+
offset: z.number().default(0).describe("Offset for pagination (default: 0)"),
|
|
1012
|
+
last7Days: z
|
|
1013
|
+
.boolean()
|
|
1014
|
+
.default(false)
|
|
1015
|
+
.describe("If true and dateFrom is not provided, filters session recordings from the last 7 days only (default: false). If false, no date restriction is applied unless dateFrom is explicitly provided."),
|
|
1016
|
+
dateFrom: z
|
|
1017
|
+
.union([z.string(), z.null()])
|
|
1018
|
+
.describe('Start date for filtering (ISO format or relative like "-7d"). If not provided and last7Days is true, defaults to 7 days ago. If not provided and last7Days is false, no date restriction is applied.'),
|
|
1019
|
+
dateTo: z.string().nullable().optional().describe('End date for filtering (ISO format or relative like "now"). If not provided, defaults to now.')
|
|
1020
|
+
});
|
|
1021
|
+
export const searchPosthogLogsInputSchema = z.object({
|
|
1022
|
+
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
1023
|
+
projectId: z.string().describe("The PostHog project ID."),
|
|
1024
|
+
userEmail: z.string().nullable().optional().describe('Optional: User email to filter logs by (e.g., "user@example.com").'),
|
|
1025
|
+
severityLevels: z
|
|
1026
|
+
.union([z.array(posthogSeverityLevelSchema), z.null()])
|
|
1027
|
+
.describe('Optional: Array of log severity levels to filter by (e.g., ["error", "warn"]). If not provided, all severity levels are included.'),
|
|
1028
|
+
messageSearch: z.string().nullable().optional().describe("Optional: Text to search for within log messages. Searches are case-insensitive and match partial text."),
|
|
1029
|
+
limit: z.number().default(50).describe("Maximum number of log entries to return (default: 50, max: 250)"),
|
|
1030
|
+
offset: z.number().default(0).describe("Offset for pagination (default: 0). Use with limit to page through results. For example, offset=0 gets logs 1-50, offset=50 gets logs 51-100, etc."),
|
|
1031
|
+
last7Days: z
|
|
1032
|
+
.boolean()
|
|
1033
|
+
.default(false)
|
|
1034
|
+
.describe("If true and dateFrom is not provided, filters logs from the last 7 days only (default: false). If false, no date restriction is applied unless dateFrom is explicitly provided."),
|
|
1035
|
+
dateFrom: z
|
|
1036
|
+
.union([z.string(), z.null()])
|
|
1037
|
+
.describe('Start date for filtering (ISO format or relative like "-7d"). If not provided and last7Days is true, defaults to 7 days ago. If not provided and last7Days is false, no date restriction is applied.'),
|
|
1038
|
+
dateTo: z.string().nullable().optional().describe('End date for filtering (ISO format or relative like "now"). If not provided, defaults to now.')
|
|
1039
|
+
});
|
|
1040
|
+
export const getPosthogSessionEventsInputSchema = z.object({
|
|
1041
|
+
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
1042
|
+
projectId: z.string().describe("The PostHog project ID."),
|
|
1043
|
+
sessionId: z.string().uuid().describe("The PostHog session ID (UUID format) to fetch events for. You can get this from searchPosthogSessions."),
|
|
1044
|
+
startSeconds: z.number().nullable().optional().describe("Optional: Start time in seconds from the beginning of the session. If not provided, starts from the beginning."),
|
|
1045
|
+
endSeconds: z.number().nullable().optional().describe("Optional: End time in seconds from the beginning of the session. If not provided, goes until the end.")
|
|
1046
|
+
});
|
|
1047
|
+
export const posthogPropertyFilterValueSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
1048
|
+
export const posthogPropertyFilterOperatorSchema = z.enum(["exact", "is_not", "icontains", "not_icontains", "gt", "lt", "gte", "lte"]);
|
|
1049
|
+
export const posthogPropertyFilterSchema = z.object({
|
|
1050
|
+
key: z.string().describe("Property key to filter on"),
|
|
1051
|
+
value: posthogPropertyFilterValueSchema.describe("Property value to match"),
|
|
1052
|
+
operator: posthogPropertyFilterOperatorSchema.default("exact").describe("Comparison operator")
|
|
1053
|
+
});
|
|
1054
|
+
export const searchPosthogEventsInputSchema = z.object({
|
|
1055
|
+
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
1056
|
+
projectId: z.string().describe("The PostHog project ID."),
|
|
1057
|
+
countByEventNameOnly: z.boolean().default(true).describe("If true (default), returns only event names and their counts. If false, returns full event list (larger response)."),
|
|
1058
|
+
customEventsOnly: z
|
|
1059
|
+
.boolean()
|
|
1060
|
+
.default(true)
|
|
1061
|
+
.describe("If true (default), only include custom events (exclude PostHog built-in events whose names start with $, e.g. $pageview, $autocapture). If false, include all events. Use true to get counts for events the project actually tracks (works for any user's project)."),
|
|
1062
|
+
userEmail: z.string().nullable().optional().describe('Optional: User email to filter events by (e.g., "user@example.com").'),
|
|
1063
|
+
eventName: z.string().nullable().optional().describe('Optional: Specific event name to filter by (e.g., "$pageview", "button_clicked", "form_submitted").'),
|
|
1064
|
+
propertyFilters: z
|
|
1065
|
+
.union([z.array(posthogPropertyFilterSchema), z.null()])
|
|
1066
|
+
.optional()
|
|
1067
|
+
.describe("Optional: Array of property filters to apply. Each filter has a key, value, and operator."),
|
|
1068
|
+
limit: z.number().default(50).describe("Maximum number of events to return when countByEventNameOnly is false (default: 50, max: 100). Ignored when countByEventNameOnly is true."),
|
|
1069
|
+
offset: z.number().default(0).describe("Offset for pagination when countByEventNameOnly is false (default: 0). Ignored when countByEventNameOnly is true."),
|
|
1070
|
+
last7Days: z
|
|
1071
|
+
.boolean()
|
|
1072
|
+
.default(false)
|
|
1073
|
+
.describe("If true and dateFrom is not provided, filters events from the last 7 days only (default: false). If false, no date restriction is applied unless dateFrom is explicitly provided."),
|
|
1074
|
+
dateFrom: z
|
|
1075
|
+
.union([z.string(), z.null()])
|
|
1076
|
+
.describe('Start date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-06 14:00:00"). Do NOT use ISO format with T/Z (e.g. 2026-02-07T22:52:34Z) and do NOT use relative strings like "-7d". If not provided and last7Days is true, defaults to 7 days ago. If not provided and last7Days is false, no date restriction is applied.'),
|
|
1077
|
+
dateTo: z
|
|
1078
|
+
.union([z.string(), z.null()])
|
|
1079
|
+
.describe('End date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-07 14:00:00"). Do NOT use ISO format with T/Z and do NOT use relative strings like "now". If not provided, defaults to now.')
|
|
1080
|
+
});
|
|
1081
|
+
export const linearCreateTicketTool = defineTool({
|
|
1082
|
+
name: "linear_create_ticket",
|
|
1083
|
+
inputSchema: linearCreateTicketInputSchema,
|
|
1084
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1085
|
+
issue: linearIssueHandleSchema
|
|
1086
|
+
})
|
|
1087
|
+
});
|
|
1088
|
+
export const linearUpdateTicketTool = defineTool({
|
|
1089
|
+
name: "linear_update_ticket",
|
|
1090
|
+
inputSchema: linearUpdateTicketInputSchema,
|
|
1091
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1092
|
+
issue: linearIssueHandleSchema
|
|
1093
|
+
})
|
|
1094
|
+
});
|
|
1095
|
+
export const linearAddCommentTool = defineTool({
|
|
1096
|
+
name: "linear_add_comment",
|
|
1097
|
+
inputSchema: linearAddCommentInputSchema,
|
|
1098
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1099
|
+
comment: linearCommentHandleSchema
|
|
1100
|
+
})
|
|
1101
|
+
});
|
|
1102
|
+
export const linearSearchTicketTool = defineTool({
|
|
1103
|
+
name: "linear_search_ticket",
|
|
1104
|
+
inputSchema: linearSearchTicketInputSchema,
|
|
1105
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1106
|
+
issues: z.array(linearIssueSummarySchema),
|
|
1107
|
+
count: z.number(),
|
|
1108
|
+
query: z.string(),
|
|
1109
|
+
pagination: linearSearchPaginationSchema
|
|
1110
|
+
})
|
|
1111
|
+
});
|
|
1112
|
+
export const linearReadTicketTool = defineTool({
|
|
1113
|
+
name: "linear_read_ticket",
|
|
1114
|
+
inputSchema: linearReadTicketInputSchema,
|
|
1115
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1116
|
+
issue: linearIssueDetailSchema,
|
|
1117
|
+
comments: z.array(linearReadTicketCommentSchema).optional()
|
|
1118
|
+
})
|
|
1119
|
+
});
|
|
1120
|
+
export const linearGetStatesTool = defineTool({
|
|
1121
|
+
name: "linear_get_states",
|
|
1122
|
+
inputSchema: linearGetStatesInputSchema,
|
|
1123
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1124
|
+
states: z.array(linearStateSummarySchema)
|
|
1125
|
+
})
|
|
1126
|
+
});
|
|
1127
|
+
export const linearGetLabelsTool = defineTool({
|
|
1128
|
+
name: "linear_get_labels",
|
|
1129
|
+
inputSchema: linearGetLabelsInputSchema,
|
|
1130
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1131
|
+
labels: z.array(linearLabelSummarySchema)
|
|
1132
|
+
})
|
|
1133
|
+
});
|
|
1134
|
+
export const linearGetProjectsTool = defineTool({
|
|
1135
|
+
name: "linear_get_projects",
|
|
1136
|
+
inputSchema: linearGetProjectsInputSchema,
|
|
1137
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1138
|
+
projects: z.array(linearProjectSummarySchema)
|
|
1139
|
+
})
|
|
1140
|
+
});
|
|
1141
|
+
export const linearGetTeamsTool = defineTool({
|
|
1142
|
+
name: "linear_get_teams",
|
|
1143
|
+
inputSchema: linearGetTeamsInputSchema,
|
|
1144
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1145
|
+
teams: z.array(linearTeamSchema)
|
|
1146
|
+
})
|
|
1147
|
+
});
|
|
1148
|
+
export const linearGetUsersTool = defineTool({
|
|
1149
|
+
name: "linear_get_users",
|
|
1150
|
+
inputSchema: linearGetUsersInputSchema,
|
|
1151
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1152
|
+
users: z.array(linearUserSummarySchema)
|
|
1153
|
+
})
|
|
1154
|
+
});
|
|
1155
|
+
export const slackSendMessageTool = defineTool({
|
|
1156
|
+
name: "slack_send_message",
|
|
1157
|
+
inputSchema: slackSendMessageInputSchema,
|
|
1158
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1159
|
+
message_ts: z.string().optional(),
|
|
1160
|
+
channel: z.string(),
|
|
1161
|
+
thread_ts: z.string().optional(),
|
|
1162
|
+
summary: z.string(),
|
|
1163
|
+
has_blocks: z.boolean()
|
|
1164
|
+
})
|
|
1165
|
+
});
|
|
1166
|
+
export const slackListChannelsTool = defineTool({
|
|
1167
|
+
name: "slack_list_channels",
|
|
1168
|
+
inputSchema: slackListChannelsInputSchema,
|
|
1169
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1170
|
+
channels: z.array(slackChannelListItemSchema),
|
|
1171
|
+
count: z.number(),
|
|
1172
|
+
nextCursor: z.string().nullable(),
|
|
1173
|
+
hasMore: z.boolean()
|
|
1174
|
+
})
|
|
1175
|
+
});
|
|
1176
|
+
export const slackListUsersTool = defineTool({
|
|
1177
|
+
name: "slack_list_users",
|
|
1178
|
+
inputSchema: slackListUsersInputSchema,
|
|
1179
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1180
|
+
users: z.array(slackUserResponseSchema),
|
|
1181
|
+
count: z.number()
|
|
1182
|
+
})
|
|
1183
|
+
});
|
|
1184
|
+
export const slackReadConversationTool = defineTool({
|
|
1185
|
+
name: "slack_read_conversation",
|
|
1186
|
+
inputSchema: slackReadConversationInputSchema,
|
|
1187
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1188
|
+
channelId: z.string(),
|
|
1189
|
+
channelName: z.string().optional(),
|
|
1190
|
+
messages: z.array(slackConversationMessageSchema),
|
|
1191
|
+
count: z.number(),
|
|
1192
|
+
hasMore: z.boolean(),
|
|
1193
|
+
nextCursor: z.string().nullable()
|
|
1194
|
+
})
|
|
1195
|
+
});
|
|
1196
|
+
export const jiraCreateTicketTool = defineTool({
|
|
1197
|
+
name: "jira_create_ticket",
|
|
1198
|
+
inputSchema: jiraCreateTicketInputSchema,
|
|
1199
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1200
|
+
issue: jiraIssueSummarySchema
|
|
1201
|
+
})
|
|
1202
|
+
});
|
|
1203
|
+
export const jiraUpdateTicketTool = defineTool({
|
|
1204
|
+
name: "jira_update_ticket",
|
|
1205
|
+
inputSchema: jiraUpdateTicketInputSchema,
|
|
1206
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1207
|
+
issue: jiraIssueSummarySchema,
|
|
1208
|
+
updatedFields: z.array(z.string())
|
|
1209
|
+
})
|
|
1210
|
+
});
|
|
1211
|
+
export const jiraSearchTicketTool = defineTool({
|
|
1212
|
+
name: "jira_search_ticket",
|
|
1213
|
+
inputSchema: jiraSearchTicketInputSchema,
|
|
1214
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1215
|
+
issues: z.array(jiraIssueSummarySchema),
|
|
1216
|
+
count: z.number(),
|
|
1217
|
+
total: z.number(),
|
|
1218
|
+
maxResults: z.number(),
|
|
1219
|
+
isLast: z.boolean(),
|
|
1220
|
+
nextPageToken: z.string().optional(),
|
|
1221
|
+
jql: z.string()
|
|
1222
|
+
})
|
|
1223
|
+
});
|
|
1224
|
+
export const searchGitHubCodeTool = defineTool({
|
|
1225
|
+
name: "searchGitHubCode",
|
|
1226
|
+
inputSchema: searchGitHubCodeInputSchema,
|
|
1227
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1228
|
+
totalCount: z.number(),
|
|
1229
|
+
resultsReturned: z.number(),
|
|
1230
|
+
query: z.string(),
|
|
1231
|
+
repositories: z.array(z.string()),
|
|
1232
|
+
pagination: gitHubPaginationSchema,
|
|
1233
|
+
results: z.array(gitHubCodeSearchResultSchema),
|
|
1234
|
+
message: z.string(),
|
|
1235
|
+
tip: z.string()
|
|
1236
|
+
})
|
|
1237
|
+
});
|
|
1238
|
+
export const grepGitHubCodeTool = defineTool({
|
|
1239
|
+
name: "grepGitHubCode",
|
|
1240
|
+
inputSchema: grepGitHubCodeInputSchema,
|
|
1241
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1242
|
+
totalCount: z.number(),
|
|
1243
|
+
resultsReturned: z.number(),
|
|
1244
|
+
pattern: z.string(),
|
|
1245
|
+
query: z.string(),
|
|
1246
|
+
repositories: z.array(z.string()),
|
|
1247
|
+
pagination: gitHubPaginationSchema,
|
|
1248
|
+
results: z.array(gitHubCodeGrepResultSchema),
|
|
1249
|
+
message: z.string(),
|
|
1250
|
+
tip: z.string()
|
|
1251
|
+
})
|
|
1252
|
+
});
|
|
1253
|
+
export const readGitHubFileTool = defineTool({
|
|
1254
|
+
name: "readGitHubFile",
|
|
1255
|
+
inputSchema: readGitHubFileInputSchema,
|
|
1256
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1257
|
+
repository: z.string(),
|
|
1258
|
+
path: z.string(),
|
|
1259
|
+
url: z.string(),
|
|
1260
|
+
totalLines: z.number(),
|
|
1261
|
+
displayedLines: z.string(),
|
|
1262
|
+
size: z.number(),
|
|
1263
|
+
content: z.string(),
|
|
1264
|
+
warning: z.string().optional()
|
|
1265
|
+
})
|
|
1266
|
+
});
|
|
1267
|
+
export const listGitHubDirectoryTool = defineTool({
|
|
1268
|
+
name: "listGitHubDirectory",
|
|
1269
|
+
inputSchema: listGitHubDirectoryInputSchema,
|
|
1270
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1271
|
+
repository: z.string(),
|
|
1272
|
+
path: z.string(),
|
|
1273
|
+
recursive: z.boolean(),
|
|
1274
|
+
totalItems: z.number(),
|
|
1275
|
+
directories: z.array(z.union([gitHubDirectoryEntrySchema, z.string()])),
|
|
1276
|
+
files: z.array(gitHubFileEntrySchema),
|
|
1277
|
+
warning: z.string().optional(),
|
|
1278
|
+
tip: z.string().optional(),
|
|
1279
|
+
truncated: z.boolean().optional(),
|
|
1280
|
+
other: z.array(gitHubOtherEntrySchema).optional()
|
|
1281
|
+
})
|
|
1282
|
+
});
|
|
1283
|
+
export const listGitHubPullRequestsTool = defineTool({
|
|
1284
|
+
name: "listGitHubPullRequests",
|
|
1285
|
+
inputSchema: listGitHubPullRequestsInputSchema,
|
|
1286
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1287
|
+
repository: z.string(),
|
|
1288
|
+
timeWindow: z.string(),
|
|
1289
|
+
summary: z.object({
|
|
1290
|
+
total: z.number(),
|
|
1291
|
+
merged: z.number(),
|
|
1292
|
+
open: z.number(),
|
|
1293
|
+
closed: z.number()
|
|
1294
|
+
}),
|
|
1295
|
+
pagination: gitHubPaginationSchema,
|
|
1296
|
+
pullRequests: z.array(gitHubPullRequestSummarySchema),
|
|
1297
|
+
message: z.string()
|
|
1298
|
+
})
|
|
1299
|
+
});
|
|
1300
|
+
export const listGitHubCommitsTool = defineTool({
|
|
1301
|
+
name: "listGitHubCommits",
|
|
1302
|
+
inputSchema: listGitHubCommitsInputSchema,
|
|
1303
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1304
|
+
repository: z.string(),
|
|
1305
|
+
timeWindow: z.string(),
|
|
1306
|
+
filters: z.string(),
|
|
1307
|
+
summary: z.object({
|
|
1308
|
+
total: z.number(),
|
|
1309
|
+
byAuthor: z.record(z.string(), z.number())
|
|
1310
|
+
}),
|
|
1311
|
+
commits: z.array(gitHubCommitSummarySchema),
|
|
1312
|
+
message: z.string(),
|
|
1313
|
+
tip: z.string()
|
|
1314
|
+
})
|
|
1315
|
+
});
|
|
1316
|
+
export const summarizeGitHubPullRequestDiffTool = defineTool({
|
|
1317
|
+
name: "summarizeGitHubPullRequestDiff",
|
|
1318
|
+
inputSchema: summarizeGitHubPullRequestDiffInputSchema,
|
|
1319
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1320
|
+
repository: z.string(),
|
|
1321
|
+
pullRequest: gitHubPullRequestRefSchema,
|
|
1322
|
+
summary: z.record(z.string(), z.unknown()),
|
|
1323
|
+
pagination: gitHubPaginationSchema,
|
|
1324
|
+
analysis: z.string(),
|
|
1325
|
+
message: z.string()
|
|
1326
|
+
})
|
|
1327
|
+
});
|
|
1328
|
+
export const notionCreateOrUpdatePageTool = defineTool({
|
|
1329
|
+
name: "notion_create_or_update_page",
|
|
1330
|
+
inputSchema: notionCreateOrUpdatePageInputSchema,
|
|
1331
|
+
outputSchema: notionDatabaseRowMutationResultSchema
|
|
1332
|
+
});
|
|
1333
|
+
export const notionCreateOrUpdateDatabaseRowTool = defineTool({
|
|
1334
|
+
name: "notion_create_or_update_database_row",
|
|
1335
|
+
inputSchema: notionCreateOrUpdateDatabaseRowInputSchema,
|
|
1336
|
+
outputSchema: notionDatabaseRowMutationResultSchema
|
|
1337
|
+
});
|
|
1338
|
+
export const notionModifyBlocksTool = defineTool({
|
|
1339
|
+
name: "notion_modify_blocks",
|
|
1340
|
+
inputSchema: notionModifyBlocksInputSchema,
|
|
1341
|
+
outputSchema: z.union([notionModifyBlocksSuccessSchema, notionModifyBlocksFailureSchema])
|
|
1342
|
+
});
|
|
1343
|
+
export const notionQueryPageTool = defineTool({
|
|
1344
|
+
name: "notion_query_page",
|
|
1345
|
+
inputSchema: notionQueryPageInputSchema,
|
|
1346
|
+
outputSchema: notionPageQueryMetadataSchema.extend({
|
|
1347
|
+
success: z.literal(true),
|
|
1348
|
+
actions: z.array(runHistoryActionBaseSchema).optional(),
|
|
1349
|
+
properties: z.record(z.string(), notionReadablePropertyValueSchema),
|
|
1350
|
+
properties_raw: z.record(z.string(), z.unknown()).optional(),
|
|
1351
|
+
blocks: z.array(notionPageBlockSchema),
|
|
1352
|
+
blocks_count: z.number()
|
|
1353
|
+
})
|
|
1354
|
+
});
|
|
1355
|
+
export const notionQueryDatabaseTool = defineTool({
|
|
1356
|
+
name: "notion_query_database",
|
|
1357
|
+
inputSchema: notionQueryDatabaseInputSchema,
|
|
1358
|
+
outputSchema: z.discriminatedUnion("success", [notionQueryDatabaseSuccessSchema, notionQueryDatabaseFailureSchema])
|
|
1359
|
+
});
|
|
1360
|
+
export const notionGetSchemaTool = defineTool({
|
|
1361
|
+
name: "notion_get_schema",
|
|
1362
|
+
inputSchema: notionGetSchemaInputSchema,
|
|
1363
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1364
|
+
data_source_id: z.string(),
|
|
1365
|
+
database_name: z.string(),
|
|
1366
|
+
schema: z.record(z.string(), notionSchemaPropertySchema),
|
|
1367
|
+
property_count: z.number()
|
|
1368
|
+
})
|
|
1369
|
+
});
|
|
1370
|
+
export const notionFetchRelatedEventsTool = defineTool({
|
|
1371
|
+
name: "notion_fetch_related_events",
|
|
1372
|
+
inputSchema: notionFetchRelatedEventsInputSchema,
|
|
1373
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1374
|
+
events_count: z.number(),
|
|
1375
|
+
events: z.string().optional(),
|
|
1376
|
+
message: z.string()
|
|
1377
|
+
})
|
|
1378
|
+
});
|
|
1379
|
+
export const notionListUsersTool = defineTool({
|
|
1380
|
+
name: "notion_list_users",
|
|
1381
|
+
inputSchema: notionListUsersInputSchema,
|
|
1382
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1383
|
+
users: z.array(notionWorkspaceUserSchema),
|
|
1384
|
+
count: z.number()
|
|
1385
|
+
})
|
|
1386
|
+
});
|
|
1387
|
+
export const gmailSendEmailTool = defineTool({
|
|
1388
|
+
name: "gmail_send_email",
|
|
1389
|
+
inputSchema: gmailSendEmailInputSchema,
|
|
1390
|
+
outputSchema: toolOutputSuccessSchema.merge(gmailSendSummarySchema)
|
|
1391
|
+
});
|
|
1392
|
+
export const gmailCreateDraftTool = defineTool({
|
|
1393
|
+
name: "gmail_create_draft",
|
|
1394
|
+
inputSchema: gmailCreateDraftInputSchema,
|
|
1395
|
+
outputSchema: toolOutputSuccessSchema.merge(gmailDraftSummarySchema)
|
|
1396
|
+
});
|
|
1397
|
+
export const confluenceQueryPageTool = defineTool({
|
|
1398
|
+
name: "confluence_query_page",
|
|
1399
|
+
inputSchema: confluenceQueryPageInputSchema,
|
|
1400
|
+
outputSchema: toolOutputSuccessSchema.merge(confluencePageQueryResultSchema)
|
|
1401
|
+
});
|
|
1402
|
+
export const confluenceAddCommentTool = defineTool({
|
|
1403
|
+
name: "confluence_add_comment",
|
|
1404
|
+
inputSchema: confluenceAddCommentInputSchema,
|
|
1405
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1406
|
+
comment_id: z.string(),
|
|
1407
|
+
comment_text: z.string(),
|
|
1408
|
+
position: confluenceCommentPositionSchema,
|
|
1409
|
+
text_commented_on: z.string().optional(),
|
|
1410
|
+
message: z.string()
|
|
1411
|
+
})
|
|
1412
|
+
});
|
|
1413
|
+
export const searchPosthogSessionsTool = defineTool({
|
|
1414
|
+
name: "searchPosthogSessions",
|
|
1415
|
+
inputSchema: searchPosthogSessionsInputSchema,
|
|
1416
|
+
outputSchema: z.union([posthogSearchSessionsFoundSchema, posthogSearchSessionsNotFoundSchema])
|
|
1417
|
+
});
|
|
1418
|
+
export const searchPosthogLogsTool = defineTool({
|
|
1419
|
+
name: "searchPosthogLogs",
|
|
1420
|
+
inputSchema: searchPosthogLogsInputSchema,
|
|
1421
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1422
|
+
userEmail: z.string().nullable(),
|
|
1423
|
+
severityLevels: z.array(posthogSeverityLevelSchema).nullable(),
|
|
1424
|
+
messageSearch: z.string().nullable(),
|
|
1425
|
+
projectId: z.string(),
|
|
1426
|
+
totalLogs: z.number(),
|
|
1427
|
+
logs: z.array(posthogLogEntrySchema),
|
|
1428
|
+
logsLink: z.string(),
|
|
1429
|
+
pagination: posthogOffsetPaginationSchema,
|
|
1430
|
+
message: z.string()
|
|
1431
|
+
})
|
|
1432
|
+
});
|
|
1433
|
+
export const getPosthogSessionEventsTool = defineTool({
|
|
1434
|
+
name: "getPosthogSessionEvents",
|
|
1435
|
+
inputSchema: getPosthogSessionEventsInputSchema,
|
|
1436
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1437
|
+
sessionId: z.string(),
|
|
1438
|
+
sessionUrl: z.string(),
|
|
1439
|
+
startTime: z.string(),
|
|
1440
|
+
duration: z.number().optional(),
|
|
1441
|
+
timeWindow: z.object({
|
|
1442
|
+
startSeconds: z.number(),
|
|
1443
|
+
endSeconds: z.number().nullable()
|
|
1444
|
+
}),
|
|
1445
|
+
summary: posthogSessionEventsSummarySchema,
|
|
1446
|
+
events: z.array(posthogSessionEventSchema),
|
|
1447
|
+
consoleLogs: z.array(posthogSessionConsoleLogSchema),
|
|
1448
|
+
message: z.string()
|
|
1449
|
+
})
|
|
1450
|
+
});
|
|
1451
|
+
export const searchPosthogEventsTool = defineTool({
|
|
1452
|
+
name: "searchPosthogEvents",
|
|
1453
|
+
inputSchema: searchPosthogEventsInputSchema,
|
|
1454
|
+
outputSchema: z.union([
|
|
1455
|
+
toolOutputSuccessSchema.extend({
|
|
1456
|
+
countByEventNameOnly: z.literal(true),
|
|
1457
|
+
customEventsOnly: z.boolean(),
|
|
1458
|
+
eventCounts: z.array(posthogEventCountSchema),
|
|
1459
|
+
totalEventTypes: z.number(),
|
|
1460
|
+
eventsLink: z.string(),
|
|
1461
|
+
message: z.string()
|
|
1462
|
+
}),
|
|
1463
|
+
toolOutputSuccessSchema.extend({
|
|
1464
|
+
userEmail: z.string().nullable(),
|
|
1465
|
+
eventName: z.string().nullable(),
|
|
1466
|
+
projectId: z.string(),
|
|
1467
|
+
totalEvents: z.number(),
|
|
1468
|
+
events: z.array(posthogEventSummarySchema),
|
|
1469
|
+
eventsLink: z.string(),
|
|
1470
|
+
pagination: posthogOffsetPaginationSchema,
|
|
1471
|
+
message: z.string()
|
|
1472
|
+
})
|
|
1473
|
+
])
|
|
1474
|
+
});
|
|
1475
|
+
// Datadog schemas
|
|
1476
|
+
export const datadogLogEntrySchema = z.object({
|
|
1477
|
+
id: z.string(),
|
|
1478
|
+
timestamp: z.string().optional(),
|
|
1479
|
+
message: z.string().optional(),
|
|
1480
|
+
host: z.string().optional(),
|
|
1481
|
+
service: z.string().optional(),
|
|
1482
|
+
status: z.string().optional(),
|
|
1483
|
+
tags: z.array(z.string()),
|
|
1484
|
+
customAttributes: z.record(z.string(), z.unknown())
|
|
1485
|
+
});
|
|
1486
|
+
export const datadogCursorPaginationSchema = z.object({
|
|
1487
|
+
limit: z.number(),
|
|
1488
|
+
cursor: z.string().nullable().optional(),
|
|
1489
|
+
nextCursor: z.string().nullable(),
|
|
1490
|
+
hasMore: z.boolean(),
|
|
1491
|
+
showing: z.string()
|
|
1492
|
+
});
|
|
1493
|
+
export const datadogRumSessionDetailsSchema = z.object({
|
|
1494
|
+
id: z.string().optional(),
|
|
1495
|
+
type: z.string().optional(),
|
|
1496
|
+
hasReplay: z.boolean().optional(),
|
|
1497
|
+
duration: z.number().optional()
|
|
1498
|
+
});
|
|
1499
|
+
export const datadogRumViewDetailsSchema = z.object({
|
|
1500
|
+
id: z.string().optional(),
|
|
1501
|
+
name: z.string().optional(),
|
|
1502
|
+
url: z.string().optional(),
|
|
1503
|
+
loadTime: z.number().optional(),
|
|
1504
|
+
timeSpent: z.number().optional()
|
|
1505
|
+
});
|
|
1506
|
+
export const datadogRumActionDetailsSchema = z.object({
|
|
1507
|
+
id: z.string().optional(),
|
|
1508
|
+
type: z.string().optional(),
|
|
1509
|
+
target: z.string().optional(),
|
|
1510
|
+
loadingTime: z.number().optional()
|
|
1511
|
+
});
|
|
1512
|
+
export const datadogRumErrorDetailsSchema = z.object({
|
|
1513
|
+
id: z.string().optional(),
|
|
1514
|
+
message: z.string().optional(),
|
|
1515
|
+
source: z.string().optional(),
|
|
1516
|
+
stack: z.string().optional(),
|
|
1517
|
+
type: z.string().optional()
|
|
1518
|
+
});
|
|
1519
|
+
export const datadogRumResourceDetailsSchema = z.object({
|
|
1520
|
+
id: z.string().optional(),
|
|
1521
|
+
type: z.string().optional(),
|
|
1522
|
+
url: z.string().optional(),
|
|
1523
|
+
method: z.string().optional(),
|
|
1524
|
+
statusCode: z.number().optional(),
|
|
1525
|
+
duration: z.number().optional()
|
|
1526
|
+
});
|
|
1527
|
+
export const datadogRumLongTaskDetailsSchema = z.object({
|
|
1528
|
+
id: z.string().optional(),
|
|
1529
|
+
duration: z.number().optional()
|
|
1530
|
+
});
|
|
1531
|
+
export const datadogRumEventSchema = z.object({
|
|
1532
|
+
id: z.string(),
|
|
1533
|
+
type: z.string(),
|
|
1534
|
+
timestamp: z.string().optional(),
|
|
1535
|
+
session: datadogRumSessionDetailsSchema.optional(),
|
|
1536
|
+
view: z.union([datadogRumViewDetailsSchema, z.record(z.string(), z.unknown())]).optional(),
|
|
1537
|
+
action: datadogRumActionDetailsSchema.optional(),
|
|
1538
|
+
error: datadogRumErrorDetailsSchema.optional(),
|
|
1539
|
+
resource: datadogRumResourceDetailsSchema.optional(),
|
|
1540
|
+
longTask: datadogRumLongTaskDetailsSchema.optional(),
|
|
1541
|
+
service: z.string().optional(),
|
|
1542
|
+
version: z.string().optional(),
|
|
1543
|
+
environment: z.string().optional(),
|
|
1544
|
+
device: z.record(z.string(), z.unknown()).optional(),
|
|
1545
|
+
os: z.record(z.string(), z.unknown()).optional(),
|
|
1546
|
+
browser: z.record(z.string(), z.unknown()).optional(),
|
|
1547
|
+
user: z.record(z.string(), z.unknown()).optional(),
|
|
1548
|
+
tags: z.array(z.string()),
|
|
1549
|
+
customAttributes: z.record(z.string(), z.unknown())
|
|
1550
|
+
});
|
|
1551
|
+
export const datadogAggregationBucketComputeSchema = z.object({
|
|
1552
|
+
value: z.unknown(),
|
|
1553
|
+
aggregation: z.string(),
|
|
1554
|
+
metric: z.string()
|
|
1555
|
+
});
|
|
1556
|
+
export const datadogAggregationBucketSchema = z.object({
|
|
1557
|
+
by: z.record(z.string(), z.unknown()),
|
|
1558
|
+
computes: z.record(z.string(), datadogAggregationBucketComputeSchema)
|
|
1559
|
+
});
|
|
1560
|
+
export const datadogAggregationMetaSchema = z.object({
|
|
1561
|
+
elapsed: z.number().optional(),
|
|
1562
|
+
requestId: z.string().optional(),
|
|
1563
|
+
status: z.unknown().optional()
|
|
1564
|
+
});
|
|
1565
|
+
// Datadog input schemas
|
|
1566
|
+
export const searchDatadogLogsInputSchema = z.object({
|
|
1567
|
+
integrationId: z.string().describe("The integration ID of the Datadog skill to use."),
|
|
1568
|
+
defaultIndexes: z
|
|
1569
|
+
.union([z.array(z.string()), z.null()])
|
|
1570
|
+
.optional()
|
|
1571
|
+
.describe('Default log indexes to search (e.g., ["main"]). Falls back to ["main"] if not provided.'),
|
|
1572
|
+
query: z.string().nullable().optional().describe("Datadog log search query (e.g., service:web AND @status:error)"),
|
|
1573
|
+
indexes: z
|
|
1574
|
+
.union([z.array(z.string()), z.null()])
|
|
1575
|
+
.optional()
|
|
1576
|
+
.describe('Log indexes to search (e.g., ["main"]). Defaults to defaultIndexes if not provided.'),
|
|
1577
|
+
from: z.string().nullable().optional().describe('Start time (ISO8601 or relative like "now-1h")'),
|
|
1578
|
+
to: z.string().nullable().optional().describe("End time (ISO8601). Defaults to now if not provided."),
|
|
1579
|
+
limit: z.number().default(50).describe("Maximum number of log entries to return (default: 50)"),
|
|
1580
|
+
cursor: z.string().nullable().optional().describe("Pagination cursor from previous response"),
|
|
1581
|
+
sort: z.enum(["timestamp", "-timestamp"]).default("timestamp").describe('Sort order: "timestamp" (ascending) or "-timestamp" (descending)')
|
|
1582
|
+
});
|
|
1583
|
+
export const searchRumEventsInputSchema = z.object({
|
|
1584
|
+
integrationId: z.string().describe("The integration ID of the Datadog skill to use."),
|
|
1585
|
+
query: z.string().nullable().optional().describe("Datadog RUM search query (e.g., @type:error AND @error.source:network)"),
|
|
1586
|
+
from: z.string().describe('Start time (ISO8601 or relative like "now-15m")'),
|
|
1587
|
+
to: z.string().nullable().optional().describe('End time (ISO8601). Defaults to "now" if not provided.'),
|
|
1588
|
+
limit: z.number().default(25).describe("Maximum number of RUM events to return (default: 25, max: 1000)"),
|
|
1589
|
+
pageCursor: z.string().nullable().optional().describe("Pagination cursor from previous response"),
|
|
1590
|
+
sort: z.enum(["timestamp", "-timestamp"]).default("timestamp").describe('Sort order: "timestamp" (ascending) or "-timestamp" (descending)'),
|
|
1591
|
+
timezone: z.string().default("GMT").describe('Timezone for time-based queries (default: "GMT")')
|
|
1592
|
+
});
|
|
1593
|
+
export const listRumEventsInputSchema = z.object({
|
|
1594
|
+
integrationId: z.string().describe("The integration ID of the Datadog skill to use."),
|
|
1595
|
+
query: z.string().nullable().optional().describe("Datadog RUM search query to filter events (e.g., @type:view)"),
|
|
1596
|
+
from: z.string().nullable().optional().describe('Minimum timestamp (ISO8601 only, e.g., "2020-09-17T11:48:36+01:00")'),
|
|
1597
|
+
to: z.string().nullable().optional().describe("Maximum timestamp (ISO8601 only). Defaults to now if not provided."),
|
|
1598
|
+
limit: z.number().default(25).describe("Maximum number of RUM events to return (default: 25, max: 1000)"),
|
|
1599
|
+
pageCursor: z.string().nullable().optional().describe("Pagination cursor from previous response"),
|
|
1600
|
+
sort: z.enum(["timestamp", "-timestamp"]).default("timestamp").describe('Sort order: "timestamp" (ascending) or "-timestamp" (descending)')
|
|
1601
|
+
});
|
|
1602
|
+
export const aggregateRumEventsInputSchema = z.object({
|
|
1603
|
+
query: z.string().nullable().optional().describe("Datadog RUM search query to filter events before aggregation (e.g., @type:view)"),
|
|
1604
|
+
from: z.string().describe('Start time (ISO8601 or relative like "now-15m")'),
|
|
1605
|
+
to: z.string().nullable().optional().describe('End time (ISO8601). Defaults to "now" if not provided.'),
|
|
1606
|
+
compute: z
|
|
1607
|
+
.array(z.object({
|
|
1608
|
+
aggregation: z.enum(["count", "pc90", "pc95", "pc99", "avg", "sum", "min", "max", "cardinality"]).describe("Aggregation: count, pc90/pc95/pc99, avg, sum, min, max, cardinality"),
|
|
1609
|
+
metric: z.string().describe('Metric to compute (e.g., @view.loading_time, @duration). Use "*" for count of all events.'),
|
|
1610
|
+
type: z.enum(["total", "timeseries"]).default("total").describe('Computation type: "total" (overall) or "timeseries" (time-bucketed)')
|
|
1611
|
+
}))
|
|
1612
|
+
.describe("Array of metrics to compute. At least one required."),
|
|
1613
|
+
groupBy: z
|
|
1614
|
+
.union([
|
|
1615
|
+
z.array(z.object({
|
|
1616
|
+
facet: z.string().describe("Facet to group by (e.g., @view.name, @service, @browser.name)"),
|
|
1617
|
+
limit: z.number().default(10).describe("Maximum number of groups to return (default: 10)"),
|
|
1618
|
+
total: z.boolean().default(false).describe('Include "total" group with all events combined (default: false)')
|
|
1619
|
+
})),
|
|
1620
|
+
z.null()
|
|
1621
|
+
])
|
|
1622
|
+
.describe("Facets to group results by"),
|
|
1623
|
+
timezone: z.string().default("GMT").describe('Timezone for time-based queries (default: "GMT")'),
|
|
1624
|
+
pageLimit: z.number().default(25).describe("Maximum number of buckets to return (default: 25)"),
|
|
1625
|
+
integrationId: z.string().describe("The integration ID of the Datadog skill to use.")
|
|
1626
|
+
});
|
|
1627
|
+
// Terse tool schemas
|
|
1628
|
+
export const webExtractResultItemSchema = z.object({
|
|
1629
|
+
url: z.string(),
|
|
1630
|
+
raw_content: z.string()
|
|
1631
|
+
});
|
|
1632
|
+
export const webExtractOutputSchema = z.object({
|
|
1633
|
+
results: z.array(webExtractResultItemSchema),
|
|
1634
|
+
failed_results: z.unknown()
|
|
1635
|
+
});
|
|
1636
|
+
export const webResearchSourceSchema = z.object({
|
|
1637
|
+
title: z.string(),
|
|
1638
|
+
url: z.string()
|
|
1639
|
+
});
|
|
1640
|
+
export const webResearchOutputSchema = toolOutputBaseSchema.extend({
|
|
1641
|
+
status: z.literal("completed"),
|
|
1642
|
+
request_id: z.string(),
|
|
1643
|
+
content: z.string().optional(),
|
|
1644
|
+
sources: z.array(webResearchSourceSchema).optional()
|
|
1645
|
+
});
|
|
1646
|
+
export const imageEditSnippetSchema = z.object({
|
|
1647
|
+
type: z.literal("image"),
|
|
1648
|
+
url: z.string()
|
|
1649
|
+
});
|
|
1650
|
+
export const imageEditOutputSchema = toolOutputBaseSchema.extend({
|
|
1651
|
+
url: z.string(),
|
|
1652
|
+
image_url: z.string(),
|
|
1653
|
+
summary: z.string(),
|
|
1654
|
+
snippets: z.array(imageEditSnippetSchema)
|
|
1655
|
+
});
|
|
1656
|
+
// Terse input schemas
|
|
1657
|
+
export const webExtractInputSchema = z.object({
|
|
1658
|
+
urls: z.union([z.string(), z.array(z.string())]).describe("URL or list of URLs to extract content from"),
|
|
1659
|
+
extract_depth: z.enum(["basic", "advanced"]).nullable().describe("'advanced' handles JavaScript-heavy pages but is slower")
|
|
1660
|
+
});
|
|
1661
|
+
export const webResearchInputSchema = z.object({
|
|
1662
|
+
input: z.string().describe("The research question or topic to investigate"),
|
|
1663
|
+
model: z.enum(["mini", "pro", "auto"]).nullable().describe("'mini' for quick focused research, 'pro' for comprehensive multi-angle research, 'auto' picks automatically")
|
|
1664
|
+
});
|
|
1665
|
+
export const imageEditInputSchema = z.object({
|
|
1666
|
+
image_url: z.string().describe("URL of the image to edit. Must be a signed URL from our internal GCS image bucket."),
|
|
1667
|
+
prompt: z.string().describe("Natural language instruction describing how to edit the image.")
|
|
1668
|
+
});
|
|
1669
|
+
export const searchDatadogLogsTool = defineTool({
|
|
1670
|
+
name: "searchDatadogLogs",
|
|
1671
|
+
inputSchema: searchDatadogLogsInputSchema,
|
|
1672
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1673
|
+
query: z.string().nullable(),
|
|
1674
|
+
indexes: z.array(z.string()),
|
|
1675
|
+
totalLogs: z.number(),
|
|
1676
|
+
logs: z.array(datadogLogEntrySchema),
|
|
1677
|
+
logsLink: z.string(),
|
|
1678
|
+
pagination: datadogCursorPaginationSchema,
|
|
1679
|
+
warnings: z.string().nullable(),
|
|
1680
|
+
message: z.string()
|
|
1681
|
+
})
|
|
1682
|
+
});
|
|
1683
|
+
export const searchRumEventsTool = defineTool({
|
|
1684
|
+
name: "searchRumEvents",
|
|
1685
|
+
inputSchema: searchRumEventsInputSchema,
|
|
1686
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1687
|
+
query: z.string().nullable(),
|
|
1688
|
+
totalEvents: z.number(),
|
|
1689
|
+
events: z.array(datadogRumEventSchema),
|
|
1690
|
+
eventsByType: z.record(z.string(), z.number()),
|
|
1691
|
+
rumLink: z.string(),
|
|
1692
|
+
pagination: datadogCursorPaginationSchema,
|
|
1693
|
+
warnings: z.string().nullable(),
|
|
1694
|
+
message: z.string()
|
|
1695
|
+
})
|
|
1696
|
+
});
|
|
1697
|
+
export const listRumEventsTool = defineTool({
|
|
1698
|
+
name: "listRumEvents",
|
|
1699
|
+
inputSchema: listRumEventsInputSchema,
|
|
1700
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1701
|
+
query: z.string().nullable(),
|
|
1702
|
+
totalEvents: z.number(),
|
|
1703
|
+
events: z.array(datadogRumEventSchema),
|
|
1704
|
+
eventsByType: z.record(z.string(), z.number()),
|
|
1705
|
+
rumLink: z.string(),
|
|
1706
|
+
pagination: datadogCursorPaginationSchema,
|
|
1707
|
+
warnings: z.string().nullable(),
|
|
1708
|
+
message: z.string()
|
|
1709
|
+
})
|
|
1710
|
+
});
|
|
1711
|
+
export const aggregateRumEventsTool = defineTool({
|
|
1712
|
+
name: "aggregateRumEvents",
|
|
1713
|
+
inputSchema: aggregateRumEventsInputSchema,
|
|
1714
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1715
|
+
query: z.string().nullable(),
|
|
1716
|
+
from: z.string(),
|
|
1717
|
+
to: z.string().nullable(),
|
|
1718
|
+
compute: z.string(),
|
|
1719
|
+
groupBy: z.string(),
|
|
1720
|
+
totalBuckets: z.number(),
|
|
1721
|
+
buckets: z.array(datadogAggregationBucketSchema),
|
|
1722
|
+
rumLink: z.string(),
|
|
1723
|
+
pagination: datadogCursorPaginationSchema.omit({ cursor: true }),
|
|
1724
|
+
warnings: z.string().nullable(),
|
|
1725
|
+
meta: datadogAggregationMetaSchema,
|
|
1726
|
+
message: z.string()
|
|
1727
|
+
})
|
|
1728
|
+
});
|
|
1729
|
+
export const webExtractTool = defineTool({
|
|
1730
|
+
name: "web_extract",
|
|
1731
|
+
inputSchema: webExtractInputSchema,
|
|
1732
|
+
outputSchema: webExtractOutputSchema
|
|
1733
|
+
});
|
|
1734
|
+
export const webResearchTool = defineTool({
|
|
1735
|
+
name: "web_research",
|
|
1736
|
+
inputSchema: webResearchInputSchema,
|
|
1737
|
+
outputSchema: webResearchOutputSchema
|
|
1738
|
+
});
|
|
1739
|
+
export const imageEditTool = defineTool({
|
|
1740
|
+
name: "image_edit",
|
|
1741
|
+
inputSchema: imageEditInputSchema,
|
|
1742
|
+
outputSchema: imageEditOutputSchema
|
|
1743
|
+
});
|
|
1744
|
+
// Attio schemas
|
|
1745
|
+
export const attioObjectSchema = z.object({
|
|
1746
|
+
api_slug: z.string(),
|
|
1747
|
+
singular_noun: z.string(),
|
|
1748
|
+
plural_noun: z.string()
|
|
1749
|
+
});
|
|
1750
|
+
export const attioAttributeSchema = z
|
|
1751
|
+
.object({
|
|
1752
|
+
api_slug: z.string().optional(),
|
|
1753
|
+
title: z.string().optional(),
|
|
1754
|
+
type: z.string().optional(),
|
|
1755
|
+
is_required: z.boolean().optional(),
|
|
1756
|
+
is_unique: z.boolean().optional()
|
|
1757
|
+
})
|
|
1758
|
+
.catchall(z.unknown());
|
|
1759
|
+
export const attioObjectWithAttributesSchema = attioObjectSchema.extend({
|
|
1760
|
+
attributes: z.array(attioAttributeSchema).optional()
|
|
1761
|
+
});
|
|
1762
|
+
export const attioRecordIdentifierSchema = z
|
|
1763
|
+
.object({
|
|
1764
|
+
workspace_id: z.string().optional(),
|
|
1765
|
+
object_id: z.string().optional(),
|
|
1766
|
+
record_id: z.string().optional()
|
|
1767
|
+
})
|
|
1768
|
+
.catchall(z.unknown());
|
|
1769
|
+
export const attioRecordSchema = z
|
|
1770
|
+
.object({
|
|
1771
|
+
id: attioRecordIdentifierSchema.optional(),
|
|
1772
|
+
values: z.record(z.string(), z.unknown()).optional(),
|
|
1773
|
+
web_url: z.string().optional(),
|
|
1774
|
+
created_at: z.string().optional()
|
|
1775
|
+
})
|
|
1776
|
+
.catchall(z.unknown());
|
|
1777
|
+
export const attioUpsertErrorSchema = z.object({
|
|
1778
|
+
index: z.number(),
|
|
1779
|
+
message: z.string()
|
|
1780
|
+
});
|
|
1781
|
+
// WorkOS schemas
|
|
1782
|
+
export const workOSUserSummarySchema = z.object({
|
|
1783
|
+
id: z.string(),
|
|
1784
|
+
email: z.string(),
|
|
1785
|
+
emailVerified: z.boolean(),
|
|
1786
|
+
firstName: z.string().nullable().optional(),
|
|
1787
|
+
lastName: z.string().nullable().optional(),
|
|
1788
|
+
profilePictureUrl: z.string().nullable().optional(),
|
|
1789
|
+
createdAt: z.string(),
|
|
1790
|
+
updatedAt: z.string()
|
|
1791
|
+
});
|
|
1792
|
+
export const workOSOrganizationSummarySchema = z.object({
|
|
1793
|
+
id: z.string(),
|
|
1794
|
+
name: z.string(),
|
|
1795
|
+
externalId: z.string().nullable().optional(),
|
|
1796
|
+
domains: z.array(z.string()),
|
|
1797
|
+
createdAt: z.string(),
|
|
1798
|
+
updatedAt: z.string()
|
|
1799
|
+
});
|
|
1800
|
+
export const workOSPaginationSchema = z.object({
|
|
1801
|
+
hasMore: z.boolean(),
|
|
1802
|
+
after: z.string().nullable().optional()
|
|
1803
|
+
});
|
|
1804
|
+
// LaunchDarkly schemas
|
|
1805
|
+
export const launchDarklyFlagSummarySchema = z.object({
|
|
1806
|
+
key: z.string(),
|
|
1807
|
+
name: z.string(),
|
|
1808
|
+
description: z.string(),
|
|
1809
|
+
environments: z.record(z.string(), z.boolean()),
|
|
1810
|
+
url: z.string(),
|
|
1811
|
+
environmentUrls: z.record(z.string(), z.string())
|
|
1812
|
+
});
|
|
1813
|
+
export const launchDarklyFlagMetadataSchema = z.object({
|
|
1814
|
+
key: z.string(),
|
|
1815
|
+
name: z.string(),
|
|
1816
|
+
description: z.string(),
|
|
1817
|
+
kind: z.string(),
|
|
1818
|
+
variations: z.array(z.record(z.string(), z.unknown())),
|
|
1819
|
+
tags: z.array(z.string()),
|
|
1820
|
+
maintainerId: z.string().nullable()
|
|
1821
|
+
});
|
|
1822
|
+
export const launchDarklyEnvironmentConfigSchema = z.object({
|
|
1823
|
+
on: z.boolean(),
|
|
1824
|
+
targets: z.array(z.record(z.string(), z.unknown())),
|
|
1825
|
+
contextTargets: z.array(z.record(z.string(), z.unknown())),
|
|
1826
|
+
rules: z.array(z.record(z.string(), z.unknown())),
|
|
1827
|
+
fallthrough: z.record(z.string(), z.unknown()).nullable(),
|
|
1828
|
+
offVariation: z.number().nullable(),
|
|
1829
|
+
prerequisites: z.array(z.record(z.string(), z.unknown()))
|
|
1830
|
+
});
|
|
1831
|
+
export const launchDarklyHistoryEntrySchema = z.object({
|
|
1832
|
+
id: z.string(),
|
|
1833
|
+
timestamp: z.string(),
|
|
1834
|
+
kind: z.string(),
|
|
1835
|
+
key: z.string(),
|
|
1836
|
+
name: z.string(),
|
|
1837
|
+
description: z.string(),
|
|
1838
|
+
member: z.record(z.string(), z.unknown()).nullable(),
|
|
1839
|
+
changes: z.array(z.record(z.string(), z.unknown()))
|
|
1840
|
+
});
|
|
1841
|
+
export const launchDarklyHistoryResultSchema = z.object({
|
|
1842
|
+
entries: z.array(launchDarklyHistoryEntrySchema),
|
|
1843
|
+
totalEntries: z.number(),
|
|
1844
|
+
url: z.string()
|
|
1845
|
+
});
|
|
1846
|
+
// Snowflake schemas
|
|
1847
|
+
export const snowflakeQueryRowSchema = z.record(z.string(), z.unknown());
|
|
1848
|
+
// Attio input schemas
|
|
1849
|
+
export const attioListObjectsInputSchema = z.object({
|
|
1850
|
+
integrationId: z.string().describe("The integration ID of the Attio workspace to use.")
|
|
1851
|
+
});
|
|
1852
|
+
export const attioQueryRecordsInputSchema = z.object({
|
|
1853
|
+
integrationId: z.string().describe("The integration ID of the Attio workspace to use."),
|
|
1854
|
+
objectSlug: z.string().describe("The Attio object type slug (e.g. 'people', 'companies')."),
|
|
1855
|
+
filter: z
|
|
1856
|
+
.string()
|
|
1857
|
+
.nullable()
|
|
1858
|
+
.describe('Optional Attio filter as a JSON string. Pass null for no filtering. Use shorthand (e.g. \'{"email_addresses":"test@example.com"}\') or verbose syntax with operators.'),
|
|
1859
|
+
limit: z.number().nullable().describe("Maximum number of records to return. Pass null to use the default of 20.")
|
|
1860
|
+
});
|
|
1861
|
+
export const attioUpsertRecordInputSchema = z.object({
|
|
1862
|
+
integrationId: z.string().describe("The integration ID of the Attio workspace to use."),
|
|
1863
|
+
objectSlug: z.string().describe("The Attio object type slug (e.g. 'people', 'companies')."),
|
|
1864
|
+
matchingAttribute: z.string().describe("The attribute slug to match on for upsert (e.g. 'email_addresses' for people, 'domains' for companies)."),
|
|
1865
|
+
records: z
|
|
1866
|
+
.string()
|
|
1867
|
+
.describe('A JSON string representing a list of Attio records to upsert. Each record should map attribute slugs to their values. For multi-value attributes like email_addresses, pass an array of strings. Example: \'[{"email_addresses":["test@example.com"],"name":"John"}]\'.')
|
|
1868
|
+
});
|
|
1869
|
+
// WorkOS input schemas
|
|
1870
|
+
export const listWorkOSUsersInputSchema = z.object({
|
|
1871
|
+
integrationId: z.string().describe("The integration ID of the WorkOS skill to use."),
|
|
1872
|
+
email: z.string().nullable().optional().describe("Optional exact email address filter. Omit or pass null to list all users."),
|
|
1873
|
+
organizationId: z.string().nullable().optional().describe("Optional WorkOS organization ID filter. Omit or pass null for all organizations."),
|
|
1874
|
+
limit: z.number().default(20).describe("Maximum number of users to return (default: 20, max: 100)."),
|
|
1875
|
+
after: z.string().nullable().optional().describe("Optional pagination cursor. Use the 'after' value from a previous response to get the next page.")
|
|
1876
|
+
});
|
|
1877
|
+
export const listWorkOSOrganizationsInputSchema = z.object({
|
|
1878
|
+
integrationId: z.string().describe("The integration ID of the WorkOS skill to use."),
|
|
1879
|
+
limit: z.number().default(20).describe("Maximum number of organizations to return (default: 20, max: 100)."),
|
|
1880
|
+
after: z.string().nullable().optional().describe("Optional pagination cursor. Use the 'after' value from a previous response to get the next page.")
|
|
1881
|
+
});
|
|
1882
|
+
export const getWorkOSUserInputSchema = z.object({
|
|
1883
|
+
integrationId: z.string().describe("The integration ID of the WorkOS skill to use."),
|
|
1884
|
+
userId: z.string().describe("The WorkOS user ID to look up.")
|
|
1885
|
+
});
|
|
1886
|
+
// LaunchDarkly input schemas
|
|
1887
|
+
export const listLaunchDarklyFlagsInputSchema = z.object({
|
|
1888
|
+
integrationId: z.string().describe("The integration ID of the LaunchDarkly skill to use."),
|
|
1889
|
+
projectKey: z.string().describe("The LaunchDarkly project key."),
|
|
1890
|
+
environmentKeys: z.array(z.string()).describe("Array of environment keys to query."),
|
|
1891
|
+
summary: z.boolean().default(true).describe("If true, return only flag key, name, and on/off state per environment. If false, return full flag details."),
|
|
1892
|
+
filter: z.string().nullable().optional().describe("Optional: Filter flags by name/key containing this text."),
|
|
1893
|
+
tags: z
|
|
1894
|
+
.union([z.array(z.string()), z.null()])
|
|
1895
|
+
.optional()
|
|
1896
|
+
.describe("Optional: Filter flags by tags.")
|
|
1897
|
+
});
|
|
1898
|
+
export const getLaunchDarklyFlagDetailsInputSchema = z.object({
|
|
1899
|
+
integrationId: z.string().describe("The integration ID of the LaunchDarkly skill to use."),
|
|
1900
|
+
projectKey: z.string().describe("The LaunchDarkly project key."),
|
|
1901
|
+
environmentKeys: z.array(z.string()).describe("Array of environment keys to query."),
|
|
1902
|
+
flagKey: z.string().describe("The flag key to retrieve."),
|
|
1903
|
+
environmentKey: z.string().nullable().optional().describe("Optional: Specific environment to get details for (if not provided, returns all configured environments)."),
|
|
1904
|
+
includeHistory: z.boolean().default(false).describe("If true, includes change history for the flag over the specified time window."),
|
|
1905
|
+
before: z.string().nullable().optional().describe("Optional: ISO date - only return history entries before this date (only used if includeHistory is true)."),
|
|
1906
|
+
after: z.string().nullable().optional().describe("Optional: ISO date - only return history entries after this date (only used if includeHistory is true)."),
|
|
1907
|
+
historyLimit: z.number().default(20).describe("Number of history entries to return if includeHistory is true (default: 20, max: 20).")
|
|
1908
|
+
});
|
|
1909
|
+
// Snowflake input schemas
|
|
1910
|
+
export const snowflakeExecuteQueryInputSchema = z.object({
|
|
1911
|
+
integrationId: z.string().describe("The integration ID of the Snowflake connection to use."),
|
|
1912
|
+
query: z.string().describe("The SQL query to execute. Should be a read-only SELECT statement.")
|
|
1913
|
+
});
|
|
1914
|
+
export const snowflakeExplainQueryInputSchema = z.object({
|
|
1915
|
+
integrationId: z.string().describe("The integration ID of the Snowflake connection to use."),
|
|
1916
|
+
query: z.string().describe("The SQL query to explain.")
|
|
1917
|
+
});
|
|
1918
|
+
export const webSearchResultItemSchema = z.object({
|
|
1919
|
+
title: z.string(),
|
|
1920
|
+
url: z.string(),
|
|
1921
|
+
content: z.string(),
|
|
1922
|
+
score: z.number()
|
|
1923
|
+
});
|
|
1924
|
+
export const webSearchOutputSchema = z.object({
|
|
1925
|
+
query: z.string(),
|
|
1926
|
+
answer: z.string().optional(),
|
|
1927
|
+
results: z.array(webSearchResultItemSchema)
|
|
1928
|
+
});
|
|
1929
|
+
export const attioListObjectsTool = defineTool({
|
|
1930
|
+
name: "attio_list_objects",
|
|
1931
|
+
inputSchema: attioListObjectsInputSchema,
|
|
1932
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1933
|
+
objects: z.array(attioObjectWithAttributesSchema),
|
|
1934
|
+
count: z.number()
|
|
1935
|
+
})
|
|
1936
|
+
});
|
|
1937
|
+
export const attioQueryRecordsTool = defineTool({
|
|
1938
|
+
name: "attio_query_records",
|
|
1939
|
+
inputSchema: attioQueryRecordsInputSchema,
|
|
1940
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1941
|
+
records: z.array(attioRecordSchema),
|
|
1942
|
+
count: z.number()
|
|
1943
|
+
})
|
|
1944
|
+
});
|
|
1945
|
+
export const attioUpsertRecordTool = defineTool({
|
|
1946
|
+
name: "attio_upsert_record",
|
|
1947
|
+
inputSchema: attioUpsertRecordInputSchema,
|
|
1948
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1949
|
+
records: z.array(attioRecordSchema).optional(),
|
|
1950
|
+
count: z.number().optional(),
|
|
1951
|
+
requestedCount: z.number().optional(),
|
|
1952
|
+
successCount: z.number().optional(),
|
|
1953
|
+
failureCount: z.number().optional(),
|
|
1954
|
+
partial: z.boolean().optional(),
|
|
1955
|
+
errors: z.array(attioUpsertErrorSchema).optional()
|
|
1956
|
+
})
|
|
1957
|
+
});
|
|
1958
|
+
export const listWorkOSUsersTool = defineTool({
|
|
1959
|
+
name: "listWorkOSUsers",
|
|
1960
|
+
inputSchema: listWorkOSUsersInputSchema,
|
|
1961
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1962
|
+
users: z.array(workOSUserSummarySchema),
|
|
1963
|
+
pagination: workOSPaginationSchema,
|
|
1964
|
+
message: z.string()
|
|
1965
|
+
})
|
|
1966
|
+
});
|
|
1967
|
+
export const listWorkOSOrganizationsTool = defineTool({
|
|
1968
|
+
name: "listWorkOSOrganizations",
|
|
1969
|
+
inputSchema: listWorkOSOrganizationsInputSchema,
|
|
1970
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1971
|
+
organizations: z.array(workOSOrganizationSummarySchema),
|
|
1972
|
+
pagination: workOSPaginationSchema,
|
|
1973
|
+
message: z.string()
|
|
1974
|
+
})
|
|
1975
|
+
});
|
|
1976
|
+
export const getWorkOSUserTool = defineTool({
|
|
1977
|
+
name: "getWorkOSUser",
|
|
1978
|
+
inputSchema: getWorkOSUserInputSchema,
|
|
1979
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1980
|
+
user: workOSUserSummarySchema,
|
|
1981
|
+
message: z.string()
|
|
1982
|
+
})
|
|
1983
|
+
});
|
|
1984
|
+
export const listLaunchDarklyFlagsTool = defineTool({
|
|
1985
|
+
name: "listLaunchDarklyFlags",
|
|
1986
|
+
inputSchema: listLaunchDarklyFlagsInputSchema,
|
|
1987
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1988
|
+
projectKey: z.string(),
|
|
1989
|
+
totalFlags: z.number(),
|
|
1990
|
+
flags: z.array(launchDarklyFlagSummarySchema),
|
|
1991
|
+
flagsLink: z.string(),
|
|
1992
|
+
message: z.string()
|
|
1993
|
+
})
|
|
1994
|
+
});
|
|
1995
|
+
export const getLaunchDarklyFlagDetailsTool = defineTool({
|
|
1996
|
+
name: "getLaunchDarklyFlagDetails",
|
|
1997
|
+
inputSchema: getLaunchDarklyFlagDetailsInputSchema,
|
|
1998
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
1999
|
+
projectKey: z.string(),
|
|
2000
|
+
flag: launchDarklyFlagMetadataSchema,
|
|
2001
|
+
environments: z.record(z.string(), launchDarklyEnvironmentConfigSchema),
|
|
2002
|
+
url: z.string(),
|
|
2003
|
+
history: launchDarklyHistoryResultSchema.optional(),
|
|
2004
|
+
message: z.string()
|
|
2005
|
+
})
|
|
2006
|
+
});
|
|
2007
|
+
export const snowflakeExecuteQueryTool = defineTool({
|
|
2008
|
+
name: "snowflakeExecuteQuery",
|
|
2009
|
+
inputSchema: snowflakeExecuteQueryInputSchema,
|
|
2010
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
2011
|
+
rows: z.array(snowflakeQueryRowSchema),
|
|
2012
|
+
columns: z.array(z.string()),
|
|
2013
|
+
rowCount: z.number()
|
|
2014
|
+
})
|
|
2015
|
+
});
|
|
2016
|
+
export const snowflakeExplainQueryTool = defineTool({
|
|
2017
|
+
name: "snowflakeExplainQuery",
|
|
2018
|
+
inputSchema: snowflakeExplainQueryInputSchema,
|
|
2019
|
+
outputSchema: toolOutputBaseSchema.extend({
|
|
2020
|
+
explainPlan: z.array(snowflakeQueryRowSchema),
|
|
2021
|
+
columns: z.array(z.string()),
|
|
2022
|
+
rowCount: z.number()
|
|
2023
|
+
})
|
|
2024
|
+
});
|
|
2025
|
+
export const webSearchTool = defineTool({
|
|
2026
|
+
name: "web_search",
|
|
2027
|
+
inputSchema: z.object({
|
|
2028
|
+
query: z.string().describe("The search query"),
|
|
2029
|
+
max_results: z.number().int().min(1).max(10).nullable().describe("Number of results to return (default 5)"),
|
|
2030
|
+
search_depth: z.enum(["basic", "advanced"]).nullable().describe("'basic' is faster, 'advanced' is more thorough (default 'basic')"),
|
|
2031
|
+
include_answer: z.boolean().nullable().describe("Include an LLM-generated answer summarizing the results (default false)"),
|
|
2032
|
+
topic: z.enum(["general", "news"]).nullable().describe("'news' for recent news articles, 'general' for all web content (default 'general')"),
|
|
2033
|
+
time_range: z.enum(["day", "week", "month", "year"]).nullable().describe("Filter results by recency")
|
|
2034
|
+
}),
|
|
2035
|
+
outputSchema: webSearchOutputSchema
|
|
2036
|
+
});
|
|
2037
|
+
export const ToolDefinitions = {
|
|
2038
|
+
[linearCreateTicketTool.name]: linearCreateTicketTool,
|
|
2039
|
+
[linearUpdateTicketTool.name]: linearUpdateTicketTool,
|
|
2040
|
+
[linearAddCommentTool.name]: linearAddCommentTool,
|
|
2041
|
+
[linearSearchTicketTool.name]: linearSearchTicketTool,
|
|
2042
|
+
[linearReadTicketTool.name]: linearReadTicketTool,
|
|
2043
|
+
[linearGetStatesTool.name]: linearGetStatesTool,
|
|
2044
|
+
[linearGetLabelsTool.name]: linearGetLabelsTool,
|
|
2045
|
+
[linearGetProjectsTool.name]: linearGetProjectsTool,
|
|
2046
|
+
[linearGetTeamsTool.name]: linearGetTeamsTool,
|
|
2047
|
+
[linearGetUsersTool.name]: linearGetUsersTool,
|
|
2048
|
+
[slackSendMessageTool.name]: slackSendMessageTool,
|
|
2049
|
+
[slackListChannelsTool.name]: slackListChannelsTool,
|
|
2050
|
+
[slackListUsersTool.name]: slackListUsersTool,
|
|
2051
|
+
[slackReadConversationTool.name]: slackReadConversationTool,
|
|
2052
|
+
[jiraCreateTicketTool.name]: jiraCreateTicketTool,
|
|
2053
|
+
[jiraUpdateTicketTool.name]: jiraUpdateTicketTool,
|
|
2054
|
+
[jiraSearchTicketTool.name]: jiraSearchTicketTool,
|
|
2055
|
+
[searchGitHubCodeTool.name]: searchGitHubCodeTool,
|
|
2056
|
+
[grepGitHubCodeTool.name]: grepGitHubCodeTool,
|
|
2057
|
+
[readGitHubFileTool.name]: readGitHubFileTool,
|
|
2058
|
+
[listGitHubDirectoryTool.name]: listGitHubDirectoryTool,
|
|
2059
|
+
[listGitHubPullRequestsTool.name]: listGitHubPullRequestsTool,
|
|
2060
|
+
[listGitHubCommitsTool.name]: listGitHubCommitsTool,
|
|
2061
|
+
[summarizeGitHubPullRequestDiffTool.name]: summarizeGitHubPullRequestDiffTool,
|
|
2062
|
+
[notionCreateOrUpdatePageTool.name]: notionCreateOrUpdatePageTool,
|
|
2063
|
+
[notionCreateOrUpdateDatabaseRowTool.name]: notionCreateOrUpdateDatabaseRowTool,
|
|
2064
|
+
[notionModifyBlocksTool.name]: notionModifyBlocksTool,
|
|
2065
|
+
[notionQueryPageTool.name]: notionQueryPageTool,
|
|
2066
|
+
[notionQueryDatabaseTool.name]: notionQueryDatabaseTool,
|
|
2067
|
+
[notionGetSchemaTool.name]: notionGetSchemaTool,
|
|
2068
|
+
[notionFetchRelatedEventsTool.name]: notionFetchRelatedEventsTool,
|
|
2069
|
+
[notionListUsersTool.name]: notionListUsersTool,
|
|
2070
|
+
[gmailSendEmailTool.name]: gmailSendEmailTool,
|
|
2071
|
+
[gmailCreateDraftTool.name]: gmailCreateDraftTool,
|
|
2072
|
+
[confluenceQueryPageTool.name]: confluenceQueryPageTool,
|
|
2073
|
+
[confluenceAddCommentTool.name]: confluenceAddCommentTool,
|
|
2074
|
+
[searchPosthogSessionsTool.name]: searchPosthogSessionsTool,
|
|
2075
|
+
[searchPosthogLogsTool.name]: searchPosthogLogsTool,
|
|
2076
|
+
[getPosthogSessionEventsTool.name]: getPosthogSessionEventsTool,
|
|
2077
|
+
[searchPosthogEventsTool.name]: searchPosthogEventsTool,
|
|
2078
|
+
[attioListObjectsTool.name]: attioListObjectsTool,
|
|
2079
|
+
[attioQueryRecordsTool.name]: attioQueryRecordsTool,
|
|
2080
|
+
[attioUpsertRecordTool.name]: attioUpsertRecordTool,
|
|
2081
|
+
[listWorkOSUsersTool.name]: listWorkOSUsersTool,
|
|
2082
|
+
[listWorkOSOrganizationsTool.name]: listWorkOSOrganizationsTool,
|
|
2083
|
+
[getWorkOSUserTool.name]: getWorkOSUserTool,
|
|
2084
|
+
[listLaunchDarklyFlagsTool.name]: listLaunchDarklyFlagsTool,
|
|
2085
|
+
[getLaunchDarklyFlagDetailsTool.name]: getLaunchDarklyFlagDetailsTool,
|
|
2086
|
+
[snowflakeExecuteQueryTool.name]: snowflakeExecuteQueryTool,
|
|
2087
|
+
[snowflakeExplainQueryTool.name]: snowflakeExplainQueryTool,
|
|
2088
|
+
[searchDatadogLogsTool.name]: searchDatadogLogsTool,
|
|
2089
|
+
[searchRumEventsTool.name]: searchRumEventsTool,
|
|
2090
|
+
[listRumEventsTool.name]: listRumEventsTool,
|
|
2091
|
+
[aggregateRumEventsTool.name]: aggregateRumEventsTool,
|
|
2092
|
+
[webSearchTool.name]: webSearchTool,
|
|
2093
|
+
[webExtractTool.name]: webExtractTool,
|
|
2094
|
+
[webResearchTool.name]: webResearchTool,
|
|
2095
|
+
[imageEditTool.name]: imageEditTool
|
|
2096
|
+
};
|
|
2097
|
+
export function isValidToolName(name) {
|
|
2098
|
+
return name in ToolDefinitions;
|
|
2099
|
+
}
|