@notionhq/apps 0.0.27 → 0.0.29

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.
@@ -0,0 +1,5095 @@
1
+ // Generated by notion tool-core codegen-script-types --connections. Do not edit.
2
+ import type { ConnectionActionInvoker } from "./connection-actions.js"
3
+ /**
4
+ * Script input for the "Add Sender to Notion Mail Notification Allowlist" effect (`mail.addSenderNotificationPreferences`),
5
+ * derived from its Tool Core definition's call_function input projection.
6
+ *
7
+ * Add sender email addresses to the Notion Mail notification allowlist. When a sender is on the allowlist, their emails will always trigger push notifications regardless of view-level settings. This tool is specific to Notion Mail notification settings only. Takes effect immediately.
8
+ */
9
+ export type AddSenderNotificationPreferencesScriptInput = {
10
+ /**
11
+ * The Notion Mail email address of the account. Must be an account connected to Notion Mail.
12
+ */
13
+ userEmailAddress: string
14
+ /**
15
+ * Sender email addresses to add to the notification allowlist
16
+ */
17
+ senderAddresses: Array<string>
18
+ }
19
+
20
+ /**
21
+ * Canonical Tool Core output for the "Add Sender to Notion Mail Notification Allowlist" effect (`mail.addSenderNotificationPreferences`).
22
+ * This is the definition's output schema; the effect's script surface may
23
+ * re-encode it before returning.
24
+ */
25
+ export type AddSenderNotificationPreferencesScriptOutput = {
26
+ /**
27
+ * Tool output content.
28
+ */
29
+ content: unknown
30
+ /**
31
+ * Name of the Mail tool that ran.
32
+ */
33
+ name: string
34
+ /**
35
+ * Whether the Mail service reported a tool error.
36
+ */
37
+ isError?: boolean
38
+ /**
39
+ * Execution metadata reported by the MCP server.
40
+ */
41
+ metadata?: {
42
+ /**
43
+ * Tool execution time in milliseconds.
44
+ */
45
+ executionTimeMs?: number
46
+ /**
47
+ * Number of bytes processed by the tool.
48
+ */
49
+ bytesProcessed?: number
50
+ /**
51
+ * Tool execution cost reported by the MCP server.
52
+ */
53
+ cost?: number
54
+ }
55
+ /**
56
+ * Mail module name used for display.
57
+ */
58
+ moduleName?: string
59
+ /**
60
+ * Structured tool output when provided by the Mail service.
61
+ */
62
+ structuredContent?: unknown
63
+ /**
64
+ * Bounded HTTP-like Mail service error code.
65
+ */
66
+ toolErrorCode?: number
67
+ }
68
+
69
+ /**
70
+ * Script input for the "Analyze Recent Email Activities" effect (`mail.analyzeRecentEmailActivities`),
71
+ * derived from its Tool Core definition's call_function input projection.
72
+ *
73
+ * Returns a structured snapshot of the user's mailbox for the last 7 days including labels with message counts, contacts registry, threads registry, drafts, sent messages grouped by recipient, and Gmail filter rules. Use this as a first step to understand a user's mailbox before taking actions.
74
+ */
75
+ export type AnalyzeRecentEmailActivitiesScriptInput = {
76
+ /**
77
+ * The email address of the account to get context for
78
+ */
79
+ userEmailAddress: string
80
+ }
81
+
82
+ /**
83
+ * Canonical Tool Core output for the "Analyze Recent Email Activities" effect (`mail.analyzeRecentEmailActivities`).
84
+ * This is the definition's output schema; the effect's script surface may
85
+ * re-encode it before returning.
86
+ */
87
+ export type AnalyzeRecentEmailActivitiesScriptOutput = {
88
+ /**
89
+ * Tool output content.
90
+ */
91
+ content: unknown
92
+ /**
93
+ * Name of the Mail tool that ran.
94
+ */
95
+ name: string
96
+ /**
97
+ * Whether the Mail service reported a tool error.
98
+ */
99
+ isError?: boolean
100
+ /**
101
+ * Execution metadata reported by the MCP server.
102
+ */
103
+ metadata?: {
104
+ /**
105
+ * Tool execution time in milliseconds.
106
+ */
107
+ executionTimeMs?: number
108
+ /**
109
+ * Number of bytes processed by the tool.
110
+ */
111
+ bytesProcessed?: number
112
+ /**
113
+ * Tool execution cost reported by the MCP server.
114
+ */
115
+ cost?: number
116
+ }
117
+ /**
118
+ * Mail module name used for display.
119
+ */
120
+ moduleName?: string
121
+ /**
122
+ * Structured tool output when provided by the Mail service.
123
+ */
124
+ structuredContent?: unknown
125
+ /**
126
+ * Bounded HTTP-like Mail service error code.
127
+ */
128
+ toolErrorCode?: number
129
+ }
130
+
131
+ /**
132
+ * Script input for the "Apply Outlook Categories" effect (`mail.applyOutlookCategories`),
133
+ * derived from its Tool Core definition's call_function input projection.
134
+ *
135
+ * Apply categories to all messages in the specified Outlook conversations. Merges with existing categories.
136
+ */
137
+ export type ApplyOutlookCategoriesScriptInput = {
138
+ /**
139
+ * The Outlook email address
140
+ */
141
+ userEmailAddress: string
142
+ /**
143
+ * Outlook conversation IDs (from search_emails threadId)
144
+ */
145
+ conversationIDs: Array<string>
146
+ /**
147
+ * Category display names to apply (case-sensitive)
148
+ */
149
+ categoryNames: Array<string>
150
+ }
151
+
152
+ /**
153
+ * Canonical Tool Core output for the "Apply Outlook Categories" effect (`mail.applyOutlookCategories`).
154
+ * This is the definition's output schema; the effect's script surface may
155
+ * re-encode it before returning.
156
+ */
157
+ export type ApplyOutlookCategoriesScriptOutput = {
158
+ /**
159
+ * Tool output content.
160
+ */
161
+ content: unknown
162
+ /**
163
+ * Name of the Mail tool that ran.
164
+ */
165
+ name: string
166
+ /**
167
+ * Whether the Mail service reported a tool error.
168
+ */
169
+ isError?: boolean
170
+ /**
171
+ * Execution metadata reported by the MCP server.
172
+ */
173
+ metadata?: {
174
+ /**
175
+ * Tool execution time in milliseconds.
176
+ */
177
+ executionTimeMs?: number
178
+ /**
179
+ * Number of bytes processed by the tool.
180
+ */
181
+ bytesProcessed?: number
182
+ /**
183
+ * Tool execution cost reported by the MCP server.
184
+ */
185
+ cost?: number
186
+ }
187
+ /**
188
+ * Mail module name used for display.
189
+ */
190
+ moduleName?: string
191
+ /**
192
+ * Structured tool output when provided by the Mail service.
193
+ */
194
+ structuredContent?: unknown
195
+ /**
196
+ * Bounded HTTP-like Mail service error code.
197
+ */
198
+ toolErrorCode?: number
199
+ }
200
+
201
+ /**
202
+ * Script input for the "Apply Labels" effect (`mail.applyUserLabelsWithLazyCreate`),
203
+ * derived from its Tool Core definition's call_function input projection.
204
+ *
205
+ * Apply labels to email threads, creating them if they don't exist
206
+ */
207
+ export type ApplyUserLabelsWithLazyCreateScriptInput = {
208
+ /**
209
+ * The email address of the mailbox
210
+ */
211
+ userEmailAddress: string
212
+ /**
213
+ * Array of thread IDs to label
214
+ */
215
+ threadIds: Array<string>
216
+ /**
217
+ * Names of labels to apply
218
+ */
219
+ labelNames: Array<string>
220
+ }
221
+
222
+ /**
223
+ * Canonical Tool Core output for the "Apply Labels" effect (`mail.applyUserLabelsWithLazyCreate`).
224
+ * This is the definition's output schema; the effect's script surface may
225
+ * re-encode it before returning.
226
+ */
227
+ export type ApplyUserLabelsWithLazyCreateScriptOutput = {
228
+ /**
229
+ * Tool output content.
230
+ */
231
+ content: unknown
232
+ /**
233
+ * Name of the Mail tool that ran.
234
+ */
235
+ name: string
236
+ /**
237
+ * Whether the Mail service reported a tool error.
238
+ */
239
+ isError?: boolean
240
+ /**
241
+ * Execution metadata reported by the MCP server.
242
+ */
243
+ metadata?: {
244
+ /**
245
+ * Tool execution time in milliseconds.
246
+ */
247
+ executionTimeMs?: number
248
+ /**
249
+ * Number of bytes processed by the tool.
250
+ */
251
+ bytesProcessed?: number
252
+ /**
253
+ * Tool execution cost reported by the MCP server.
254
+ */
255
+ cost?: number
256
+ }
257
+ /**
258
+ * Mail module name used for display.
259
+ */
260
+ moduleName?: string
261
+ /**
262
+ * Structured tool output when provided by the Mail service.
263
+ */
264
+ structuredContent?: unknown
265
+ /**
266
+ * Bounded HTTP-like Mail service error code.
267
+ */
268
+ toolErrorCode?: number
269
+ }
270
+
271
+ /**
272
+ * Script input for the "Archive Threads by ID" effect (`mail.archiveThreadsById`),
273
+ * derived from its Tool Core definition's call_function input projection.
274
+ *
275
+ * Archive one or more email threads (remove from inbox)
276
+ */
277
+ export type ArchiveThreadsByIdScriptInput = {
278
+ /**
279
+ * The email address of the mailbox
280
+ */
281
+ userEmailAddress: string
282
+ /**
283
+ * Array of thread IDs to archive
284
+ */
285
+ threadIds: Array<string>
286
+ }
287
+
288
+ /**
289
+ * Canonical Tool Core output for the "Archive Threads by ID" effect (`mail.archiveThreadsById`).
290
+ * This is the definition's output schema; the effect's script surface may
291
+ * re-encode it before returning.
292
+ */
293
+ export type ArchiveThreadsByIdScriptOutput = {
294
+ /**
295
+ * Tool output content.
296
+ */
297
+ content: unknown
298
+ /**
299
+ * Name of the Mail tool that ran.
300
+ */
301
+ name: string
302
+ /**
303
+ * Whether the Mail service reported a tool error.
304
+ */
305
+ isError?: boolean
306
+ /**
307
+ * Execution metadata reported by the MCP server.
308
+ */
309
+ metadata?: {
310
+ /**
311
+ * Tool execution time in milliseconds.
312
+ */
313
+ executionTimeMs?: number
314
+ /**
315
+ * Number of bytes processed by the tool.
316
+ */
317
+ bytesProcessed?: number
318
+ /**
319
+ * Tool execution cost reported by the MCP server.
320
+ */
321
+ cost?: number
322
+ }
323
+ /**
324
+ * Mail module name used for display.
325
+ */
326
+ moduleName?: string
327
+ /**
328
+ * Structured tool output when provided by the Mail service.
329
+ */
330
+ structuredContent?: unknown
331
+ /**
332
+ * Bounded HTTP-like Mail service error code.
333
+ */
334
+ toolErrorCode?: number
335
+ }
336
+
337
+ /**
338
+ * Script input for the "Archive Threads by Search Query" effect (`mail.archiveThreadsByQuery`),
339
+ * derived from its Tool Core definition's call_function input projection.
340
+ *
341
+ * Archives threads matching a Gmail-style search query
342
+ */
343
+ export type ArchiveThreadsByQueryScriptInput = {
344
+ /**
345
+ * The email address of the mailbox
346
+ */
347
+ userEmailAddress: string
348
+ /**
349
+ * Gmail search query to match threads to archive
350
+ */
351
+ query: string
352
+ /**
353
+ * Pagination token from previous archive results
354
+ */
355
+ pageToken?: string
356
+ }
357
+
358
+ /**
359
+ * Canonical Tool Core output for the "Archive Threads by Search Query" effect (`mail.archiveThreadsByQuery`).
360
+ * This is the definition's output schema; the effect's script surface may
361
+ * re-encode it before returning.
362
+ */
363
+ export type ArchiveThreadsByQueryScriptOutput = {
364
+ /**
365
+ * Tool output content.
366
+ */
367
+ content: unknown
368
+ /**
369
+ * Name of the Mail tool that ran.
370
+ */
371
+ name: string
372
+ /**
373
+ * Whether the Mail service reported a tool error.
374
+ */
375
+ isError?: boolean
376
+ /**
377
+ * Execution metadata reported by the MCP server.
378
+ */
379
+ metadata?: {
380
+ /**
381
+ * Tool execution time in milliseconds.
382
+ */
383
+ executionTimeMs?: number
384
+ /**
385
+ * Number of bytes processed by the tool.
386
+ */
387
+ bytesProcessed?: number
388
+ /**
389
+ * Tool execution cost reported by the MCP server.
390
+ */
391
+ cost?: number
392
+ }
393
+ /**
394
+ * Mail module name used for display.
395
+ */
396
+ moduleName?: string
397
+ /**
398
+ * Structured tool output when provided by the Mail service.
399
+ */
400
+ structuredContent?: unknown
401
+ /**
402
+ * Bounded HTTP-like Mail service error code.
403
+ */
404
+ toolErrorCode?: number
405
+ }
406
+
407
+ /**
408
+ * Script input for the "Block Sender" effect (`mail.blockSender`),
409
+ * derived from its Tool Core definition's call_function input projection.
410
+ *
411
+ * Block a sender from sending emails to this mailbox by adding them to the mailbox's blocked-senders list. Works for any mail provider.
412
+ */
413
+ export type BlockSenderScriptInput = {
414
+ /**
415
+ * The email address of the mailbox
416
+ */
417
+ userEmailAddress: string
418
+ /**
419
+ * Email address of the sender to block
420
+ */
421
+ senderEmail: string
422
+ /**
423
+ * Optional array of thread IDs to immediately trash (from this sender)
424
+ */
425
+ threadIds?: Array<string>
426
+ }
427
+
428
+ /**
429
+ * Canonical Tool Core output for the "Block Sender" effect (`mail.blockSender`).
430
+ * This is the definition's output schema; the effect's script surface may
431
+ * re-encode it before returning.
432
+ */
433
+ export type BlockSenderScriptOutput = {
434
+ /**
435
+ * Tool output content.
436
+ */
437
+ content: unknown
438
+ /**
439
+ * Name of the Mail tool that ran.
440
+ */
441
+ name: string
442
+ /**
443
+ * Whether the Mail service reported a tool error.
444
+ */
445
+ isError?: boolean
446
+ /**
447
+ * Execution metadata reported by the MCP server.
448
+ */
449
+ metadata?: {
450
+ /**
451
+ * Tool execution time in milliseconds.
452
+ */
453
+ executionTimeMs?: number
454
+ /**
455
+ * Number of bytes processed by the tool.
456
+ */
457
+ bytesProcessed?: number
458
+ /**
459
+ * Tool execution cost reported by the MCP server.
460
+ */
461
+ cost?: number
462
+ }
463
+ /**
464
+ * Mail module name used for display.
465
+ */
466
+ moduleName?: string
467
+ /**
468
+ * Structured tool output when provided by the Mail service.
469
+ */
470
+ structuredContent?: unknown
471
+ /**
472
+ * Bounded HTTP-like Mail service error code.
473
+ */
474
+ toolErrorCode?: number
475
+ }
476
+
477
+ /**
478
+ * Script input for the "Create Gmail Filter" effect (`mail.createGmailFilter`),
479
+ * derived from its Tool Core definition's call_function input projection.
480
+ *
481
+ * Create a new Gmail filter rule
482
+ */
483
+ export type CreateGmailFilterScriptInput = {
484
+ /**
485
+ * The email address of the Gmail account
486
+ */
487
+ userEmailAddress: string
488
+ /**
489
+ * Filter criteria (at least one field required)
490
+ */
491
+ criteria: {
492
+ /**
493
+ * Match emails from this sender
494
+ */
495
+ from?: string
496
+ /**
497
+ * Match emails sent to this address
498
+ */
499
+ to?: string
500
+ /**
501
+ * Match emails with this in subject
502
+ */
503
+ subject?: string
504
+ /**
505
+ * Full Gmail search query
506
+ */
507
+ query?: string
508
+ /**
509
+ * Exclude emails matching this query
510
+ */
511
+ negatedQuery?: string
512
+ /**
513
+ * Match only emails with attachments
514
+ */
515
+ hasAttachment?: boolean
516
+ /**
517
+ * Exclude chat messages
518
+ */
519
+ excludeChats?: boolean
520
+ /**
521
+ * Size threshold in bytes
522
+ */
523
+ size?: number
524
+ /**
525
+ * Compare against size threshold
526
+ */
527
+ sizeComparison?: "SMALLER" | "LARGER"
528
+ }
529
+ /**
530
+ * Actions to perform (at least one required)
531
+ */
532
+ action: {
533
+ /**
534
+ * Gmail system label IDs or IDs returned by list_labels. Never use Notion record, survey option, or category IDs.
535
+ */
536
+ addLabelIds?: Array<string>
537
+ /**
538
+ * Gmail system label IDs or IDs returned by list_labels. Use INBOX to auto-archive matching future mail.
539
+ */
540
+ removeLabelIds?: Array<string>
541
+ /**
542
+ * Email address to forward to (must be pre-verified)
543
+ */
544
+ forward?: string
545
+ }
546
+ }
547
+
548
+ /**
549
+ * Canonical Tool Core output for the "Create Gmail Filter" effect (`mail.createGmailFilter`).
550
+ * This is the definition's output schema; the effect's script surface may
551
+ * re-encode it before returning.
552
+ */
553
+ export type CreateGmailFilterScriptOutput = {
554
+ /**
555
+ * Tool output content.
556
+ */
557
+ content: unknown
558
+ /**
559
+ * Name of the Mail tool that ran.
560
+ */
561
+ name: string
562
+ /**
563
+ * Whether the Mail service reported a tool error.
564
+ */
565
+ isError?: boolean
566
+ /**
567
+ * Execution metadata reported by the MCP server.
568
+ */
569
+ metadata?: {
570
+ /**
571
+ * Tool execution time in milliseconds.
572
+ */
573
+ executionTimeMs?: number
574
+ /**
575
+ * Number of bytes processed by the tool.
576
+ */
577
+ bytesProcessed?: number
578
+ /**
579
+ * Tool execution cost reported by the MCP server.
580
+ */
581
+ cost?: number
582
+ }
583
+ /**
584
+ * Mail module name used for display.
585
+ */
586
+ moduleName?: string
587
+ /**
588
+ * Structured tool output when provided by the Mail service.
589
+ */
590
+ structuredContent?: unknown
591
+ /**
592
+ * Bounded HTTP-like Mail service error code.
593
+ */
594
+ toolErrorCode?: number
595
+ }
596
+
597
+ /**
598
+ * Script input for the "Create Label" effect (`mail.createLabel`),
599
+ * derived from its Tool Core definition's call_function input projection.
600
+ *
601
+ * Create a new label in the mailbox
602
+ */
603
+ export type CreateLabelScriptInput = {
604
+ /**
605
+ * The email address of the mailbox
606
+ */
607
+ userEmailAddress: string
608
+ /**
609
+ * Name of the label to create
610
+ */
611
+ labelName: string
612
+ /**
613
+ * Optional color for the label
614
+ */
615
+ color?:
616
+ | "light-gray"
617
+ | "gray"
618
+ | "brown"
619
+ | "orange"
620
+ | "yellow"
621
+ | "green"
622
+ | "blue"
623
+ | "purple"
624
+ | "pink"
625
+ | "red"
626
+ }
627
+
628
+ /**
629
+ * Canonical Tool Core output for the "Create Label" effect (`mail.createLabel`).
630
+ * This is the definition's output schema; the effect's script surface may
631
+ * re-encode it before returning.
632
+ */
633
+ export type CreateLabelScriptOutput = {
634
+ /**
635
+ * Tool output content.
636
+ */
637
+ content: unknown
638
+ /**
639
+ * Name of the Mail tool that ran.
640
+ */
641
+ name: string
642
+ /**
643
+ * Whether the Mail service reported a tool error.
644
+ */
645
+ isError?: boolean
646
+ /**
647
+ * Execution metadata reported by the MCP server.
648
+ */
649
+ metadata?: {
650
+ /**
651
+ * Tool execution time in milliseconds.
652
+ */
653
+ executionTimeMs?: number
654
+ /**
655
+ * Number of bytes processed by the tool.
656
+ */
657
+ bytesProcessed?: number
658
+ /**
659
+ * Tool execution cost reported by the MCP server.
660
+ */
661
+ cost?: number
662
+ }
663
+ /**
664
+ * Mail module name used for display.
665
+ */
666
+ moduleName?: string
667
+ /**
668
+ * Structured tool output when provided by the Mail service.
669
+ */
670
+ structuredContent?: unknown
671
+ /**
672
+ * Bounded HTTP-like Mail service error code.
673
+ */
674
+ toolErrorCode?: number
675
+ }
676
+
677
+ /**
678
+ * Script input for the "Create Mail Block" effect (`mail.createMailBlock`),
679
+ * derived from its Tool Core definition's call_function input projection.
680
+ *
681
+ * Create a Notion Mail block for a Gmail thread in a specified location.
682
+ */
683
+ export type CreateMailBlockScriptInput = {
684
+ /**
685
+ * The email address of the mailbox
686
+ */
687
+ userEmailAddress: string
688
+ /**
689
+ * The Gmail thread ID to create a mail block for
690
+ */
691
+ threadId: string
692
+ /**
693
+ * Where to create the mail block (private, page, or database)
694
+ */
695
+ locationType: "private" | "page" | "database"
696
+ /**
697
+ * Required when locationType is page or database. Not used for private.
698
+ */
699
+ locationUrl?: string
700
+ }
701
+
702
+ /**
703
+ * Canonical Tool Core output for the "Create Mail Block" effect (`mail.createMailBlock`).
704
+ * This is the definition's output schema; the effect's script surface may
705
+ * re-encode it before returning.
706
+ */
707
+ export type CreateMailBlockScriptOutput = {
708
+ /**
709
+ * Tool output content.
710
+ */
711
+ content: unknown
712
+ /**
713
+ * Name of the Mail tool that ran.
714
+ */
715
+ name: string
716
+ /**
717
+ * Whether the Mail service reported a tool error.
718
+ */
719
+ isError?: boolean
720
+ /**
721
+ * Execution metadata reported by the MCP server.
722
+ */
723
+ metadata?: {
724
+ /**
725
+ * Tool execution time in milliseconds.
726
+ */
727
+ executionTimeMs?: number
728
+ /**
729
+ * Number of bytes processed by the tool.
730
+ */
731
+ bytesProcessed?: number
732
+ /**
733
+ * Tool execution cost reported by the MCP server.
734
+ */
735
+ cost?: number
736
+ }
737
+ /**
738
+ * Mail module name used for display.
739
+ */
740
+ moduleName?: string
741
+ /**
742
+ * Structured tool output when provided by the Mail service.
743
+ */
744
+ structuredContent?: unknown
745
+ /**
746
+ * Bounded HTTP-like Mail service error code.
747
+ */
748
+ toolErrorCode?: number
749
+ }
750
+
751
+ /**
752
+ * Script input for the "Create Draft (Notion Mail)" effect (`mail.createOrUpdateDraft`),
753
+ * derived from its Tool Core definition's call_function input projection.
754
+ *
755
+ * Create or update a draft email in Notion Mail. For replies, automatically finds and updates existing agent drafts on the same thread.
756
+ */
757
+ export type CreateOrUpdateDraftScriptInput = {
758
+ /**
759
+ * The user's email address (for mailbox identification)
760
+ */
761
+ userEmailAddress: string
762
+ /**
763
+ * Draft intent: "reply" for responding to existing thread, "standalone_draft" for new email, "forward" to forward an existing message
764
+ */
765
+ draftType: "reply" | "standalone_draft" | "forward"
766
+ /**
767
+ * Sender address owned by the user
768
+ */
769
+ from: {
770
+ address: string
771
+ name?: string
772
+ }
773
+ /**
774
+ * Primary recipients. Required for standalone drafts and forwards, optional for replies.
775
+ */
776
+ to?: Array<{
777
+ address: string
778
+ name?: string
779
+ }>
780
+ /**
781
+ * CC recipients
782
+ */
783
+ cc?: Array<{
784
+ address: string
785
+ name?: string
786
+ }>
787
+ /**
788
+ * BCC recipients
789
+ */
790
+ bcc?: Array<{
791
+ address: string
792
+ name?: string
793
+ }>
794
+ /**
795
+ * Subject line. Required for standalone drafts. Auto-generated for replies and forwards (Re:/FWD: prefix).
796
+ */
797
+ subject?: string
798
+ /**
799
+ * Plain text email body
800
+ */
801
+ text?: string
802
+ /**
803
+ * HTML email body
804
+ */
805
+ html?: string
806
+ /**
807
+ * Gmail thread ID for replies or forwards. Required when draftType is reply or forward.
808
+ */
809
+ parentThreadId?: string
810
+ /**
811
+ * Specific message ID to reply to. Defaults to latest message when omitted.
812
+ */
813
+ parentMessageId?: string
814
+ /**
815
+ * ID of an existing Notion Mail draft to update (the messageID field from a prior create_or_update_draft response). Applicable to standalone_draft type only. Omit to create a new draft.
816
+ */
817
+ draftId?: string
818
+ }
819
+
820
+ /**
821
+ * Canonical Tool Core output for the "Create Draft (Notion Mail)" effect (`mail.createOrUpdateDraft`).
822
+ * This is the definition's output schema; the effect's script surface may
823
+ * re-encode it before returning.
824
+ */
825
+ export type CreateOrUpdateDraftScriptOutput = {
826
+ /**
827
+ * Tool output content.
828
+ */
829
+ content: unknown
830
+ /**
831
+ * Name of the Mail tool that ran.
832
+ */
833
+ name: string
834
+ /**
835
+ * Whether the Mail service reported a tool error.
836
+ */
837
+ isError?: boolean
838
+ /**
839
+ * Execution metadata reported by the MCP server.
840
+ */
841
+ metadata?: {
842
+ /**
843
+ * Tool execution time in milliseconds.
844
+ */
845
+ executionTimeMs?: number
846
+ /**
847
+ * Number of bytes processed by the tool.
848
+ */
849
+ bytesProcessed?: number
850
+ /**
851
+ * Tool execution cost reported by the MCP server.
852
+ */
853
+ cost?: number
854
+ }
855
+ /**
856
+ * Mail module name used for display.
857
+ */
858
+ moduleName?: string
859
+ /**
860
+ * Structured tool output when provided by the Mail service.
861
+ */
862
+ structuredContent?: unknown
863
+ /**
864
+ * Bounded HTTP-like Mail service error code.
865
+ */
866
+ toolErrorCode?: number
867
+ }
868
+
869
+ /**
870
+ * Script input for the "Create Draft (Gmail + Notion Mail)" effect (`mail.createOrUpdateDraftAllClients`),
871
+ * derived from its Tool Core definition's call_function input projection.
872
+ *
873
+ * Create or update a draft email in both Gmail and Notion Mail in a single step, keeping the draft in sync across both mail clients. Creates the Gmail draft first, then the Notion Mail draft linked to it (serial, not parallel).
874
+ */
875
+ export type CreateOrUpdateDraftAllClientsScriptInput = {
876
+ /**
877
+ * The user's email address (for mailbox identification)
878
+ */
879
+ userEmailAddress: string
880
+ /**
881
+ * Draft intent: "reply" for responding to existing thread, "standalone_draft" for new email, "forward" to forward an existing message
882
+ */
883
+ draftType: "reply" | "standalone_draft" | "forward"
884
+ /**
885
+ * Sender address owned by the user
886
+ */
887
+ from: {
888
+ address: string
889
+ name?: string
890
+ }
891
+ /**
892
+ * Primary recipients. Required for standalone drafts and forwards, optional for replies.
893
+ */
894
+ to?: Array<{
895
+ address: string
896
+ name?: string
897
+ }>
898
+ /**
899
+ * CC recipients
900
+ */
901
+ cc?: Array<{
902
+ address: string
903
+ name?: string
904
+ }>
905
+ /**
906
+ * BCC recipients
907
+ */
908
+ bcc?: Array<{
909
+ address: string
910
+ name?: string
911
+ }>
912
+ /**
913
+ * Subject line. Required for standalone drafts. Auto-generated for replies and forwards.
914
+ */
915
+ subject?: string
916
+ /**
917
+ * Plain text email body
918
+ */
919
+ text?: string
920
+ /**
921
+ * HTML email body
922
+ */
923
+ html?: string
924
+ /**
925
+ * Gmail thread ID for replies or forwards. Required when draftType is reply or forward.
926
+ */
927
+ threadId?: string
928
+ /**
929
+ * Specific message ID to reply to. Defaults to latest message when omitted.
930
+ */
931
+ parentMessageId?: string
932
+ /**
933
+ * Opaque draft ID from a prior create_or_update_draft_all_clients response. Pass this to update existing drafts in both Gmail and Notion Mail. Omit to create new drafts.
934
+ */
935
+ draftId?: string
936
+ }
937
+
938
+ /**
939
+ * Canonical Tool Core output for the "Create Draft (Gmail + Notion Mail)" effect (`mail.createOrUpdateDraftAllClients`).
940
+ * This is the definition's output schema; the effect's script surface may
941
+ * re-encode it before returning.
942
+ */
943
+ export type CreateOrUpdateDraftAllClientsScriptOutput = {
944
+ /**
945
+ * Tool output content.
946
+ */
947
+ content: unknown
948
+ /**
949
+ * Name of the Mail tool that ran.
950
+ */
951
+ name: string
952
+ /**
953
+ * Whether the Mail service reported a tool error.
954
+ */
955
+ isError?: boolean
956
+ /**
957
+ * Execution metadata reported by the MCP server.
958
+ */
959
+ metadata?: {
960
+ /**
961
+ * Tool execution time in milliseconds.
962
+ */
963
+ executionTimeMs?: number
964
+ /**
965
+ * Number of bytes processed by the tool.
966
+ */
967
+ bytesProcessed?: number
968
+ /**
969
+ * Tool execution cost reported by the MCP server.
970
+ */
971
+ cost?: number
972
+ }
973
+ /**
974
+ * Mail module name used for display.
975
+ */
976
+ moduleName?: string
977
+ /**
978
+ * Structured tool output when provided by the Mail service.
979
+ */
980
+ structuredContent?: unknown
981
+ /**
982
+ * Bounded HTTP-like Mail service error code.
983
+ */
984
+ toolErrorCode?: number
985
+ }
986
+
987
+ /**
988
+ * Script input for the "Create Draft (Gmail)" effect (`mail.createOrUpdateGmailDraft`),
989
+ * derived from its Tool Core definition's call_function input projection.
990
+ *
991
+ * Create or update a draft email in Gmail's drafts folder.
992
+ */
993
+ export type CreateOrUpdateGmailDraftScriptInput = {
994
+ /**
995
+ * The user's email address
996
+ */
997
+ userEmailAddress: string
998
+ /**
999
+ * Draft intent: "reply" for replies, "standalone_draft" for new emails, "forward" to forward a message.
1000
+ */
1001
+ draftType: "reply" | "standalone_draft" | "forward"
1002
+ /**
1003
+ * Existing Gmail draft ID from a prior create_or_update_gmail_draft response. REQUIRED to update an existing draft (any draftType). OMIT to create a new draft.
1004
+ */
1005
+ draftId?: string
1006
+ /**
1007
+ * Gmail thread ID. Per draftType: reply=REQUIRED, forward=REQUIRED, standalone_draft=OMIT.
1008
+ */
1009
+ threadId?: string
1010
+ /**
1011
+ * Specific Gmail message ID to reply to (requires threadId)
1012
+ */
1013
+ parentMessageId?: string
1014
+ /**
1015
+ * Gmail send-as address controlled by the user
1016
+ */
1017
+ from: {
1018
+ address: string
1019
+ name?: string
1020
+ }
1021
+ /**
1022
+ * Primary recipients
1023
+ */
1024
+ to?: Array<{
1025
+ address: string
1026
+ name?: string
1027
+ }>
1028
+ /**
1029
+ * CC recipients
1030
+ */
1031
+ cc?: Array<{
1032
+ address: string
1033
+ name?: string
1034
+ }>
1035
+ /**
1036
+ * BCC recipients
1037
+ */
1038
+ bcc?: Array<{
1039
+ address: string
1040
+ name?: string
1041
+ }>
1042
+ /**
1043
+ * Subject line for the draft. Optional for replies/forwards when the subject is auto-generated.
1044
+ */
1045
+ subject?: string
1046
+ /**
1047
+ * Plain text email body
1048
+ */
1049
+ text?: string
1050
+ /**
1051
+ * HTML email body
1052
+ */
1053
+ html?: string
1054
+ }
1055
+
1056
+ /**
1057
+ * Canonical Tool Core output for the "Create Draft (Gmail)" effect (`mail.createOrUpdateGmailDraft`).
1058
+ * This is the definition's output schema; the effect's script surface may
1059
+ * re-encode it before returning.
1060
+ */
1061
+ export type CreateOrUpdateGmailDraftScriptOutput = {
1062
+ /**
1063
+ * Tool output content.
1064
+ */
1065
+ content: unknown
1066
+ /**
1067
+ * Name of the Mail tool that ran.
1068
+ */
1069
+ name: string
1070
+ /**
1071
+ * Whether the Mail service reported a tool error.
1072
+ */
1073
+ isError?: boolean
1074
+ /**
1075
+ * Execution metadata reported by the MCP server.
1076
+ */
1077
+ metadata?: {
1078
+ /**
1079
+ * Tool execution time in milliseconds.
1080
+ */
1081
+ executionTimeMs?: number
1082
+ /**
1083
+ * Number of bytes processed by the tool.
1084
+ */
1085
+ bytesProcessed?: number
1086
+ /**
1087
+ * Tool execution cost reported by the MCP server.
1088
+ */
1089
+ cost?: number
1090
+ }
1091
+ /**
1092
+ * Mail module name used for display.
1093
+ */
1094
+ moduleName?: string
1095
+ /**
1096
+ * Structured tool output when provided by the Mail service.
1097
+ */
1098
+ structuredContent?: unknown
1099
+ /**
1100
+ * Bounded HTTP-like Mail service error code.
1101
+ */
1102
+ toolErrorCode?: number
1103
+ }
1104
+
1105
+ /**
1106
+ * Script input for the "Create Draft (Outlook)" effect (`mail.createOrUpdateOutlookDraft`),
1107
+ * derived from its Tool Core definition's call_function input projection.
1108
+ *
1109
+ * Create or update a draft email in Outlook's drafts folder via Microsoft Graph. To send an Outlook draft, pass the returned draftId to send_existing_draft.
1110
+ */
1111
+ export type CreateOrUpdateOutlookDraftScriptInput = {
1112
+ /**
1113
+ * The user's email address
1114
+ */
1115
+ userEmailAddress: string
1116
+ /**
1117
+ * Draft intent: "reply" for replies, "standalone_draft" for new emails, "forward" to forward a message.
1118
+ */
1119
+ draftType: "reply" | "standalone_draft" | "forward"
1120
+ /**
1121
+ * Existing Outlook draft ID from a prior create_or_update_outlook_draft response. REQUIRED to update an existing draft (any draftType). OMIT to create a new draft.
1122
+ */
1123
+ draftId?: string
1124
+ /**
1125
+ * Outlook conversation ID. Per draftType: reply=REQUIRED, forward=REQUIRED, standalone_draft=OMIT.
1126
+ */
1127
+ conversationId?: string
1128
+ /**
1129
+ * Specific Outlook message ID to reply to or forward (requires conversationId)
1130
+ */
1131
+ parentMessageId?: string
1132
+ /**
1133
+ * Outlook send-as address controlled by the user
1134
+ */
1135
+ from: {
1136
+ address: string
1137
+ name?: string
1138
+ }
1139
+ /**
1140
+ * Primary recipients
1141
+ */
1142
+ to?: Array<{
1143
+ address: string
1144
+ name?: string
1145
+ }>
1146
+ /**
1147
+ * CC recipients
1148
+ */
1149
+ cc?: Array<{
1150
+ address: string
1151
+ name?: string
1152
+ }>
1153
+ /**
1154
+ * BCC recipients
1155
+ */
1156
+ bcc?: Array<{
1157
+ address: string
1158
+ name?: string
1159
+ }>
1160
+ /**
1161
+ * Subject line for the draft. Optional for replies/forwards when the subject is auto-generated.
1162
+ */
1163
+ subject?: string
1164
+ /**
1165
+ * Plain text email body
1166
+ */
1167
+ text?: string
1168
+ /**
1169
+ * HTML email body
1170
+ */
1171
+ html?: string
1172
+ }
1173
+
1174
+ /**
1175
+ * Canonical Tool Core output for the "Create Draft (Outlook)" effect (`mail.createOrUpdateOutlookDraft`).
1176
+ * This is the definition's output schema; the effect's script surface may
1177
+ * re-encode it before returning.
1178
+ */
1179
+ export type CreateOrUpdateOutlookDraftScriptOutput = {
1180
+ /**
1181
+ * Tool output content.
1182
+ */
1183
+ content: unknown
1184
+ /**
1185
+ * Name of the Mail tool that ran.
1186
+ */
1187
+ name: string
1188
+ /**
1189
+ * Whether the Mail service reported a tool error.
1190
+ */
1191
+ isError?: boolean
1192
+ /**
1193
+ * Execution metadata reported by the MCP server.
1194
+ */
1195
+ metadata?: {
1196
+ /**
1197
+ * Tool execution time in milliseconds.
1198
+ */
1199
+ executionTimeMs?: number
1200
+ /**
1201
+ * Number of bytes processed by the tool.
1202
+ */
1203
+ bytesProcessed?: number
1204
+ /**
1205
+ * Tool execution cost reported by the MCP server.
1206
+ */
1207
+ cost?: number
1208
+ }
1209
+ /**
1210
+ * Mail module name used for display.
1211
+ */
1212
+ moduleName?: string
1213
+ /**
1214
+ * Structured tool output when provided by the Mail service.
1215
+ */
1216
+ structuredContent?: unknown
1217
+ /**
1218
+ * Bounded HTTP-like Mail service error code.
1219
+ */
1220
+ toolErrorCode?: number
1221
+ }
1222
+
1223
+ /**
1224
+ * Script input for the "Create Outlook Category" effect (`mail.createOutlookCategory`),
1225
+ * derived from its Tool Core definition's call_function input projection.
1226
+ *
1227
+ * Create a new category in the user's Outlook master category list. Categories can then be applied to messages.
1228
+ */
1229
+ export type CreateOutlookCategoryScriptInput = {
1230
+ /**
1231
+ * The Outlook email address
1232
+ */
1233
+ userEmailAddress: string
1234
+ /**
1235
+ * The category name. Must be unique. Immutable after creation.
1236
+ */
1237
+ displayName: string
1238
+ /**
1239
+ * Color preset. Common: preset0=Red, preset1=Orange, preset4=Green, preset7=Blue, preset8=Purple.
1240
+ */
1241
+ color?:
1242
+ | "None"
1243
+ | "preset0"
1244
+ | "preset1"
1245
+ | "preset2"
1246
+ | "preset3"
1247
+ | "preset4"
1248
+ | "preset5"
1249
+ | "preset6"
1250
+ | "preset7"
1251
+ | "preset8"
1252
+ | "preset9"
1253
+ | "preset10"
1254
+ | "preset11"
1255
+ | "preset12"
1256
+ | "preset13"
1257
+ | "preset14"
1258
+ | "preset15"
1259
+ | "preset16"
1260
+ | "preset17"
1261
+ | "preset18"
1262
+ | "preset19"
1263
+ | "preset20"
1264
+ | "preset21"
1265
+ | "preset22"
1266
+ | "preset23"
1267
+ | "preset24"
1268
+ }
1269
+
1270
+ /**
1271
+ * Canonical Tool Core output for the "Create Outlook Category" effect (`mail.createOutlookCategory`).
1272
+ * This is the definition's output schema; the effect's script surface may
1273
+ * re-encode it before returning.
1274
+ */
1275
+ export type CreateOutlookCategoryScriptOutput = {
1276
+ /**
1277
+ * Tool output content.
1278
+ */
1279
+ content: unknown
1280
+ /**
1281
+ * Name of the Mail tool that ran.
1282
+ */
1283
+ name: string
1284
+ /**
1285
+ * Whether the Mail service reported a tool error.
1286
+ */
1287
+ isError?: boolean
1288
+ /**
1289
+ * Execution metadata reported by the MCP server.
1290
+ */
1291
+ metadata?: {
1292
+ /**
1293
+ * Tool execution time in milliseconds.
1294
+ */
1295
+ executionTimeMs?: number
1296
+ /**
1297
+ * Number of bytes processed by the tool.
1298
+ */
1299
+ bytesProcessed?: number
1300
+ /**
1301
+ * Tool execution cost reported by the MCP server.
1302
+ */
1303
+ cost?: number
1304
+ }
1305
+ /**
1306
+ * Mail module name used for display.
1307
+ */
1308
+ moduleName?: string
1309
+ /**
1310
+ * Structured tool output when provided by the Mail service.
1311
+ */
1312
+ structuredContent?: unknown
1313
+ /**
1314
+ * Bounded HTTP-like Mail service error code.
1315
+ */
1316
+ toolErrorCode?: number
1317
+ }
1318
+
1319
+ /**
1320
+ * Script input for the "Create Outlook Folder" effect (`mail.createOutlookFolder`),
1321
+ * derived from its Tool Core definition's call_function input projection.
1322
+ *
1323
+ * Create a new mail folder in the user's Outlook mailbox
1324
+ */
1325
+ export type CreateOutlookFolderScriptInput = {
1326
+ /**
1327
+ * The email address of the Outlook mailbox
1328
+ */
1329
+ userEmailAddress: string
1330
+ /**
1331
+ * Name of the folder to create
1332
+ */
1333
+ folderName: string
1334
+ /**
1335
+ * Optional parent folder ID to create a subfolder. Omit to create at the top level.
1336
+ */
1337
+ parentFolderId?: string
1338
+ }
1339
+
1340
+ /**
1341
+ * Canonical Tool Core output for the "Create Outlook Folder" effect (`mail.createOutlookFolder`).
1342
+ * This is the definition's output schema; the effect's script surface may
1343
+ * re-encode it before returning.
1344
+ */
1345
+ export type CreateOutlookFolderScriptOutput = {
1346
+ /**
1347
+ * Tool output content.
1348
+ */
1349
+ content: unknown
1350
+ /**
1351
+ * Name of the Mail tool that ran.
1352
+ */
1353
+ name: string
1354
+ /**
1355
+ * Whether the Mail service reported a tool error.
1356
+ */
1357
+ isError?: boolean
1358
+ /**
1359
+ * Execution metadata reported by the MCP server.
1360
+ */
1361
+ metadata?: {
1362
+ /**
1363
+ * Tool execution time in milliseconds.
1364
+ */
1365
+ executionTimeMs?: number
1366
+ /**
1367
+ * Number of bytes processed by the tool.
1368
+ */
1369
+ bytesProcessed?: number
1370
+ /**
1371
+ * Tool execution cost reported by the MCP server.
1372
+ */
1373
+ cost?: number
1374
+ }
1375
+ /**
1376
+ * Mail module name used for display.
1377
+ */
1378
+ moduleName?: string
1379
+ /**
1380
+ * Structured tool output when provided by the Mail service.
1381
+ */
1382
+ structuredContent?: unknown
1383
+ /**
1384
+ * Bounded HTTP-like Mail service error code.
1385
+ */
1386
+ toolErrorCode?: number
1387
+ }
1388
+
1389
+ /**
1390
+ * Script input for the "Create Outlook Rule" effect (`mail.createOutlookRule`),
1391
+ * derived from its Tool Core definition's call_function input projection.
1392
+ *
1393
+ * Create a new inbox rule in the user's Outlook mailbox to automatically process incoming messages
1394
+ */
1395
+ export type CreateOutlookRuleScriptInput = {
1396
+ /**
1397
+ * Display name for the rule
1398
+ */
1399
+ displayName: string
1400
+ /**
1401
+ * Execution order (lower = earlier). Omit to append at end.
1402
+ */
1403
+ sequence?: number
1404
+ /**
1405
+ * Whether the rule is active (defaults to enabled when omitted)
1406
+ */
1407
+ isEnabled?: boolean
1408
+ conditions: {
1409
+ bodyContains?: Array<string>
1410
+ bodyOrSubjectContains?: Array<string>
1411
+ categories?: Array<string>
1412
+ fromAddresses?: Array<{
1413
+ address: string
1414
+ name?: string
1415
+ }>
1416
+ hasAttachments?: boolean
1417
+ headerContains?: Array<string>
1418
+ importance?: "low" | "normal" | "high"
1419
+ isApprovalRequest?: boolean
1420
+ isAutomaticForward?: boolean
1421
+ isAutomaticReply?: boolean
1422
+ isEncrypted?: boolean
1423
+ isMeetingRequest?: boolean
1424
+ isMeetingResponse?: boolean
1425
+ isNonDeliveryReport?: boolean
1426
+ isPermissionControlled?: boolean
1427
+ isReadReceipt?: boolean
1428
+ isSigned?: boolean
1429
+ isVoicemail?: boolean
1430
+ messageActionFlag?:
1431
+ | "any"
1432
+ | "call"
1433
+ | "doNotForward"
1434
+ | "followUp"
1435
+ | "fyi"
1436
+ | "forward"
1437
+ | "noResponseNecessary"
1438
+ | "read"
1439
+ | "reply"
1440
+ | "replyToAll"
1441
+ | "review"
1442
+ notSentToMe?: boolean
1443
+ recipientContains?: Array<string>
1444
+ senderContains?: Array<string>
1445
+ sensitivity?: "normal" | "personal" | "private" | "confidential"
1446
+ sentCcMe?: boolean
1447
+ sentOnlyToMe?: boolean
1448
+ sentToMe?: boolean
1449
+ sentToOrCcMe?: boolean
1450
+ sentToAddresses?: Array<{
1451
+ address: string
1452
+ name?: string
1453
+ }>
1454
+ subjectContains?: Array<string>
1455
+ withinSizeRange?: {
1456
+ minimumSize?: number
1457
+ maximumSize?: number
1458
+ }
1459
+ }
1460
+ /**
1461
+ * Actions to take when conditions are met (at least one non-empty field required)
1462
+ */
1463
+ actions: {
1464
+ /**
1465
+ * Categories to assign
1466
+ */
1467
+ assignCategories?: Array<string>
1468
+ /**
1469
+ * Folder ID to copy to (use list_outlook_folders to find IDs)
1470
+ */
1471
+ copyToFolder?: string
1472
+ /**
1473
+ * Move to Deleted Items
1474
+ */
1475
+ delete?: boolean
1476
+ /**
1477
+ * Forward as attachment to these addresses
1478
+ */
1479
+ forwardAsAttachmentTo?: Array<{
1480
+ /**
1481
+ * Email address
1482
+ */
1483
+ address: string
1484
+ /**
1485
+ * Display name (optional)
1486
+ */
1487
+ name?: string
1488
+ }>
1489
+ /**
1490
+ * Forward to these addresses
1491
+ */
1492
+ forwardTo?: Array<{
1493
+ /**
1494
+ * Email address
1495
+ */
1496
+ address: string
1497
+ /**
1498
+ * Display name (optional)
1499
+ */
1500
+ name?: string
1501
+ }>
1502
+ /**
1503
+ * Mark as read
1504
+ */
1505
+ markAsRead?: boolean
1506
+ /**
1507
+ * Set importance level
1508
+ */
1509
+ markImportance?: "low" | "normal" | "high"
1510
+ /**
1511
+ * Folder ID to move to (use list_outlook_folders to find IDs)
1512
+ */
1513
+ moveToFolder?: string
1514
+ /**
1515
+ * Permanently delete (skip Deleted Items)
1516
+ */
1517
+ permanentDelete?: boolean
1518
+ /**
1519
+ * Redirect to these addresses
1520
+ */
1521
+ redirectTo?: Array<{
1522
+ /**
1523
+ * Email address
1524
+ */
1525
+ address: string
1526
+ /**
1527
+ * Display name (optional)
1528
+ */
1529
+ name?: string
1530
+ }>
1531
+ /**
1532
+ * Stop processing subsequent rules
1533
+ */
1534
+ stopProcessingRules?: boolean
1535
+ }
1536
+ exceptions?: {
1537
+ bodyContains?: Array<string>
1538
+ bodyOrSubjectContains?: Array<string>
1539
+ categories?: Array<string>
1540
+ fromAddresses?: Array<{
1541
+ address: string
1542
+ name?: string
1543
+ }>
1544
+ hasAttachments?: boolean
1545
+ headerContains?: Array<string>
1546
+ importance?: "low" | "normal" | "high"
1547
+ isApprovalRequest?: boolean
1548
+ isAutomaticForward?: boolean
1549
+ isAutomaticReply?: boolean
1550
+ isEncrypted?: boolean
1551
+ isMeetingRequest?: boolean
1552
+ isMeetingResponse?: boolean
1553
+ isNonDeliveryReport?: boolean
1554
+ isPermissionControlled?: boolean
1555
+ isReadReceipt?: boolean
1556
+ isSigned?: boolean
1557
+ isVoicemail?: boolean
1558
+ messageActionFlag?:
1559
+ | "any"
1560
+ | "call"
1561
+ | "doNotForward"
1562
+ | "followUp"
1563
+ | "fyi"
1564
+ | "forward"
1565
+ | "noResponseNecessary"
1566
+ | "read"
1567
+ | "reply"
1568
+ | "replyToAll"
1569
+ | "review"
1570
+ notSentToMe?: boolean
1571
+ recipientContains?: Array<string>
1572
+ senderContains?: Array<string>
1573
+ sensitivity?: "normal" | "personal" | "private" | "confidential"
1574
+ sentCcMe?: boolean
1575
+ sentOnlyToMe?: boolean
1576
+ sentToMe?: boolean
1577
+ sentToOrCcMe?: boolean
1578
+ sentToAddresses?: Array<{
1579
+ address: string
1580
+ name?: string
1581
+ }>
1582
+ subjectContains?: Array<string>
1583
+ withinSizeRange?: {
1584
+ minimumSize?: number
1585
+ maximumSize?: number
1586
+ }
1587
+ }
1588
+ /**
1589
+ * The Outlook email address
1590
+ */
1591
+ userEmailAddress: string
1592
+ }
1593
+
1594
+ /**
1595
+ * Canonical Tool Core output for the "Create Outlook Rule" effect (`mail.createOutlookRule`).
1596
+ * This is the definition's output schema; the effect's script surface may
1597
+ * re-encode it before returning.
1598
+ */
1599
+ export type CreateOutlookRuleScriptOutput = {
1600
+ /**
1601
+ * Tool output content.
1602
+ */
1603
+ content: unknown
1604
+ /**
1605
+ * Name of the Mail tool that ran.
1606
+ */
1607
+ name: string
1608
+ /**
1609
+ * Whether the Mail service reported a tool error.
1610
+ */
1611
+ isError?: boolean
1612
+ /**
1613
+ * Execution metadata reported by the MCP server.
1614
+ */
1615
+ metadata?: {
1616
+ /**
1617
+ * Tool execution time in milliseconds.
1618
+ */
1619
+ executionTimeMs?: number
1620
+ /**
1621
+ * Number of bytes processed by the tool.
1622
+ */
1623
+ bytesProcessed?: number
1624
+ /**
1625
+ * Tool execution cost reported by the MCP server.
1626
+ */
1627
+ cost?: number
1628
+ }
1629
+ /**
1630
+ * Mail module name used for display.
1631
+ */
1632
+ moduleName?: string
1633
+ /**
1634
+ * Structured tool output when provided by the Mail service.
1635
+ */
1636
+ structuredContent?: unknown
1637
+ /**
1638
+ * Bounded HTTP-like Mail service error code.
1639
+ */
1640
+ toolErrorCode?: number
1641
+ }
1642
+
1643
+ /**
1644
+ * Script input for the "Create Status Column" effect (`mail.createStatusColumn`),
1645
+ * derived from its Tool Core definition's call_function input projection.
1646
+ *
1647
+ * Create a new status property column for emails
1648
+ */
1649
+ export type CreateStatusColumnScriptInput = {
1650
+ /**
1651
+ * The email address of the mailbox
1652
+ */
1653
+ userEmailAddress: string
1654
+ /**
1655
+ * Name of the status column
1656
+ */
1657
+ propertyName: string
1658
+ /**
1659
+ * Status options for the column
1660
+ */
1661
+ options: Array<{
1662
+ /**
1663
+ * Display name for the option
1664
+ */
1665
+ name: string
1666
+ style: {
1667
+ color:
1668
+ | "light-gray"
1669
+ | "gray"
1670
+ | "brown"
1671
+ | "orange"
1672
+ | "yellow"
1673
+ | "green"
1674
+ | "blue"
1675
+ | "purple"
1676
+ | "pink"
1677
+ | "red"
1678
+ icon:
1679
+ | "star"
1680
+ | "xmark"
1681
+ | "check"
1682
+ | "warning"
1683
+ | "play"
1684
+ | "reply"
1685
+ | "dot"
1686
+ | "noStatus"
1687
+ | "todoReply"
1688
+ | "waitingClock"
1689
+ }
1690
+ /**
1691
+ * Whether this is the default option
1692
+ */
1693
+ isDefault?: boolean
1694
+ }>
1695
+ /**
1696
+ * Optional layout ID to attach the column to
1697
+ */
1698
+ layoutID?: string
1699
+ }
1700
+
1701
+ /**
1702
+ * Canonical Tool Core output for the "Create Status Column" effect (`mail.createStatusColumn`).
1703
+ * This is the definition's output schema; the effect's script surface may
1704
+ * re-encode it before returning.
1705
+ */
1706
+ export type CreateStatusColumnScriptOutput = {
1707
+ /**
1708
+ * Tool output content.
1709
+ */
1710
+ content: unknown
1711
+ /**
1712
+ * Name of the Mail tool that ran.
1713
+ */
1714
+ name: string
1715
+ /**
1716
+ * Whether the Mail service reported a tool error.
1717
+ */
1718
+ isError?: boolean
1719
+ /**
1720
+ * Execution metadata reported by the MCP server.
1721
+ */
1722
+ metadata?: {
1723
+ /**
1724
+ * Tool execution time in milliseconds.
1725
+ */
1726
+ executionTimeMs?: number
1727
+ /**
1728
+ * Number of bytes processed by the tool.
1729
+ */
1730
+ bytesProcessed?: number
1731
+ /**
1732
+ * Tool execution cost reported by the MCP server.
1733
+ */
1734
+ cost?: number
1735
+ }
1736
+ /**
1737
+ * Mail module name used for display.
1738
+ */
1739
+ moduleName?: string
1740
+ /**
1741
+ * Structured tool output when provided by the Mail service.
1742
+ */
1743
+ structuredContent?: unknown
1744
+ /**
1745
+ * Bounded HTTP-like Mail service error code.
1746
+ */
1747
+ toolErrorCode?: number
1748
+ }
1749
+
1750
+ /**
1751
+ * Script input for the "Delete Gmail Filter" effect (`mail.deleteGmailFilter`),
1752
+ * derived from its Tool Core definition's call_function input projection.
1753
+ *
1754
+ * Delete an existing Gmail filter
1755
+ */
1756
+ export type DeleteGmailFilterScriptInput = {
1757
+ /**
1758
+ * The email address of the Gmail account
1759
+ */
1760
+ userEmailAddress: string
1761
+ /**
1762
+ * The ID of the filter to delete
1763
+ */
1764
+ filterId: string
1765
+ }
1766
+
1767
+ /**
1768
+ * Canonical Tool Core output for the "Delete Gmail Filter" effect (`mail.deleteGmailFilter`).
1769
+ * This is the definition's output schema; the effect's script surface may
1770
+ * re-encode it before returning.
1771
+ */
1772
+ export type DeleteGmailFilterScriptOutput = {
1773
+ /**
1774
+ * Tool output content.
1775
+ */
1776
+ content: unknown
1777
+ /**
1778
+ * Name of the Mail tool that ran.
1779
+ */
1780
+ name: string
1781
+ /**
1782
+ * Whether the Mail service reported a tool error.
1783
+ */
1784
+ isError?: boolean
1785
+ /**
1786
+ * Execution metadata reported by the MCP server.
1787
+ */
1788
+ metadata?: {
1789
+ /**
1790
+ * Tool execution time in milliseconds.
1791
+ */
1792
+ executionTimeMs?: number
1793
+ /**
1794
+ * Number of bytes processed by the tool.
1795
+ */
1796
+ bytesProcessed?: number
1797
+ /**
1798
+ * Tool execution cost reported by the MCP server.
1799
+ */
1800
+ cost?: number
1801
+ }
1802
+ /**
1803
+ * Mail module name used for display.
1804
+ */
1805
+ moduleName?: string
1806
+ /**
1807
+ * Structured tool output when provided by the Mail service.
1808
+ */
1809
+ structuredContent?: unknown
1810
+ /**
1811
+ * Bounded HTTP-like Mail service error code.
1812
+ */
1813
+ toolErrorCode?: number
1814
+ }
1815
+
1816
+ /**
1817
+ * Script input for the "Delete Label" effect (`mail.deleteLabel`),
1818
+ * derived from its Tool Core definition's call_function input projection.
1819
+ *
1820
+ * Delete a label from the mailbox
1821
+ */
1822
+ export type DeleteLabelScriptInput = {
1823
+ /**
1824
+ * The email address of the mailbox
1825
+ */
1826
+ userEmailAddress: string
1827
+ /**
1828
+ * ID of the label to delete
1829
+ */
1830
+ labelID: string
1831
+ }
1832
+
1833
+ /**
1834
+ * Canonical Tool Core output for the "Delete Label" effect (`mail.deleteLabel`).
1835
+ * This is the definition's output schema; the effect's script surface may
1836
+ * re-encode it before returning.
1837
+ */
1838
+ export type DeleteLabelScriptOutput = {
1839
+ /**
1840
+ * Tool output content.
1841
+ */
1842
+ content: unknown
1843
+ /**
1844
+ * Name of the Mail tool that ran.
1845
+ */
1846
+ name: string
1847
+ /**
1848
+ * Whether the Mail service reported a tool error.
1849
+ */
1850
+ isError?: boolean
1851
+ /**
1852
+ * Execution metadata reported by the MCP server.
1853
+ */
1854
+ metadata?: {
1855
+ /**
1856
+ * Tool execution time in milliseconds.
1857
+ */
1858
+ executionTimeMs?: number
1859
+ /**
1860
+ * Number of bytes processed by the tool.
1861
+ */
1862
+ bytesProcessed?: number
1863
+ /**
1864
+ * Tool execution cost reported by the MCP server.
1865
+ */
1866
+ cost?: number
1867
+ }
1868
+ /**
1869
+ * Mail module name used for display.
1870
+ */
1871
+ moduleName?: string
1872
+ /**
1873
+ * Structured tool output when provided by the Mail service.
1874
+ */
1875
+ structuredContent?: unknown
1876
+ /**
1877
+ * Bounded HTTP-like Mail service error code.
1878
+ */
1879
+ toolErrorCode?: number
1880
+ }
1881
+
1882
+ /**
1883
+ * Script input for the "Delete Outlook Category" effect (`mail.deleteOutlookCategory`),
1884
+ * derived from its Tool Core definition's call_function input projection.
1885
+ *
1886
+ * Permanently remove a category from the user's Outlook master category list. Messages already tagged retain the category name.
1887
+ */
1888
+ export type DeleteOutlookCategoryScriptInput = {
1889
+ /**
1890
+ * The Outlook email address
1891
+ */
1892
+ userEmailAddress: string
1893
+ /**
1894
+ * The category ID (from list_outlook_categories).
1895
+ */
1896
+ categoryId: string
1897
+ }
1898
+
1899
+ /**
1900
+ * Canonical Tool Core output for the "Delete Outlook Category" effect (`mail.deleteOutlookCategory`).
1901
+ * This is the definition's output schema; the effect's script surface may
1902
+ * re-encode it before returning.
1903
+ */
1904
+ export type DeleteOutlookCategoryScriptOutput = {
1905
+ /**
1906
+ * Tool output content.
1907
+ */
1908
+ content: unknown
1909
+ /**
1910
+ * Name of the Mail tool that ran.
1911
+ */
1912
+ name: string
1913
+ /**
1914
+ * Whether the Mail service reported a tool error.
1915
+ */
1916
+ isError?: boolean
1917
+ /**
1918
+ * Execution metadata reported by the MCP server.
1919
+ */
1920
+ metadata?: {
1921
+ /**
1922
+ * Tool execution time in milliseconds.
1923
+ */
1924
+ executionTimeMs?: number
1925
+ /**
1926
+ * Number of bytes processed by the tool.
1927
+ */
1928
+ bytesProcessed?: number
1929
+ /**
1930
+ * Tool execution cost reported by the MCP server.
1931
+ */
1932
+ cost?: number
1933
+ }
1934
+ /**
1935
+ * Mail module name used for display.
1936
+ */
1937
+ moduleName?: string
1938
+ /**
1939
+ * Structured tool output when provided by the Mail service.
1940
+ */
1941
+ structuredContent?: unknown
1942
+ /**
1943
+ * Bounded HTTP-like Mail service error code.
1944
+ */
1945
+ toolErrorCode?: number
1946
+ }
1947
+
1948
+ /**
1949
+ * Script input for the "Delete Outlook Rule" effect (`mail.deleteOutlookRule`),
1950
+ * derived from its Tool Core definition's call_function input projection.
1951
+ *
1952
+ * Permanently delete an inbox rule from the user's Outlook mailbox
1953
+ */
1954
+ export type DeleteOutlookRuleScriptInput = {
1955
+ /**
1956
+ * Rule ID to delete (use list_outlook_rules to find IDs)
1957
+ */
1958
+ ruleId: string
1959
+ /**
1960
+ * Opaque etag from a prior list_outlook_rules response. If provided, the delete fails with an ABORTED error when the rule was modified since you listed it. Omit for last-write-wins.
1961
+ */
1962
+ etag?: string
1963
+ /**
1964
+ * The Outlook email address
1965
+ */
1966
+ userEmailAddress: string
1967
+ }
1968
+
1969
+ /**
1970
+ * Canonical Tool Core output for the "Delete Outlook Rule" effect (`mail.deleteOutlookRule`).
1971
+ * This is the definition's output schema; the effect's script surface may
1972
+ * re-encode it before returning.
1973
+ */
1974
+ export type DeleteOutlookRuleScriptOutput = {
1975
+ /**
1976
+ * Tool output content.
1977
+ */
1978
+ content: unknown
1979
+ /**
1980
+ * Name of the Mail tool that ran.
1981
+ */
1982
+ name: string
1983
+ /**
1984
+ * Whether the Mail service reported a tool error.
1985
+ */
1986
+ isError?: boolean
1987
+ /**
1988
+ * Execution metadata reported by the MCP server.
1989
+ */
1990
+ metadata?: {
1991
+ /**
1992
+ * Tool execution time in milliseconds.
1993
+ */
1994
+ executionTimeMs?: number
1995
+ /**
1996
+ * Number of bytes processed by the tool.
1997
+ */
1998
+ bytesProcessed?: number
1999
+ /**
2000
+ * Tool execution cost reported by the MCP server.
2001
+ */
2002
+ cost?: number
2003
+ }
2004
+ /**
2005
+ * Mail module name used for display.
2006
+ */
2007
+ moduleName?: string
2008
+ /**
2009
+ * Structured tool output when provided by the Mail service.
2010
+ */
2011
+ structuredContent?: unknown
2012
+ /**
2013
+ * Bounded HTTP-like Mail service error code.
2014
+ */
2015
+ toolErrorCode?: number
2016
+ }
2017
+
2018
+ /**
2019
+ * Script input for the "Flag Outlook Thread" effect (`mail.flagOutlookThread`),
2020
+ * derived from its Tool Core definition's call_function input projection.
2021
+ *
2022
+ * Set or clear the Outlook follow-up flag on one or more conversations, optionally with a reminder. Outlook's flag is the unified primitive for Gmail's star + reminder: pass flagged=true without reminderDateTime to 'star' the thread; pass flagged=true with reminderDateTime to schedule a reminder; pass flagged=false to clear both. Outlook accounts only — for Gmail accounts use star_thread or set_reminder / unset_reminder instead.
2023
+ */
2024
+ export type FlagOutlookThreadScriptInput = {
2025
+ /**
2026
+ * The Outlook email address
2027
+ */
2028
+ userEmailAddress: string
2029
+ /**
2030
+ * One or more Outlook conversation IDs (obtained from search_emails as threadId).
2031
+ */
2032
+ conversationIDs: Array<string>
2033
+ /**
2034
+ * true to flag the conversation, false to clear the flag and any reminder.
2035
+ */
2036
+ flagged: boolean
2037
+ /**
2038
+ * Optional ISO 8601 datetime (with offset) to fire a reminder at. Only honored when flagged=true.
2039
+ */
2040
+ reminderDateTime?: string
2041
+ }
2042
+
2043
+ /**
2044
+ * Canonical Tool Core output for the "Flag Outlook Thread" effect (`mail.flagOutlookThread`).
2045
+ * This is the definition's output schema; the effect's script surface may
2046
+ * re-encode it before returning.
2047
+ */
2048
+ export type FlagOutlookThreadScriptOutput = {
2049
+ /**
2050
+ * Tool output content.
2051
+ */
2052
+ content: unknown
2053
+ /**
2054
+ * Name of the Mail tool that ran.
2055
+ */
2056
+ name: string
2057
+ /**
2058
+ * Whether the Mail service reported a tool error.
2059
+ */
2060
+ isError?: boolean
2061
+ /**
2062
+ * Execution metadata reported by the MCP server.
2063
+ */
2064
+ metadata?: {
2065
+ /**
2066
+ * Tool execution time in milliseconds.
2067
+ */
2068
+ executionTimeMs?: number
2069
+ /**
2070
+ * Number of bytes processed by the tool.
2071
+ */
2072
+ bytesProcessed?: number
2073
+ /**
2074
+ * Tool execution cost reported by the MCP server.
2075
+ */
2076
+ cost?: number
2077
+ }
2078
+ /**
2079
+ * Mail module name used for display.
2080
+ */
2081
+ moduleName?: string
2082
+ /**
2083
+ * Structured tool output when provided by the Mail service.
2084
+ */
2085
+ structuredContent?: unknown
2086
+ /**
2087
+ * Bounded HTTP-like Mail service error code.
2088
+ */
2089
+ toolErrorCode?: number
2090
+ }
2091
+
2092
+ /**
2093
+ * Script input for the "Get Notion Mail Notification Preferences" effect (`mail.getNotificationPreferences`),
2094
+ * derived from its Tool Core definition's call_function input projection.
2095
+ *
2096
+ * Retrieve the Notion Mail notification preferences for the user's email accounts across all levels (account, view, and sender). This tool is specific to Notion Mail notification settings only — it does not read or modify notification settings for Gmail, Outlook, or any other email provider.
2097
+ */
2098
+ export type GetNotificationPreferencesScriptInput = {
2099
+ /**
2100
+ * The Notion Mail email address of the account to get notification preferences for. Must be an account connected to Notion Mail.
2101
+ */
2102
+ userEmailAddress: string
2103
+ /**
2104
+ * Filter which preference levels to return. Valid values: "account", "view", "sender". Omit to return all levels.
2105
+ */
2106
+ levels?: Array<"account" | "view" | "sender">
2107
+ }
2108
+
2109
+ /**
2110
+ * Canonical Tool Core output for the "Get Notion Mail Notification Preferences" effect (`mail.getNotificationPreferences`).
2111
+ * This is the definition's output schema; the effect's script surface may
2112
+ * re-encode it before returning.
2113
+ */
2114
+ export type GetNotificationPreferencesScriptOutput = {
2115
+ /**
2116
+ * Tool output content.
2117
+ */
2118
+ content: unknown
2119
+ /**
2120
+ * Name of the Mail tool that ran.
2121
+ */
2122
+ name: string
2123
+ /**
2124
+ * Whether the Mail service reported a tool error.
2125
+ */
2126
+ isError?: boolean
2127
+ /**
2128
+ * Execution metadata reported by the MCP server.
2129
+ */
2130
+ metadata?: {
2131
+ /**
2132
+ * Tool execution time in milliseconds.
2133
+ */
2134
+ executionTimeMs?: number
2135
+ /**
2136
+ * Number of bytes processed by the tool.
2137
+ */
2138
+ bytesProcessed?: number
2139
+ /**
2140
+ * Tool execution cost reported by the MCP server.
2141
+ */
2142
+ cost?: number
2143
+ }
2144
+ /**
2145
+ * Mail module name used for display.
2146
+ */
2147
+ moduleName?: string
2148
+ /**
2149
+ * Structured tool output when provided by the Mail service.
2150
+ */
2151
+ structuredContent?: unknown
2152
+ /**
2153
+ * Bounded HTTP-like Mail service error code.
2154
+ */
2155
+ toolErrorCode?: number
2156
+ }
2157
+
2158
+ /**
2159
+ * Script input for the "Health Check" effect (`mail.healthCheck`),
2160
+ * derived from its Tool Core definition's call_function input projection.
2161
+ *
2162
+ * Check if the mail service is healthy and accessible
2163
+ */
2164
+ export type HealthCheckScriptInput = Record<string, unknown>
2165
+
2166
+ /**
2167
+ * Canonical Tool Core output for the "Health Check" effect (`mail.healthCheck`).
2168
+ * This is the definition's output schema; the effect's script surface may
2169
+ * re-encode it before returning.
2170
+ */
2171
+ export type HealthCheckScriptOutput = {
2172
+ /**
2173
+ * Tool output content.
2174
+ */
2175
+ content: unknown
2176
+ /**
2177
+ * Name of the Mail tool that ran.
2178
+ */
2179
+ name: string
2180
+ /**
2181
+ * Whether the Mail service reported a tool error.
2182
+ */
2183
+ isError?: boolean
2184
+ /**
2185
+ * Execution metadata reported by the MCP server.
2186
+ */
2187
+ metadata?: {
2188
+ /**
2189
+ * Tool execution time in milliseconds.
2190
+ */
2191
+ executionTimeMs?: number
2192
+ /**
2193
+ * Number of bytes processed by the tool.
2194
+ */
2195
+ bytesProcessed?: number
2196
+ /**
2197
+ * Tool execution cost reported by the MCP server.
2198
+ */
2199
+ cost?: number
2200
+ }
2201
+ /**
2202
+ * Mail module name used for display.
2203
+ */
2204
+ moduleName?: string
2205
+ /**
2206
+ * Structured tool output when provided by the Mail service.
2207
+ */
2208
+ structuredContent?: unknown
2209
+ /**
2210
+ * Bounded HTTP-like Mail service error code.
2211
+ */
2212
+ toolErrorCode?: number
2213
+ }
2214
+
2215
+ /**
2216
+ * Script input for the "List Gmail Filters" effect (`mail.listGmailFilters`),
2217
+ * derived from its Tool Core definition's call_function input projection.
2218
+ *
2219
+ * List all Gmail filters for the user's account
2220
+ */
2221
+ export type ListGmailFiltersScriptInput = {
2222
+ /**
2223
+ * The email address of the Gmail account
2224
+ */
2225
+ userEmailAddress: string
2226
+ }
2227
+
2228
+ /**
2229
+ * Canonical Tool Core output for the "List Gmail Filters" effect (`mail.listGmailFilters`).
2230
+ * This is the definition's output schema; the effect's script surface may
2231
+ * re-encode it before returning.
2232
+ */
2233
+ export type ListGmailFiltersScriptOutput = {
2234
+ /**
2235
+ * Tool output content.
2236
+ */
2237
+ content: unknown
2238
+ /**
2239
+ * Name of the Mail tool that ran.
2240
+ */
2241
+ name: string
2242
+ /**
2243
+ * Whether the Mail service reported a tool error.
2244
+ */
2245
+ isError?: boolean
2246
+ /**
2247
+ * Execution metadata reported by the MCP server.
2248
+ */
2249
+ metadata?: {
2250
+ /**
2251
+ * Tool execution time in milliseconds.
2252
+ */
2253
+ executionTimeMs?: number
2254
+ /**
2255
+ * Number of bytes processed by the tool.
2256
+ */
2257
+ bytesProcessed?: number
2258
+ /**
2259
+ * Tool execution cost reported by the MCP server.
2260
+ */
2261
+ cost?: number
2262
+ }
2263
+ /**
2264
+ * Mail module name used for display.
2265
+ */
2266
+ moduleName?: string
2267
+ /**
2268
+ * Structured tool output when provided by the Mail service.
2269
+ */
2270
+ structuredContent?: unknown
2271
+ /**
2272
+ * Bounded HTTP-like Mail service error code.
2273
+ */
2274
+ toolErrorCode?: number
2275
+ }
2276
+
2277
+ /**
2278
+ * Script input for the "List Labels" effect (`mail.listLabels`),
2279
+ * derived from its Tool Core definition's call_function input projection.
2280
+ *
2281
+ * List all labels in the mailbox
2282
+ */
2283
+ export type ListLabelsScriptInput = {
2284
+ /**
2285
+ * The email address of the mailbox
2286
+ */
2287
+ userEmailAddress: string
2288
+ }
2289
+
2290
+ /**
2291
+ * Canonical Tool Core output for the "List Labels" effect (`mail.listLabels`).
2292
+ * This is the definition's output schema; the effect's script surface may
2293
+ * re-encode it before returning.
2294
+ */
2295
+ export type ListLabelsScriptOutput = {
2296
+ /**
2297
+ * Tool output content.
2298
+ */
2299
+ content: unknown
2300
+ /**
2301
+ * Name of the Mail tool that ran.
2302
+ */
2303
+ name: string
2304
+ /**
2305
+ * Whether the Mail service reported a tool error.
2306
+ */
2307
+ isError?: boolean
2308
+ /**
2309
+ * Execution metadata reported by the MCP server.
2310
+ */
2311
+ metadata?: {
2312
+ /**
2313
+ * Tool execution time in milliseconds.
2314
+ */
2315
+ executionTimeMs?: number
2316
+ /**
2317
+ * Number of bytes processed by the tool.
2318
+ */
2319
+ bytesProcessed?: number
2320
+ /**
2321
+ * Tool execution cost reported by the MCP server.
2322
+ */
2323
+ cost?: number
2324
+ }
2325
+ /**
2326
+ * Mail module name used for display.
2327
+ */
2328
+ moduleName?: string
2329
+ /**
2330
+ * Structured tool output when provided by the Mail service.
2331
+ */
2332
+ structuredContent?: unknown
2333
+ /**
2334
+ * Bounded HTTP-like Mail service error code.
2335
+ */
2336
+ toolErrorCode?: number
2337
+ }
2338
+
2339
+ /**
2340
+ * Script input for the "List Mailbox Views" effect (`mail.listMailboxViews`),
2341
+ * derived from its Tool Core definition's call_function input projection.
2342
+ *
2343
+ * List the user's notification-eligible mailbox views: the Inbox plus custom user-created views. Other system views (Sent, Drafts, Trash, Spam) and suggested views are NOT returned.
2344
+ */
2345
+ export type ListMailboxViewsScriptInput = {
2346
+ /**
2347
+ * The email address of the mailbox
2348
+ */
2349
+ userEmailAddress: string
2350
+ }
2351
+
2352
+ /**
2353
+ * Canonical Tool Core output for the "List Mailbox Views" effect (`mail.listMailboxViews`).
2354
+ * This is the definition's output schema; the effect's script surface may
2355
+ * re-encode it before returning.
2356
+ */
2357
+ export type ListMailboxViewsScriptOutput = {
2358
+ /**
2359
+ * Tool output content.
2360
+ */
2361
+ content: unknown
2362
+ /**
2363
+ * Name of the Mail tool that ran.
2364
+ */
2365
+ name: string
2366
+ /**
2367
+ * Whether the Mail service reported a tool error.
2368
+ */
2369
+ isError?: boolean
2370
+ /**
2371
+ * Execution metadata reported by the MCP server.
2372
+ */
2373
+ metadata?: {
2374
+ /**
2375
+ * Tool execution time in milliseconds.
2376
+ */
2377
+ executionTimeMs?: number
2378
+ /**
2379
+ * Number of bytes processed by the tool.
2380
+ */
2381
+ bytesProcessed?: number
2382
+ /**
2383
+ * Tool execution cost reported by the MCP server.
2384
+ */
2385
+ cost?: number
2386
+ }
2387
+ /**
2388
+ * Mail module name used for display.
2389
+ */
2390
+ moduleName?: string
2391
+ /**
2392
+ * Structured tool output when provided by the Mail service.
2393
+ */
2394
+ structuredContent?: unknown
2395
+ /**
2396
+ * Bounded HTTP-like Mail service error code.
2397
+ */
2398
+ toolErrorCode?: number
2399
+ }
2400
+
2401
+ /**
2402
+ * Script input for the "List Outlook Categories" effect (`mail.listOutlookCategories`),
2403
+ * derived from its Tool Core definition's call_function input projection.
2404
+ *
2405
+ * List all categories in the user's Outlook master category list
2406
+ */
2407
+ export type ListOutlookCategoriesScriptInput = {
2408
+ /**
2409
+ * The Outlook email address
2410
+ */
2411
+ userEmailAddress: string
2412
+ }
2413
+
2414
+ /**
2415
+ * Canonical Tool Core output for the "List Outlook Categories" effect (`mail.listOutlookCategories`).
2416
+ * This is the definition's output schema; the effect's script surface may
2417
+ * re-encode it before returning.
2418
+ */
2419
+ export type ListOutlookCategoriesScriptOutput = {
2420
+ /**
2421
+ * Tool output content.
2422
+ */
2423
+ content: unknown
2424
+ /**
2425
+ * Name of the Mail tool that ran.
2426
+ */
2427
+ name: string
2428
+ /**
2429
+ * Whether the Mail service reported a tool error.
2430
+ */
2431
+ isError?: boolean
2432
+ /**
2433
+ * Execution metadata reported by the MCP server.
2434
+ */
2435
+ metadata?: {
2436
+ /**
2437
+ * Tool execution time in milliseconds.
2438
+ */
2439
+ executionTimeMs?: number
2440
+ /**
2441
+ * Number of bytes processed by the tool.
2442
+ */
2443
+ bytesProcessed?: number
2444
+ /**
2445
+ * Tool execution cost reported by the MCP server.
2446
+ */
2447
+ cost?: number
2448
+ }
2449
+ /**
2450
+ * Mail module name used for display.
2451
+ */
2452
+ moduleName?: string
2453
+ /**
2454
+ * Structured tool output when provided by the Mail service.
2455
+ */
2456
+ structuredContent?: unknown
2457
+ /**
2458
+ * Bounded HTTP-like Mail service error code.
2459
+ */
2460
+ toolErrorCode?: number
2461
+ }
2462
+
2463
+ /**
2464
+ * Script input for the "List Outlook Folders" effect (`mail.listOutlookFolders`),
2465
+ * derived from its Tool Core definition's call_function input projection.
2466
+ *
2467
+ * List all mail folders in the user's Outlook mailbox
2468
+ */
2469
+ export type ListOutlookFoldersScriptInput = {
2470
+ /**
2471
+ * The email address of the Outlook mailbox
2472
+ */
2473
+ userEmailAddress: string
2474
+ }
2475
+
2476
+ /**
2477
+ * Canonical Tool Core output for the "List Outlook Folders" effect (`mail.listOutlookFolders`).
2478
+ * This is the definition's output schema; the effect's script surface may
2479
+ * re-encode it before returning.
2480
+ */
2481
+ export type ListOutlookFoldersScriptOutput = {
2482
+ /**
2483
+ * Tool output content.
2484
+ */
2485
+ content: unknown
2486
+ /**
2487
+ * Name of the Mail tool that ran.
2488
+ */
2489
+ name: string
2490
+ /**
2491
+ * Whether the Mail service reported a tool error.
2492
+ */
2493
+ isError?: boolean
2494
+ /**
2495
+ * Execution metadata reported by the MCP server.
2496
+ */
2497
+ metadata?: {
2498
+ /**
2499
+ * Tool execution time in milliseconds.
2500
+ */
2501
+ executionTimeMs?: number
2502
+ /**
2503
+ * Number of bytes processed by the tool.
2504
+ */
2505
+ bytesProcessed?: number
2506
+ /**
2507
+ * Tool execution cost reported by the MCP server.
2508
+ */
2509
+ cost?: number
2510
+ }
2511
+ /**
2512
+ * Mail module name used for display.
2513
+ */
2514
+ moduleName?: string
2515
+ /**
2516
+ * Structured tool output when provided by the Mail service.
2517
+ */
2518
+ structuredContent?: unknown
2519
+ /**
2520
+ * Bounded HTTP-like Mail service error code.
2521
+ */
2522
+ toolErrorCode?: number
2523
+ }
2524
+
2525
+ /**
2526
+ * Script input for the "List Outlook Rules" effect (`mail.listOutlookRules`),
2527
+ * derived from its Tool Core definition's call_function input projection.
2528
+ *
2529
+ * List all inbox rules configured in the user's Outlook mailbox
2530
+ */
2531
+ export type ListOutlookRulesScriptInput = {
2532
+ /**
2533
+ * The Outlook email address
2534
+ */
2535
+ userEmailAddress: string
2536
+ }
2537
+
2538
+ /**
2539
+ * Canonical Tool Core output for the "List Outlook Rules" effect (`mail.listOutlookRules`).
2540
+ * This is the definition's output schema; the effect's script surface may
2541
+ * re-encode it before returning.
2542
+ */
2543
+ export type ListOutlookRulesScriptOutput = {
2544
+ /**
2545
+ * Tool output content.
2546
+ */
2547
+ content: unknown
2548
+ /**
2549
+ * Name of the Mail tool that ran.
2550
+ */
2551
+ name: string
2552
+ /**
2553
+ * Whether the Mail service reported a tool error.
2554
+ */
2555
+ isError?: boolean
2556
+ /**
2557
+ * Execution metadata reported by the MCP server.
2558
+ */
2559
+ metadata?: {
2560
+ /**
2561
+ * Tool execution time in milliseconds.
2562
+ */
2563
+ executionTimeMs?: number
2564
+ /**
2565
+ * Number of bytes processed by the tool.
2566
+ */
2567
+ bytesProcessed?: number
2568
+ /**
2569
+ * Tool execution cost reported by the MCP server.
2570
+ */
2571
+ cost?: number
2572
+ }
2573
+ /**
2574
+ * Mail module name used for display.
2575
+ */
2576
+ moduleName?: string
2577
+ /**
2578
+ * Structured tool output when provided by the Mail service.
2579
+ */
2580
+ structuredContent?: unknown
2581
+ /**
2582
+ * Bounded HTTP-like Mail service error code.
2583
+ */
2584
+ toolErrorCode?: number
2585
+ }
2586
+
2587
+ /**
2588
+ * Script input for the "List Status Properties" effect (`mail.listStatusProperties`),
2589
+ * derived from its Tool Core definition's call_function input projection.
2590
+ *
2591
+ * List available status properties (columns) for emails
2592
+ */
2593
+ export type ListStatusPropertiesScriptInput = {
2594
+ /**
2595
+ * The email address of the mailbox
2596
+ */
2597
+ userEmailAddress: string
2598
+ }
2599
+
2600
+ /**
2601
+ * Canonical Tool Core output for the "List Status Properties" effect (`mail.listStatusProperties`).
2602
+ * This is the definition's output schema; the effect's script surface may
2603
+ * re-encode it before returning.
2604
+ */
2605
+ export type ListStatusPropertiesScriptOutput = {
2606
+ /**
2607
+ * Tool output content.
2608
+ */
2609
+ content: unknown
2610
+ /**
2611
+ * Name of the Mail tool that ran.
2612
+ */
2613
+ name: string
2614
+ /**
2615
+ * Whether the Mail service reported a tool error.
2616
+ */
2617
+ isError?: boolean
2618
+ /**
2619
+ * Execution metadata reported by the MCP server.
2620
+ */
2621
+ metadata?: {
2622
+ /**
2623
+ * Tool execution time in milliseconds.
2624
+ */
2625
+ executionTimeMs?: number
2626
+ /**
2627
+ * Number of bytes processed by the tool.
2628
+ */
2629
+ bytesProcessed?: number
2630
+ /**
2631
+ * Tool execution cost reported by the MCP server.
2632
+ */
2633
+ cost?: number
2634
+ }
2635
+ /**
2636
+ * Mail module name used for display.
2637
+ */
2638
+ moduleName?: string
2639
+ /**
2640
+ * Structured tool output when provided by the Mail service.
2641
+ */
2642
+ structuredContent?: unknown
2643
+ /**
2644
+ * Bounded HTTP-like Mail service error code.
2645
+ */
2646
+ toolErrorCode?: number
2647
+ }
2648
+
2649
+ /**
2650
+ * Script input for the "Mark as Spam" effect (`mail.markThreadSpam`),
2651
+ * derived from its Tool Core definition's call_function input projection.
2652
+ *
2653
+ * Mark one or more email threads as spam
2654
+ */
2655
+ export type MarkThreadSpamScriptInput = {
2656
+ /**
2657
+ * The email address of the mailbox
2658
+ */
2659
+ userEmailAddress: string
2660
+ /**
2661
+ * Array of thread IDs to mark as spam
2662
+ */
2663
+ threadIds: Array<string>
2664
+ }
2665
+
2666
+ /**
2667
+ * Canonical Tool Core output for the "Mark as Spam" effect (`mail.markThreadSpam`).
2668
+ * This is the definition's output schema; the effect's script surface may
2669
+ * re-encode it before returning.
2670
+ */
2671
+ export type MarkThreadSpamScriptOutput = {
2672
+ /**
2673
+ * Tool output content.
2674
+ */
2675
+ content: unknown
2676
+ /**
2677
+ * Name of the Mail tool that ran.
2678
+ */
2679
+ name: string
2680
+ /**
2681
+ * Whether the Mail service reported a tool error.
2682
+ */
2683
+ isError?: boolean
2684
+ /**
2685
+ * Execution metadata reported by the MCP server.
2686
+ */
2687
+ metadata?: {
2688
+ /**
2689
+ * Tool execution time in milliseconds.
2690
+ */
2691
+ executionTimeMs?: number
2692
+ /**
2693
+ * Number of bytes processed by the tool.
2694
+ */
2695
+ bytesProcessed?: number
2696
+ /**
2697
+ * Tool execution cost reported by the MCP server.
2698
+ */
2699
+ cost?: number
2700
+ }
2701
+ /**
2702
+ * Mail module name used for display.
2703
+ */
2704
+ moduleName?: string
2705
+ /**
2706
+ * Structured tool output when provided by the Mail service.
2707
+ */
2708
+ structuredContent?: unknown
2709
+ /**
2710
+ * Bounded HTTP-like Mail service error code.
2711
+ */
2712
+ toolErrorCode?: number
2713
+ }
2714
+
2715
+ /**
2716
+ * Script input for the "Move to Inbox" effect (`mail.moveThreadToInbox`),
2717
+ * derived from its Tool Core definition's call_function input projection.
2718
+ *
2719
+ * Move threads that aren't currently in the inbox back to the inbox, i.e. threads in Archive, Trash or Spam. Note that finding threads in Spam or Trash requires the use of relevant search parameters: Gmail, pass includeSpamTrash to searchEmails; Outlook, search searchOutlookEmails with filters.folder: "deleted" or "junk".
2720
+ */
2721
+ export type MoveThreadToInboxScriptInput = {
2722
+ /**
2723
+ * The email address of the mailbox
2724
+ */
2725
+ userEmailAddress: string
2726
+ /**
2727
+ * Array of thread IDs to move to inbox
2728
+ */
2729
+ threadIds: Array<string>
2730
+ }
2731
+
2732
+ /**
2733
+ * Canonical Tool Core output for the "Move to Inbox" effect (`mail.moveThreadToInbox`).
2734
+ * This is the definition's output schema; the effect's script surface may
2735
+ * re-encode it before returning.
2736
+ */
2737
+ export type MoveThreadToInboxScriptOutput = {
2738
+ /**
2739
+ * Tool output content.
2740
+ */
2741
+ content: unknown
2742
+ /**
2743
+ * Name of the Mail tool that ran.
2744
+ */
2745
+ name: string
2746
+ /**
2747
+ * Whether the Mail service reported a tool error.
2748
+ */
2749
+ isError?: boolean
2750
+ /**
2751
+ * Execution metadata reported by the MCP server.
2752
+ */
2753
+ metadata?: {
2754
+ /**
2755
+ * Tool execution time in milliseconds.
2756
+ */
2757
+ executionTimeMs?: number
2758
+ /**
2759
+ * Number of bytes processed by the tool.
2760
+ */
2761
+ bytesProcessed?: number
2762
+ /**
2763
+ * Tool execution cost reported by the MCP server.
2764
+ */
2765
+ cost?: number
2766
+ }
2767
+ /**
2768
+ * Mail module name used for display.
2769
+ */
2770
+ moduleName?: string
2771
+ /**
2772
+ * Structured tool output when provided by the Mail service.
2773
+ */
2774
+ structuredContent?: unknown
2775
+ /**
2776
+ * Bounded HTTP-like Mail service error code.
2777
+ */
2778
+ toolErrorCode?: number
2779
+ }
2780
+
2781
+ /**
2782
+ * Script input for the "Move to Outlook Folder" effect (`mail.moveToOutlookFolder`),
2783
+ * derived from its Tool Core definition's call_function input projection.
2784
+ *
2785
+ * Move one or more email threads to a specific folder in the user's Outlook mailbox
2786
+ */
2787
+ export type MoveToOutlookFolderScriptInput = {
2788
+ /**
2789
+ * The email address of the Outlook mailbox
2790
+ */
2791
+ userEmailAddress: string
2792
+ /**
2793
+ * Array of thread IDs to move
2794
+ */
2795
+ threadIds: Array<string>
2796
+ /**
2797
+ * The ID of the destination folder, or a well-known folder name: inbox, archive, deleteditems, junkemail, sentitems, drafts
2798
+ */
2799
+ destinationFolderId: string
2800
+ }
2801
+
2802
+ /**
2803
+ * Canonical Tool Core output for the "Move to Outlook Folder" effect (`mail.moveToOutlookFolder`).
2804
+ * This is the definition's output schema; the effect's script surface may
2805
+ * re-encode it before returning.
2806
+ */
2807
+ export type MoveToOutlookFolderScriptOutput = {
2808
+ /**
2809
+ * Tool output content.
2810
+ */
2811
+ content: unknown
2812
+ /**
2813
+ * Name of the Mail tool that ran.
2814
+ */
2815
+ name: string
2816
+ /**
2817
+ * Whether the Mail service reported a tool error.
2818
+ */
2819
+ isError?: boolean
2820
+ /**
2821
+ * Execution metadata reported by the MCP server.
2822
+ */
2823
+ metadata?: {
2824
+ /**
2825
+ * Tool execution time in milliseconds.
2826
+ */
2827
+ executionTimeMs?: number
2828
+ /**
2829
+ * Number of bytes processed by the tool.
2830
+ */
2831
+ bytesProcessed?: number
2832
+ /**
2833
+ * Tool execution cost reported by the MCP server.
2834
+ */
2835
+ cost?: number
2836
+ }
2837
+ /**
2838
+ * Mail module name used for display.
2839
+ */
2840
+ moduleName?: string
2841
+ /**
2842
+ * Structured tool output when provided by the Mail service.
2843
+ */
2844
+ structuredContent?: unknown
2845
+ /**
2846
+ * Bounded HTTP-like Mail service error code.
2847
+ */
2848
+ toolErrorCode?: number
2849
+ }
2850
+
2851
+ /**
2852
+ * Script input for the "Read Attachment" effect (`mail.readAttachment`),
2853
+ * derived from its Tool Core definition's call_function input projection.
2854
+ *
2855
+ * Fetch the content of an email attachment by its attachment ID. Use after view_thread_content to read a specific attachment. Images are returned visually. Text files are returned as readable text. PDFs are uploaded as thread attachments you can read. Other binary files (docx, xlsx, zip, etc.) cannot be read directly.
2856
+ */
2857
+ export type ReadAttachmentScriptInput = {
2858
+ /**
2859
+ * The email address of the mailbox
2860
+ */
2861
+ userEmailAddress: string
2862
+ /**
2863
+ * Gmail message ID containing the attachment (from view_thread_content)
2864
+ */
2865
+ messageId: string
2866
+ /**
2867
+ * Attachment ID (from the attachments array in view_thread_content)
2868
+ */
2869
+ attachmentId: string
2870
+ }
2871
+
2872
+ /**
2873
+ * Canonical Tool Core output for the "Read Attachment" effect (`mail.readAttachment`).
2874
+ * This is the definition's output schema; the effect's script surface may
2875
+ * re-encode it before returning.
2876
+ */
2877
+ export type ReadAttachmentScriptOutput = {
2878
+ /**
2879
+ * Tool output content.
2880
+ */
2881
+ content: unknown
2882
+ /**
2883
+ * Name of the Mail tool that ran.
2884
+ */
2885
+ name: string
2886
+ /**
2887
+ * Whether the Mail service reported a tool error.
2888
+ */
2889
+ isError?: boolean
2890
+ /**
2891
+ * Execution metadata reported by the MCP server.
2892
+ */
2893
+ metadata?: {
2894
+ /**
2895
+ * Tool execution time in milliseconds.
2896
+ */
2897
+ executionTimeMs?: number
2898
+ /**
2899
+ * Number of bytes processed by the tool.
2900
+ */
2901
+ bytesProcessed?: number
2902
+ /**
2903
+ * Tool execution cost reported by the MCP server.
2904
+ */
2905
+ cost?: number
2906
+ }
2907
+ /**
2908
+ * Mail module name used for display.
2909
+ */
2910
+ moduleName?: string
2911
+ /**
2912
+ * Structured tool output when provided by the Mail service.
2913
+ */
2914
+ structuredContent?: unknown
2915
+ /**
2916
+ * Bounded HTTP-like Mail service error code.
2917
+ */
2918
+ toolErrorCode?: number
2919
+ }
2920
+
2921
+ /**
2922
+ * Script input for the "Remove Outlook Categories" effect (`mail.removeOutlookCategories`),
2923
+ * derived from its Tool Core definition's call_function input projection.
2924
+ *
2925
+ * Remove categories from all messages in the specified Outlook conversations.
2926
+ */
2927
+ export type RemoveOutlookCategoriesScriptInput = {
2928
+ /**
2929
+ * The Outlook email address
2930
+ */
2931
+ userEmailAddress: string
2932
+ /**
2933
+ * Outlook conversation IDs (from search_emails threadId)
2934
+ */
2935
+ conversationIDs: Array<string>
2936
+ /**
2937
+ * Category display names to remove (case-sensitive)
2938
+ */
2939
+ categoryNames: Array<string>
2940
+ }
2941
+
2942
+ /**
2943
+ * Canonical Tool Core output for the "Remove Outlook Categories" effect (`mail.removeOutlookCategories`).
2944
+ * This is the definition's output schema; the effect's script surface may
2945
+ * re-encode it before returning.
2946
+ */
2947
+ export type RemoveOutlookCategoriesScriptOutput = {
2948
+ /**
2949
+ * Tool output content.
2950
+ */
2951
+ content: unknown
2952
+ /**
2953
+ * Name of the Mail tool that ran.
2954
+ */
2955
+ name: string
2956
+ /**
2957
+ * Whether the Mail service reported a tool error.
2958
+ */
2959
+ isError?: boolean
2960
+ /**
2961
+ * Execution metadata reported by the MCP server.
2962
+ */
2963
+ metadata?: {
2964
+ /**
2965
+ * Tool execution time in milliseconds.
2966
+ */
2967
+ executionTimeMs?: number
2968
+ /**
2969
+ * Number of bytes processed by the tool.
2970
+ */
2971
+ bytesProcessed?: number
2972
+ /**
2973
+ * Tool execution cost reported by the MCP server.
2974
+ */
2975
+ cost?: number
2976
+ }
2977
+ /**
2978
+ * Mail module name used for display.
2979
+ */
2980
+ moduleName?: string
2981
+ /**
2982
+ * Structured tool output when provided by the Mail service.
2983
+ */
2984
+ structuredContent?: unknown
2985
+ /**
2986
+ * Bounded HTTP-like Mail service error code.
2987
+ */
2988
+ toolErrorCode?: number
2989
+ }
2990
+
2991
+ /**
2992
+ * Script input for the "Remove Sender from Notion Mail Notification Allowlist" effect (`mail.removeSenderNotificationPreferences`),
2993
+ * derived from its Tool Core definition's call_function input projection.
2994
+ *
2995
+ * Remove sender email addresses from the Notion Mail notification allowlist. Once removed, notifications for their emails will follow the standard view-level settings. This tool is specific to Notion Mail notification settings only. Takes effect immediately.
2996
+ */
2997
+ export type RemoveSenderNotificationPreferencesScriptInput = {
2998
+ /**
2999
+ * The Notion Mail email address of the account. Must be an account connected to Notion Mail.
3000
+ */
3001
+ userEmailAddress: string
3002
+ /**
3003
+ * Sender email addresses to remove from the notification allowlist. Required unless removeAll is true.
3004
+ */
3005
+ senderAddresses?: Array<string>
3006
+ /**
3007
+ * Set to true to clear the entire notification allowlist. Either senderAddresses or removeAll must be provided.
3008
+ */
3009
+ removeAll?: boolean
3010
+ }
3011
+
3012
+ /**
3013
+ * Canonical Tool Core output for the "Remove Sender from Notion Mail Notification Allowlist" effect (`mail.removeSenderNotificationPreferences`).
3014
+ * This is the definition's output schema; the effect's script surface may
3015
+ * re-encode it before returning.
3016
+ */
3017
+ export type RemoveSenderNotificationPreferencesScriptOutput = {
3018
+ /**
3019
+ * Tool output content.
3020
+ */
3021
+ content: unknown
3022
+ /**
3023
+ * Name of the Mail tool that ran.
3024
+ */
3025
+ name: string
3026
+ /**
3027
+ * Whether the Mail service reported a tool error.
3028
+ */
3029
+ isError?: boolean
3030
+ /**
3031
+ * Execution metadata reported by the MCP server.
3032
+ */
3033
+ metadata?: {
3034
+ /**
3035
+ * Tool execution time in milliseconds.
3036
+ */
3037
+ executionTimeMs?: number
3038
+ /**
3039
+ * Number of bytes processed by the tool.
3040
+ */
3041
+ bytesProcessed?: number
3042
+ /**
3043
+ * Tool execution cost reported by the MCP server.
3044
+ */
3045
+ cost?: number
3046
+ }
3047
+ /**
3048
+ * Mail module name used for display.
3049
+ */
3050
+ moduleName?: string
3051
+ /**
3052
+ * Structured tool output when provided by the Mail service.
3053
+ */
3054
+ structuredContent?: unknown
3055
+ /**
3056
+ * Bounded HTTP-like Mail service error code.
3057
+ */
3058
+ toolErrorCode?: number
3059
+ }
3060
+
3061
+ /**
3062
+ * Script input for the "Remove Labels" effect (`mail.removeUserLabels`),
3063
+ * derived from its Tool Core definition's call_function input projection.
3064
+ *
3065
+ * Remove user-created labels from email threads
3066
+ */
3067
+ export type RemoveUserLabelsScriptInput = {
3068
+ /**
3069
+ * The email address of the mailbox
3070
+ */
3071
+ userEmailAddress: string
3072
+ /**
3073
+ * Array of thread IDs to unlabel
3074
+ */
3075
+ threadIds: Array<string>
3076
+ /**
3077
+ * Names of labels to remove
3078
+ */
3079
+ labelNames: Array<string>
3080
+ }
3081
+
3082
+ /**
3083
+ * Canonical Tool Core output for the "Remove Labels" effect (`mail.removeUserLabels`).
3084
+ * This is the definition's output schema; the effect's script surface may
3085
+ * re-encode it before returning.
3086
+ */
3087
+ export type RemoveUserLabelsScriptOutput = {
3088
+ /**
3089
+ * Tool output content.
3090
+ */
3091
+ content: unknown
3092
+ /**
3093
+ * Name of the Mail tool that ran.
3094
+ */
3095
+ name: string
3096
+ /**
3097
+ * Whether the Mail service reported a tool error.
3098
+ */
3099
+ isError?: boolean
3100
+ /**
3101
+ * Execution metadata reported by the MCP server.
3102
+ */
3103
+ metadata?: {
3104
+ /**
3105
+ * Tool execution time in milliseconds.
3106
+ */
3107
+ executionTimeMs?: number
3108
+ /**
3109
+ * Number of bytes processed by the tool.
3110
+ */
3111
+ bytesProcessed?: number
3112
+ /**
3113
+ * Tool execution cost reported by the MCP server.
3114
+ */
3115
+ cost?: number
3116
+ }
3117
+ /**
3118
+ * Mail module name used for display.
3119
+ */
3120
+ moduleName?: string
3121
+ /**
3122
+ * Structured tool output when provided by the Mail service.
3123
+ */
3124
+ structuredContent?: unknown
3125
+ /**
3126
+ * Bounded HTTP-like Mail service error code.
3127
+ */
3128
+ toolErrorCode?: number
3129
+ }
3130
+
3131
+ /**
3132
+ * Script input for the "Search Emails" effect (`mail.searchEmails`),
3133
+ * derived from its Tool Core definition's call_function input projection.
3134
+ *
3135
+ * Search for emails in the user's mailbox using Gmail query syntax.
3136
+ */
3137
+ export type SearchEmailsScriptInput = {
3138
+ /**
3139
+ * The email address of the mailbox to search in
3140
+ */
3141
+ userEmailAddress: string
3142
+ /**
3143
+ * Search query string using Gmail-style search operators (e.g. from:, is:unread, newer_than:1d, after:/before:, subject:). For topic or digest requests, prefer recency (newer_than:1d) and/or sender (from:) filters over subject: keyword filtering: subjects don't reliably contain the topic word, so don't rely on subject alone, and when filtering by subject/body cover synonyms rather than over-filtering one term. For Gmail date bounds, after:/before: take a plain date with no time component (slashes or dashes both work) — GOOD: before:2026/05/08 or before:2026-05-08; BAD: before:2026-05-08T16:00 (a time component is not valid Gmail syntax and silently returns nothing); prefer newer_than:Nd for recency.
3144
+ */
3145
+ query: string
3146
+ /**
3147
+ * Number of results to return (default: 20, max: 500)
3148
+ */
3149
+ count?: number
3150
+ /**
3151
+ * Pagination token from previous search results
3152
+ */
3153
+ pageToken?: string
3154
+ /**
3155
+ * Whether to include spam and trash in results
3156
+ */
3157
+ includeSpamTrash?: boolean
3158
+ }
3159
+
3160
+ /**
3161
+ * Canonical Tool Core output for the "Search Emails" effect (`mail.searchEmails`).
3162
+ * This is the definition's output schema; the effect's script surface may
3163
+ * re-encode it before returning.
3164
+ */
3165
+ export type SearchEmailsScriptOutput = {
3166
+ /**
3167
+ * Tool output content.
3168
+ */
3169
+ content: unknown
3170
+ /**
3171
+ * Name of the Mail tool that ran.
3172
+ */
3173
+ name: string
3174
+ /**
3175
+ * Whether the Mail service reported a tool error.
3176
+ */
3177
+ isError?: boolean
3178
+ /**
3179
+ * Execution metadata reported by the MCP server.
3180
+ */
3181
+ metadata?: {
3182
+ /**
3183
+ * Tool execution time in milliseconds.
3184
+ */
3185
+ executionTimeMs?: number
3186
+ /**
3187
+ * Number of bytes processed by the tool.
3188
+ */
3189
+ bytesProcessed?: number
3190
+ /**
3191
+ * Tool execution cost reported by the MCP server.
3192
+ */
3193
+ cost?: number
3194
+ }
3195
+ /**
3196
+ * Mail module name used for display.
3197
+ */
3198
+ moduleName?: string
3199
+ /**
3200
+ * Structured tool output when provided by the Mail service.
3201
+ */
3202
+ structuredContent?: unknown
3203
+ /**
3204
+ * Bounded HTTP-like Mail service error code.
3205
+ */
3206
+ toolErrorCode?: number
3207
+ }
3208
+
3209
+ /**
3210
+ * Script input for the "Search Outlook Emails" effect (`mail.searchOutlookEmails`),
3211
+ * derived from its Tool Core definition's call_function input projection.
3212
+ *
3213
+ * Search an Outlook mailbox using structured filters and/or keyword queries. Use this instead of search_emails for Outlook accounts. For multi-sender (OR), negation (NOT), or complex boolean queries that structured filters cannot express, use query with KQL operators.
3214
+ */
3215
+ export type SearchOutlookEmailsScriptInput = {
3216
+ /**
3217
+ * The email address of the Outlook mailbox to search
3218
+ */
3219
+ userEmailAddress: string
3220
+ /**
3221
+ * KQL keyword query string. Use for keyword/semantic search and complex boolean logic (OR, NOT, parentheses). Use filters for metadata constraints. When combining with filters, the backend merges them optimally.
3222
+ */
3223
+ query?: string
3224
+ /**
3225
+ * Number of results to return (default: 20, max: 500)
3226
+ */
3227
+ count?: number
3228
+ /**
3229
+ * Pagination token from previous search results
3230
+ */
3231
+ pageToken?: string
3232
+ /**
3233
+ * Structured filters for metadata-based search. The backend picks the optimal API strategy ($search, $filter, or both). All filters are AND-combined. Array fields use OR within the array.
3234
+ */
3235
+ filters?: {
3236
+ /**
3237
+ * Sender email addresses (OR within array). E.g., ['alice@co.com', 'bob@co.com'] matches emails from either sender. If only the display name is known, use query with 'from:Name' instead.
3238
+ */
3239
+ fromAddresses?: Array<string>
3240
+ /**
3241
+ * Recipient email addresses (OR within array). Note: forces full-text search mode (OData cannot filter recipients).
3242
+ */
3243
+ toAddresses?: Array<string>
3244
+ /**
3245
+ * Start of date range in ISO 8601 format (e.g., '2026-01-01' or '2026-01-01T00:00:00Z')
3246
+ */
3247
+ dateFrom?: string
3248
+ /**
3249
+ * End of date range in ISO 8601 format. Inclusive — '2026-03-23' includes the full day (through 23:59:59Z).
3250
+ */
3251
+ dateTo?: string
3252
+ /**
3253
+ * Filter for emails with/without attachments
3254
+ */
3255
+ hasAttachments?: boolean
3256
+ /**
3257
+ * Filter by read status. ONLY available via filters (not in KQL).
3258
+ */
3259
+ isRead?: boolean
3260
+ /**
3261
+ * Filter by importance level
3262
+ */
3263
+ importance?: "high" | "normal" | "low"
3264
+ /**
3265
+ * Scope search to a specific folder. Use well-known names (inbox, sent, drafts, archive, deleted, junk) or a folder ID from listOutlookFolders for user-created folders. Omit to search all folders.
3266
+ */
3267
+ folder?: string
3268
+ /**
3269
+ * Filter for draft messages. Scopes to the drafts folder. ONLY available via filters (not in KQL).
3270
+ */
3271
+ isDraft?: boolean
3272
+ /**
3273
+ * Outlook user-defined category tags (OR within array). E.g., ['Project X', 'Urgent'] matches emails with either category. ONLY available via filters (not in KQL).
3274
+ */
3275
+ categories?: Array<string>
3276
+ }
3277
+ }
3278
+
3279
+ /**
3280
+ * Canonical Tool Core output for the "Search Outlook Emails" effect (`mail.searchOutlookEmails`).
3281
+ * This is the definition's output schema; the effect's script surface may
3282
+ * re-encode it before returning.
3283
+ */
3284
+ export type SearchOutlookEmailsScriptOutput = {
3285
+ /**
3286
+ * Tool output content.
3287
+ */
3288
+ content: unknown
3289
+ /**
3290
+ * Name of the Mail tool that ran.
3291
+ */
3292
+ name: string
3293
+ /**
3294
+ * Whether the Mail service reported a tool error.
3295
+ */
3296
+ isError?: boolean
3297
+ /**
3298
+ * Execution metadata reported by the MCP server.
3299
+ */
3300
+ metadata?: {
3301
+ /**
3302
+ * Tool execution time in milliseconds.
3303
+ */
3304
+ executionTimeMs?: number
3305
+ /**
3306
+ * Number of bytes processed by the tool.
3307
+ */
3308
+ bytesProcessed?: number
3309
+ /**
3310
+ * Tool execution cost reported by the MCP server.
3311
+ */
3312
+ cost?: number
3313
+ }
3314
+ /**
3315
+ * Mail module name used for display.
3316
+ */
3317
+ moduleName?: string
3318
+ /**
3319
+ * Structured tool output when provided by the Mail service.
3320
+ */
3321
+ structuredContent?: unknown
3322
+ /**
3323
+ * Bounded HTTP-like Mail service error code.
3324
+ */
3325
+ toolErrorCode?: number
3326
+ }
3327
+
3328
+ /**
3329
+ * Script input for the "Send Draft" effect (`mail.sendExistingDraft`),
3330
+ * derived from its Tool Core definition's call_function input projection.
3331
+ *
3332
+ * Send an existing draft email (often from the return value of a create-or-update draft tool, but may also be explicitly provided by the user or a data source within the workspace).
3333
+ */
3334
+ export type SendExistingDraftScriptInput = {
3335
+ /**
3336
+ * The user's email address
3337
+ */
3338
+ userEmailAddress: string
3339
+ /**
3340
+ * Draft identifier to send. Usually gmailDraft.draftID from create_or_update_draft_all_clients or draftId from create_or_update_outlook_draft; may also be an existing provider draft ID the user explicitly gave you.
3341
+ */
3342
+ draftId: string
3343
+ }
3344
+
3345
+ /**
3346
+ * Canonical Tool Core output for the "Send Draft" effect (`mail.sendExistingDraft`).
3347
+ * This is the definition's output schema; the effect's script surface may
3348
+ * re-encode it before returning.
3349
+ */
3350
+ export type SendExistingDraftScriptOutput = {
3351
+ /**
3352
+ * Tool output content.
3353
+ */
3354
+ content: unknown
3355
+ /**
3356
+ * Name of the Mail tool that ran.
3357
+ */
3358
+ name: string
3359
+ /**
3360
+ * Whether the Mail service reported a tool error.
3361
+ */
3362
+ isError?: boolean
3363
+ /**
3364
+ * Execution metadata reported by the MCP server.
3365
+ */
3366
+ metadata?: {
3367
+ /**
3368
+ * Tool execution time in milliseconds.
3369
+ */
3370
+ executionTimeMs?: number
3371
+ /**
3372
+ * Number of bytes processed by the tool.
3373
+ */
3374
+ bytesProcessed?: number
3375
+ /**
3376
+ * Tool execution cost reported by the MCP server.
3377
+ */
3378
+ cost?: number
3379
+ }
3380
+ /**
3381
+ * Mail module name used for display.
3382
+ */
3383
+ moduleName?: string
3384
+ /**
3385
+ * Structured tool output when provided by the Mail service.
3386
+ */
3387
+ structuredContent?: unknown
3388
+ /**
3389
+ * Bounded HTTP-like Mail service error code.
3390
+ */
3391
+ toolErrorCode?: number
3392
+ }
3393
+
3394
+ /**
3395
+ * Script input for the "Send Email" effect (`mail.sendNewEmail`),
3396
+ * derived from its Tool Core definition's call_function input projection.
3397
+ *
3398
+ * Send a new email immediately. Supports both standalone emails and direct replies to threads.
3399
+ */
3400
+ export type SendNewEmailScriptInput = {
3401
+ /**
3402
+ * The user's email address
3403
+ */
3404
+ userEmailAddress: string
3405
+ /**
3406
+ * Sender address owned by the user
3407
+ */
3408
+ from: {
3409
+ address: string
3410
+ name?: string
3411
+ }
3412
+ /**
3413
+ * Primary recipients. Required for all emails.
3414
+ */
3415
+ to: Array<{
3416
+ address: string
3417
+ name?: string
3418
+ }>
3419
+ /**
3420
+ * CC recipients
3421
+ */
3422
+ cc?: Array<{
3423
+ address: string
3424
+ name?: string
3425
+ }>
3426
+ /**
3427
+ * BCC recipients
3428
+ */
3429
+ bcc?: Array<{
3430
+ address: string
3431
+ name?: string
3432
+ }>
3433
+ /**
3434
+ * Subject line. Required for new threads, optional for replies.
3435
+ */
3436
+ subject?: string
3437
+ /**
3438
+ * Plain text email body
3439
+ */
3440
+ text?: string
3441
+ /**
3442
+ * HTML email body
3443
+ */
3444
+ html?: string
3445
+ /**
3446
+ * Thread ID for replies
3447
+ */
3448
+ parentThreadId?: string
3449
+ /**
3450
+ * Specific message ID to reply to. Defaults to latest message.
3451
+ */
3452
+ parentMessageId?: string
3453
+ }
3454
+
3455
+ /**
3456
+ * Canonical Tool Core output for the "Send Email" effect (`mail.sendNewEmail`).
3457
+ * This is the definition's output schema; the effect's script surface may
3458
+ * re-encode it before returning.
3459
+ */
3460
+ export type SendNewEmailScriptOutput = {
3461
+ /**
3462
+ * Tool output content.
3463
+ */
3464
+ content: unknown
3465
+ /**
3466
+ * Name of the Mail tool that ran.
3467
+ */
3468
+ name: string
3469
+ /**
3470
+ * Whether the Mail service reported a tool error.
3471
+ */
3472
+ isError?: boolean
3473
+ /**
3474
+ * Execution metadata reported by the MCP server.
3475
+ */
3476
+ metadata?: {
3477
+ /**
3478
+ * Tool execution time in milliseconds.
3479
+ */
3480
+ executionTimeMs?: number
3481
+ /**
3482
+ * Number of bytes processed by the tool.
3483
+ */
3484
+ bytesProcessed?: number
3485
+ /**
3486
+ * Tool execution cost reported by the MCP server.
3487
+ */
3488
+ cost?: number
3489
+ }
3490
+ /**
3491
+ * Mail module name used for display.
3492
+ */
3493
+ moduleName?: string
3494
+ /**
3495
+ * Structured tool output when provided by the Mail service.
3496
+ */
3497
+ structuredContent?: unknown
3498
+ /**
3499
+ * Bounded HTTP-like Mail service error code.
3500
+ */
3501
+ toolErrorCode?: number
3502
+ }
3503
+
3504
+ /**
3505
+ * Script input for the "Set Notion Mail Notification Preference" effect (`mail.setAccountNotificationPreference`),
3506
+ * derived from its Tool Core definition's call_function input projection.
3507
+ *
3508
+ * Enable or disable Notion Mail push notifications at the account level for a specific email account. This is an account-level setting that applies to all notifications for the account across all channels (iOS, Android, web push, desktop). This tool is specific to Notion Mail notification settings only — it does not modify notification settings for Gmail, Outlook, or any other email provider. Takes effect immediately.
3509
+ */
3510
+ export type SetAccountNotificationPreferenceScriptInput = {
3511
+ /**
3512
+ * The Notion Mail email address of the account to update notification preferences for. Must be an account connected to Notion Mail.
3513
+ */
3514
+ userEmailAddress: string
3515
+ /**
3516
+ * Whether to enable (true) or disable (false) Notion Mail push notifications for this account
3517
+ */
3518
+ enabled: boolean
3519
+ }
3520
+
3521
+ /**
3522
+ * Canonical Tool Core output for the "Set Notion Mail Notification Preference" effect (`mail.setAccountNotificationPreference`).
3523
+ * This is the definition's output schema; the effect's script surface may
3524
+ * re-encode it before returning.
3525
+ */
3526
+ export type SetAccountNotificationPreferenceScriptOutput = {
3527
+ /**
3528
+ * Tool output content.
3529
+ */
3530
+ content: unknown
3531
+ /**
3532
+ * Name of the Mail tool that ran.
3533
+ */
3534
+ name: string
3535
+ /**
3536
+ * Whether the Mail service reported a tool error.
3537
+ */
3538
+ isError?: boolean
3539
+ /**
3540
+ * Execution metadata reported by the MCP server.
3541
+ */
3542
+ metadata?: {
3543
+ /**
3544
+ * Tool execution time in milliseconds.
3545
+ */
3546
+ executionTimeMs?: number
3547
+ /**
3548
+ * Number of bytes processed by the tool.
3549
+ */
3550
+ bytesProcessed?: number
3551
+ /**
3552
+ * Tool execution cost reported by the MCP server.
3553
+ */
3554
+ cost?: number
3555
+ }
3556
+ /**
3557
+ * Mail module name used for display.
3558
+ */
3559
+ moduleName?: string
3560
+ /**
3561
+ * Structured tool output when provided by the Mail service.
3562
+ */
3563
+ structuredContent?: unknown
3564
+ /**
3565
+ * Bounded HTTP-like Mail service error code.
3566
+ */
3567
+ toolErrorCode?: number
3568
+ }
3569
+
3570
+ /**
3571
+ * Script input for the "Set Read Status" effect (`mail.setReadStatus`),
3572
+ * derived from its Tool Core definition's call_function input projection.
3573
+ *
3574
+ * Mark one or more email threads as read or unread
3575
+ */
3576
+ export type SetReadStatusScriptInput = {
3577
+ /**
3578
+ * The email address of the mailbox
3579
+ */
3580
+ userEmailAddress: string
3581
+ /**
3582
+ * Array of thread IDs to update (Gmail thread IDs or Outlook conversation IDs)
3583
+ */
3584
+ threadIds: Array<string>
3585
+ /**
3586
+ * Whether to mark as read (true) or unread (false)
3587
+ */
3588
+ read: boolean
3589
+ }
3590
+
3591
+ /**
3592
+ * Canonical Tool Core output for the "Set Read Status" effect (`mail.setReadStatus`).
3593
+ * This is the definition's output schema; the effect's script surface may
3594
+ * re-encode it before returning.
3595
+ */
3596
+ export type SetReadStatusScriptOutput = {
3597
+ /**
3598
+ * Tool output content.
3599
+ */
3600
+ content: unknown
3601
+ /**
3602
+ * Name of the Mail tool that ran.
3603
+ */
3604
+ name: string
3605
+ /**
3606
+ * Whether the Mail service reported a tool error.
3607
+ */
3608
+ isError?: boolean
3609
+ /**
3610
+ * Execution metadata reported by the MCP server.
3611
+ */
3612
+ metadata?: {
3613
+ /**
3614
+ * Tool execution time in milliseconds.
3615
+ */
3616
+ executionTimeMs?: number
3617
+ /**
3618
+ * Number of bytes processed by the tool.
3619
+ */
3620
+ bytesProcessed?: number
3621
+ /**
3622
+ * Tool execution cost reported by the MCP server.
3623
+ */
3624
+ cost?: number
3625
+ }
3626
+ /**
3627
+ * Mail module name used for display.
3628
+ */
3629
+ moduleName?: string
3630
+ /**
3631
+ * Structured tool output when provided by the Mail service.
3632
+ */
3633
+ structuredContent?: unknown
3634
+ /**
3635
+ * Bounded HTTP-like Mail service error code.
3636
+ */
3637
+ toolErrorCode?: number
3638
+ }
3639
+
3640
+ /**
3641
+ * Script input for the "Set Reminder" effect (`mail.setReminder`),
3642
+ * derived from its Tool Core definition's call_function input projection.
3643
+ *
3644
+ * Set a reminder (snooze) for email threads. Gmail accounts only — for Outlook accounts use flag_outlook_thread with a reminderDateTime instead.
3645
+ */
3646
+ export type SetReminderScriptInput = {
3647
+ /**
3648
+ * The email address of the mailbox
3649
+ */
3650
+ userEmailAddress: string
3651
+ /**
3652
+ * Array of thread IDs to set reminder on
3653
+ */
3654
+ threadIds: Array<string>
3655
+ /**
3656
+ * ISO 8601 datetime with UTC offset for when to remind (e.g., 2024-11-17T18:00:00-05:00)
3657
+ */
3658
+ remindDate: string
3659
+ /**
3660
+ * When to trigger reminder: IF_NO_REPLY (only if no reply received) or REGARDLESS
3661
+ */
3662
+ remindCondition?: "IF_NO_REPLY" | "REGARDLESS"
3663
+ }
3664
+
3665
+ /**
3666
+ * Canonical Tool Core output for the "Set Reminder" effect (`mail.setReminder`).
3667
+ * This is the definition's output schema; the effect's script surface may
3668
+ * re-encode it before returning.
3669
+ */
3670
+ export type SetReminderScriptOutput = {
3671
+ /**
3672
+ * Tool output content.
3673
+ */
3674
+ content: unknown
3675
+ /**
3676
+ * Name of the Mail tool that ran.
3677
+ */
3678
+ name: string
3679
+ /**
3680
+ * Whether the Mail service reported a tool error.
3681
+ */
3682
+ isError?: boolean
3683
+ /**
3684
+ * Execution metadata reported by the MCP server.
3685
+ */
3686
+ metadata?: {
3687
+ /**
3688
+ * Tool execution time in milliseconds.
3689
+ */
3690
+ executionTimeMs?: number
3691
+ /**
3692
+ * Number of bytes processed by the tool.
3693
+ */
3694
+ bytesProcessed?: number
3695
+ /**
3696
+ * Tool execution cost reported by the MCP server.
3697
+ */
3698
+ cost?: number
3699
+ }
3700
+ /**
3701
+ * Mail module name used for display.
3702
+ */
3703
+ moduleName?: string
3704
+ /**
3705
+ * Structured tool output when provided by the Mail service.
3706
+ */
3707
+ structuredContent?: unknown
3708
+ /**
3709
+ * Bounded HTTP-like Mail service error code.
3710
+ */
3711
+ toolErrorCode?: number
3712
+ }
3713
+
3714
+ /**
3715
+ * Script input for the "Set Notion Mail View Notification Preferences" effect (`mail.setViewNotificationPreferences`),
3716
+ * derived from its Tool Core definition's call_function input projection.
3717
+ *
3718
+ * Enable or disable Notion Mail push notifications for specific mailbox views (e.g., Priority, Other, Newsletters). This tool is specific to Notion Mail notification settings only — it does not modify notification settings for Gmail, Outlook, or any other email provider. Takes effect immediately.
3719
+ */
3720
+ export type SetViewNotificationPreferencesScriptInput = {
3721
+ /**
3722
+ * The Notion Mail email address of the account to update view notification preferences for. Must be an account connected to Notion Mail.
3723
+ */
3724
+ userEmailAddress: string
3725
+ /**
3726
+ * Array of view notification preference updates
3727
+ */
3728
+ preferences: Array<{
3729
+ /**
3730
+ * The mailbox view layout ID — get valid IDs from list_mailbox_views
3731
+ */
3732
+ layoutId: string
3733
+ /**
3734
+ * Whether to enable (true) or disable (false) notifications for this view
3735
+ */
3736
+ enabled: boolean
3737
+ }>
3738
+ }
3739
+
3740
+ /**
3741
+ * Canonical Tool Core output for the "Set Notion Mail View Notification Preferences" effect (`mail.setViewNotificationPreferences`).
3742
+ * This is the definition's output schema; the effect's script surface may
3743
+ * re-encode it before returning.
3744
+ */
3745
+ export type SetViewNotificationPreferencesScriptOutput = {
3746
+ /**
3747
+ * Tool output content.
3748
+ */
3749
+ content: unknown
3750
+ /**
3751
+ * Name of the Mail tool that ran.
3752
+ */
3753
+ name: string
3754
+ /**
3755
+ * Whether the Mail service reported a tool error.
3756
+ */
3757
+ isError?: boolean
3758
+ /**
3759
+ * Execution metadata reported by the MCP server.
3760
+ */
3761
+ metadata?: {
3762
+ /**
3763
+ * Tool execution time in milliseconds.
3764
+ */
3765
+ executionTimeMs?: number
3766
+ /**
3767
+ * Number of bytes processed by the tool.
3768
+ */
3769
+ bytesProcessed?: number
3770
+ /**
3771
+ * Tool execution cost reported by the MCP server.
3772
+ */
3773
+ cost?: number
3774
+ }
3775
+ /**
3776
+ * Mail module name used for display.
3777
+ */
3778
+ moduleName?: string
3779
+ /**
3780
+ * Structured tool output when provided by the Mail service.
3781
+ */
3782
+ structuredContent?: unknown
3783
+ /**
3784
+ * Bounded HTTP-like Mail service error code.
3785
+ */
3786
+ toolErrorCode?: number
3787
+ }
3788
+
3789
+ /**
3790
+ * Script input for the "Star Thread" effect (`mail.starThread`),
3791
+ * derived from its Tool Core definition's call_function input projection.
3792
+ *
3793
+ * Star or unstar one or more email threads. Gmail accounts only — for Outlook accounts use flag_outlook_thread instead.
3794
+ */
3795
+ export type StarThreadScriptInput = {
3796
+ /**
3797
+ * The email address of the mailbox
3798
+ */
3799
+ userEmailAddress: string
3800
+ /**
3801
+ * Array of thread IDs to star/unstar
3802
+ */
3803
+ threadIds: Array<string>
3804
+ /**
3805
+ * Whether to star (true) or unstar (false)
3806
+ */
3807
+ starred: boolean
3808
+ }
3809
+
3810
+ /**
3811
+ * Canonical Tool Core output for the "Star Thread" effect (`mail.starThread`).
3812
+ * This is the definition's output schema; the effect's script surface may
3813
+ * re-encode it before returning.
3814
+ */
3815
+ export type StarThreadScriptOutput = {
3816
+ /**
3817
+ * Tool output content.
3818
+ */
3819
+ content: unknown
3820
+ /**
3821
+ * Name of the Mail tool that ran.
3822
+ */
3823
+ name: string
3824
+ /**
3825
+ * Whether the Mail service reported a tool error.
3826
+ */
3827
+ isError?: boolean
3828
+ /**
3829
+ * Execution metadata reported by the MCP server.
3830
+ */
3831
+ metadata?: {
3832
+ /**
3833
+ * Tool execution time in milliseconds.
3834
+ */
3835
+ executionTimeMs?: number
3836
+ /**
3837
+ * Number of bytes processed by the tool.
3838
+ */
3839
+ bytesProcessed?: number
3840
+ /**
3841
+ * Tool execution cost reported by the MCP server.
3842
+ */
3843
+ cost?: number
3844
+ }
3845
+ /**
3846
+ * Mail module name used for display.
3847
+ */
3848
+ moduleName?: string
3849
+ /**
3850
+ * Structured tool output when provided by the Mail service.
3851
+ */
3852
+ structuredContent?: unknown
3853
+ /**
3854
+ * Bounded HTTP-like Mail service error code.
3855
+ */
3856
+ toolErrorCode?: number
3857
+ }
3858
+
3859
+ /**
3860
+ * Script input for the "Trash Thread" effect (`mail.trashThread`),
3861
+ * derived from its Tool Core definition's call_function input projection.
3862
+ *
3863
+ * Move one or more email threads to trash
3864
+ */
3865
+ export type TrashThreadScriptInput = {
3866
+ /**
3867
+ * The email address of the mailbox
3868
+ */
3869
+ userEmailAddress: string
3870
+ /**
3871
+ * Array of thread IDs to trash
3872
+ */
3873
+ threadIds: Array<string>
3874
+ }
3875
+
3876
+ /**
3877
+ * Canonical Tool Core output for the "Trash Thread" effect (`mail.trashThread`).
3878
+ * This is the definition's output schema; the effect's script surface may
3879
+ * re-encode it before returning.
3880
+ */
3881
+ export type TrashThreadScriptOutput = {
3882
+ /**
3883
+ * Tool output content.
3884
+ */
3885
+ content: unknown
3886
+ /**
3887
+ * Name of the Mail tool that ran.
3888
+ */
3889
+ name: string
3890
+ /**
3891
+ * Whether the Mail service reported a tool error.
3892
+ */
3893
+ isError?: boolean
3894
+ /**
3895
+ * Execution metadata reported by the MCP server.
3896
+ */
3897
+ metadata?: {
3898
+ /**
3899
+ * Tool execution time in milliseconds.
3900
+ */
3901
+ executionTimeMs?: number
3902
+ /**
3903
+ * Number of bytes processed by the tool.
3904
+ */
3905
+ bytesProcessed?: number
3906
+ /**
3907
+ * Tool execution cost reported by the MCP server.
3908
+ */
3909
+ cost?: number
3910
+ }
3911
+ /**
3912
+ * Mail module name used for display.
3913
+ */
3914
+ moduleName?: string
3915
+ /**
3916
+ * Structured tool output when provided by the Mail service.
3917
+ */
3918
+ structuredContent?: unknown
3919
+ /**
3920
+ * Bounded HTTP-like Mail service error code.
3921
+ */
3922
+ toolErrorCode?: number
3923
+ }
3924
+
3925
+ /**
3926
+ * Script input for the "Unblock Sender" effect (`mail.unblockSender`),
3927
+ * derived from its Tool Core definition's call_function input projection.
3928
+ *
3929
+ * Unblock a previously blocked sender
3930
+ */
3931
+ export type UnblockSenderScriptInput = {
3932
+ /**
3933
+ * The email address of the mailbox
3934
+ */
3935
+ userEmailAddress: string
3936
+ /**
3937
+ * Email address of the sender to unblock
3938
+ */
3939
+ senderEmail: string
3940
+ }
3941
+
3942
+ /**
3943
+ * Canonical Tool Core output for the "Unblock Sender" effect (`mail.unblockSender`).
3944
+ * This is the definition's output schema; the effect's script surface may
3945
+ * re-encode it before returning.
3946
+ */
3947
+ export type UnblockSenderScriptOutput = {
3948
+ /**
3949
+ * Tool output content.
3950
+ */
3951
+ content: unknown
3952
+ /**
3953
+ * Name of the Mail tool that ran.
3954
+ */
3955
+ name: string
3956
+ /**
3957
+ * Whether the Mail service reported a tool error.
3958
+ */
3959
+ isError?: boolean
3960
+ /**
3961
+ * Execution metadata reported by the MCP server.
3962
+ */
3963
+ metadata?: {
3964
+ /**
3965
+ * Tool execution time in milliseconds.
3966
+ */
3967
+ executionTimeMs?: number
3968
+ /**
3969
+ * Number of bytes processed by the tool.
3970
+ */
3971
+ bytesProcessed?: number
3972
+ /**
3973
+ * Tool execution cost reported by the MCP server.
3974
+ */
3975
+ cost?: number
3976
+ }
3977
+ /**
3978
+ * Mail module name used for display.
3979
+ */
3980
+ moduleName?: string
3981
+ /**
3982
+ * Structured tool output when provided by the Mail service.
3983
+ */
3984
+ structuredContent?: unknown
3985
+ /**
3986
+ * Bounded HTTP-like Mail service error code.
3987
+ */
3988
+ toolErrorCode?: number
3989
+ }
3990
+
3991
+ /**
3992
+ * Script input for the "Unset Reminder" effect (`mail.unsetReminder`),
3993
+ * derived from its Tool Core definition's call_function input projection.
3994
+ *
3995
+ * Remove a reminder (unsnooze) from email threads. Gmail accounts only — for Outlook accounts use flag_outlook_thread with flagged=false instead.
3996
+ */
3997
+ export type UnsetReminderScriptInput = {
3998
+ /**
3999
+ * The email address of the mailbox
4000
+ */
4001
+ userEmailAddress: string
4002
+ /**
4003
+ * Array of thread IDs to unset reminder on
4004
+ */
4005
+ threadIds: Array<string>
4006
+ }
4007
+
4008
+ /**
4009
+ * Canonical Tool Core output for the "Unset Reminder" effect (`mail.unsetReminder`).
4010
+ * This is the definition's output schema; the effect's script surface may
4011
+ * re-encode it before returning.
4012
+ */
4013
+ export type UnsetReminderScriptOutput = {
4014
+ /**
4015
+ * Tool output content.
4016
+ */
4017
+ content: unknown
4018
+ /**
4019
+ * Name of the Mail tool that ran.
4020
+ */
4021
+ name: string
4022
+ /**
4023
+ * Whether the Mail service reported a tool error.
4024
+ */
4025
+ isError?: boolean
4026
+ /**
4027
+ * Execution metadata reported by the MCP server.
4028
+ */
4029
+ metadata?: {
4030
+ /**
4031
+ * Tool execution time in milliseconds.
4032
+ */
4033
+ executionTimeMs?: number
4034
+ /**
4035
+ * Number of bytes processed by the tool.
4036
+ */
4037
+ bytesProcessed?: number
4038
+ /**
4039
+ * Tool execution cost reported by the MCP server.
4040
+ */
4041
+ cost?: number
4042
+ }
4043
+ /**
4044
+ * Mail module name used for display.
4045
+ */
4046
+ moduleName?: string
4047
+ /**
4048
+ * Structured tool output when provided by the Mail service.
4049
+ */
4050
+ structuredContent?: unknown
4051
+ /**
4052
+ * Bounded HTTP-like Mail service error code.
4053
+ */
4054
+ toolErrorCode?: number
4055
+ }
4056
+
4057
+ /**
4058
+ * Script input for the "Unsubscribe" effect (`mail.unsubscribeSender`),
4059
+ * derived from its Tool Core definition's call_function input projection.
4060
+ *
4061
+ * Unsubscribe from a mailing list using List-Unsubscribe metadata
4062
+ */
4063
+ export type UnsubscribeSenderScriptInput = {
4064
+ /**
4065
+ * The email address of the mailbox
4066
+ */
4067
+ userEmailAddress: string
4068
+ /**
4069
+ * Gmail thread ID containing the message with unsubscribe metadata
4070
+ */
4071
+ threadId?: string
4072
+ /**
4073
+ * Optional specific Gmail message ID
4074
+ */
4075
+ messageId?: string
4076
+ /**
4077
+ * Optional explicit HTTPS or mailto unsubscribe URL
4078
+ */
4079
+ explicitUnsubscribeUrl?: string
4080
+ /**
4081
+ * Optional raw List-Unsubscribe header value
4082
+ */
4083
+ listUnsubscribeHeader?: string
4084
+ /**
4085
+ * Optional raw List-Unsubscribe-Post header value
4086
+ */
4087
+ listUnsubscribePostHeader?: string
4088
+ /**
4089
+ * Optional sender email for logging/context
4090
+ */
4091
+ senderEmail?: string
4092
+ }
4093
+
4094
+ /**
4095
+ * Canonical Tool Core output for the "Unsubscribe" effect (`mail.unsubscribeSender`).
4096
+ * This is the definition's output schema; the effect's script surface may
4097
+ * re-encode it before returning.
4098
+ */
4099
+ export type UnsubscribeSenderScriptOutput = {
4100
+ /**
4101
+ * Tool output content.
4102
+ */
4103
+ content: unknown
4104
+ /**
4105
+ * Name of the Mail tool that ran.
4106
+ */
4107
+ name: string
4108
+ /**
4109
+ * Whether the Mail service reported a tool error.
4110
+ */
4111
+ isError?: boolean
4112
+ /**
4113
+ * Execution metadata reported by the MCP server.
4114
+ */
4115
+ metadata?: {
4116
+ /**
4117
+ * Tool execution time in milliseconds.
4118
+ */
4119
+ executionTimeMs?: number
4120
+ /**
4121
+ * Number of bytes processed by the tool.
4122
+ */
4123
+ bytesProcessed?: number
4124
+ /**
4125
+ * Tool execution cost reported by the MCP server.
4126
+ */
4127
+ cost?: number
4128
+ }
4129
+ /**
4130
+ * Mail module name used for display.
4131
+ */
4132
+ moduleName?: string
4133
+ /**
4134
+ * Structured tool output when provided by the Mail service.
4135
+ */
4136
+ structuredContent?: unknown
4137
+ /**
4138
+ * Bounded HTTP-like Mail service error code.
4139
+ */
4140
+ toolErrorCode?: number
4141
+ }
4142
+
4143
+ /**
4144
+ * Script input for the "Update Gmail Filter" effect (`mail.updateGmailFilter`),
4145
+ * derived from its Tool Core definition's call_function input projection.
4146
+ *
4147
+ * Update an existing Gmail filter (deletes and recreates with new settings)
4148
+ */
4149
+ export type UpdateGmailFilterScriptInput = {
4150
+ /**
4151
+ * The email address of the Gmail account
4152
+ */
4153
+ userEmailAddress: string
4154
+ /**
4155
+ * The ID of the filter to update
4156
+ */
4157
+ filterId: string
4158
+ /**
4159
+ * New filter criteria (at least one field required)
4160
+ */
4161
+ criteria: {
4162
+ /**
4163
+ * Match emails from this sender
4164
+ */
4165
+ from?: string
4166
+ /**
4167
+ * Match emails sent to this address
4168
+ */
4169
+ to?: string
4170
+ /**
4171
+ * Match emails with this in subject
4172
+ */
4173
+ subject?: string
4174
+ /**
4175
+ * Full Gmail search query
4176
+ */
4177
+ query?: string
4178
+ /**
4179
+ * Exclude emails matching this query
4180
+ */
4181
+ negatedQuery?: string
4182
+ /**
4183
+ * Match only emails with attachments
4184
+ */
4185
+ hasAttachment?: boolean
4186
+ /**
4187
+ * Exclude chat messages
4188
+ */
4189
+ excludeChats?: boolean
4190
+ /**
4191
+ * Size threshold in bytes
4192
+ */
4193
+ size?: number
4194
+ /**
4195
+ * Compare against size threshold
4196
+ */
4197
+ sizeComparison?: "SMALLER" | "LARGER"
4198
+ }
4199
+ /**
4200
+ * New actions to perform (at least one required)
4201
+ */
4202
+ action: {
4203
+ /**
4204
+ * Gmail system label IDs or IDs returned by list_labels. Never use Notion record, survey option, or category IDs.
4205
+ */
4206
+ addLabelIds?: Array<string>
4207
+ /**
4208
+ * Gmail system label IDs or IDs returned by list_labels. Use INBOX to auto-archive matching future mail.
4209
+ */
4210
+ removeLabelIds?: Array<string>
4211
+ /**
4212
+ * Email address to forward to (must be pre-verified)
4213
+ */
4214
+ forward?: string
4215
+ }
4216
+ }
4217
+
4218
+ /**
4219
+ * Canonical Tool Core output for the "Update Gmail Filter" effect (`mail.updateGmailFilter`).
4220
+ * This is the definition's output schema; the effect's script surface may
4221
+ * re-encode it before returning.
4222
+ */
4223
+ export type UpdateGmailFilterScriptOutput = {
4224
+ /**
4225
+ * Tool output content.
4226
+ */
4227
+ content: unknown
4228
+ /**
4229
+ * Name of the Mail tool that ran.
4230
+ */
4231
+ name: string
4232
+ /**
4233
+ * Whether the Mail service reported a tool error.
4234
+ */
4235
+ isError?: boolean
4236
+ /**
4237
+ * Execution metadata reported by the MCP server.
4238
+ */
4239
+ metadata?: {
4240
+ /**
4241
+ * Tool execution time in milliseconds.
4242
+ */
4243
+ executionTimeMs?: number
4244
+ /**
4245
+ * Number of bytes processed by the tool.
4246
+ */
4247
+ bytesProcessed?: number
4248
+ /**
4249
+ * Tool execution cost reported by the MCP server.
4250
+ */
4251
+ cost?: number
4252
+ }
4253
+ /**
4254
+ * Mail module name used for display.
4255
+ */
4256
+ moduleName?: string
4257
+ /**
4258
+ * Structured tool output when provided by the Mail service.
4259
+ */
4260
+ structuredContent?: unknown
4261
+ /**
4262
+ * Bounded HTTP-like Mail service error code.
4263
+ */
4264
+ toolErrorCode?: number
4265
+ }
4266
+
4267
+ /**
4268
+ * Script input for the "Update Label" effect (`mail.updateLabel`),
4269
+ * derived from its Tool Core definition's call_function input projection.
4270
+ *
4271
+ * Update a label's name or color
4272
+ */
4273
+ export type UpdateLabelScriptInput = {
4274
+ /**
4275
+ * The email address of the mailbox
4276
+ */
4277
+ userEmailAddress: string
4278
+ /**
4279
+ * ID of the label to update
4280
+ */
4281
+ labelID: string
4282
+ /**
4283
+ * New label name (optional)
4284
+ */
4285
+ labelName?: string
4286
+ /**
4287
+ * New label color (optional)
4288
+ */
4289
+ color?:
4290
+ | "light-gray"
4291
+ | "gray"
4292
+ | "brown"
4293
+ | "orange"
4294
+ | "yellow"
4295
+ | "green"
4296
+ | "blue"
4297
+ | "purple"
4298
+ | "pink"
4299
+ | "red"
4300
+ }
4301
+
4302
+ /**
4303
+ * Canonical Tool Core output for the "Update Label" effect (`mail.updateLabel`).
4304
+ * This is the definition's output schema; the effect's script surface may
4305
+ * re-encode it before returning.
4306
+ */
4307
+ export type UpdateLabelScriptOutput = {
4308
+ /**
4309
+ * Tool output content.
4310
+ */
4311
+ content: unknown
4312
+ /**
4313
+ * Name of the Mail tool that ran.
4314
+ */
4315
+ name: string
4316
+ /**
4317
+ * Whether the Mail service reported a tool error.
4318
+ */
4319
+ isError?: boolean
4320
+ /**
4321
+ * Execution metadata reported by the MCP server.
4322
+ */
4323
+ metadata?: {
4324
+ /**
4325
+ * Tool execution time in milliseconds.
4326
+ */
4327
+ executionTimeMs?: number
4328
+ /**
4329
+ * Number of bytes processed by the tool.
4330
+ */
4331
+ bytesProcessed?: number
4332
+ /**
4333
+ * Tool execution cost reported by the MCP server.
4334
+ */
4335
+ cost?: number
4336
+ }
4337
+ /**
4338
+ * Mail module name used for display.
4339
+ */
4340
+ moduleName?: string
4341
+ /**
4342
+ * Structured tool output when provided by the Mail service.
4343
+ */
4344
+ structuredContent?: unknown
4345
+ /**
4346
+ * Bounded HTTP-like Mail service error code.
4347
+ */
4348
+ toolErrorCode?: number
4349
+ }
4350
+
4351
+ /**
4352
+ * Script input for the "Update Outlook Rule" effect (`mail.updateOutlookRule`),
4353
+ * derived from its Tool Core definition's call_function input projection.
4354
+ *
4355
+ * Update an existing inbox rule in the user's Outlook mailbox. Only the fields you provide are changed; unspecified top-level fields remain unchanged. conditions, actions, and exceptions are REPLACED entirely when provided.
4356
+ */
4357
+ export type UpdateOutlookRuleScriptInput = {
4358
+ /**
4359
+ * Rule ID (use list_outlook_rules to find IDs)
4360
+ */
4361
+ ruleId: string
4362
+ /**
4363
+ * New display name
4364
+ */
4365
+ displayName?: string
4366
+ /**
4367
+ * New execution order
4368
+ */
4369
+ sequence?: number
4370
+ /**
4371
+ * Enable or disable the rule
4372
+ */
4373
+ isEnabled?: boolean
4374
+ conditions?: {
4375
+ bodyContains?: Array<string>
4376
+ bodyOrSubjectContains?: Array<string>
4377
+ categories?: Array<string>
4378
+ fromAddresses?: Array<{
4379
+ address: string
4380
+ name?: string
4381
+ }>
4382
+ hasAttachments?: boolean
4383
+ headerContains?: Array<string>
4384
+ importance?: "low" | "normal" | "high"
4385
+ isApprovalRequest?: boolean
4386
+ isAutomaticForward?: boolean
4387
+ isAutomaticReply?: boolean
4388
+ isEncrypted?: boolean
4389
+ isMeetingRequest?: boolean
4390
+ isMeetingResponse?: boolean
4391
+ isNonDeliveryReport?: boolean
4392
+ isPermissionControlled?: boolean
4393
+ isReadReceipt?: boolean
4394
+ isSigned?: boolean
4395
+ isVoicemail?: boolean
4396
+ messageActionFlag?:
4397
+ | "any"
4398
+ | "call"
4399
+ | "doNotForward"
4400
+ | "followUp"
4401
+ | "fyi"
4402
+ | "forward"
4403
+ | "noResponseNecessary"
4404
+ | "read"
4405
+ | "reply"
4406
+ | "replyToAll"
4407
+ | "review"
4408
+ notSentToMe?: boolean
4409
+ recipientContains?: Array<string>
4410
+ senderContains?: Array<string>
4411
+ sensitivity?: "normal" | "personal" | "private" | "confidential"
4412
+ sentCcMe?: boolean
4413
+ sentOnlyToMe?: boolean
4414
+ sentToMe?: boolean
4415
+ sentToOrCcMe?: boolean
4416
+ sentToAddresses?: Array<{
4417
+ address: string
4418
+ name?: string
4419
+ }>
4420
+ subjectContains?: Array<string>
4421
+ withinSizeRange?: {
4422
+ minimumSize?: number
4423
+ maximumSize?: number
4424
+ }
4425
+ }
4426
+ /**
4427
+ * New actions (replaces existing; must have at least one non-empty field when provided)
4428
+ */
4429
+ actions?: {
4430
+ /**
4431
+ * Categories to assign
4432
+ */
4433
+ assignCategories?: Array<string>
4434
+ /**
4435
+ * Folder ID to copy to (use list_outlook_folders to find IDs)
4436
+ */
4437
+ copyToFolder?: string
4438
+ /**
4439
+ * Move to Deleted Items
4440
+ */
4441
+ delete?: boolean
4442
+ /**
4443
+ * Forward as attachment to these addresses
4444
+ */
4445
+ forwardAsAttachmentTo?: Array<{
4446
+ /**
4447
+ * Email address
4448
+ */
4449
+ address: string
4450
+ /**
4451
+ * Display name (optional)
4452
+ */
4453
+ name?: string
4454
+ }>
4455
+ /**
4456
+ * Forward to these addresses
4457
+ */
4458
+ forwardTo?: Array<{
4459
+ /**
4460
+ * Email address
4461
+ */
4462
+ address: string
4463
+ /**
4464
+ * Display name (optional)
4465
+ */
4466
+ name?: string
4467
+ }>
4468
+ /**
4469
+ * Mark as read
4470
+ */
4471
+ markAsRead?: boolean
4472
+ /**
4473
+ * Set importance level
4474
+ */
4475
+ markImportance?: "low" | "normal" | "high"
4476
+ /**
4477
+ * Folder ID to move to (use list_outlook_folders to find IDs)
4478
+ */
4479
+ moveToFolder?: string
4480
+ /**
4481
+ * Permanently delete (skip Deleted Items)
4482
+ */
4483
+ permanentDelete?: boolean
4484
+ /**
4485
+ * Redirect to these addresses
4486
+ */
4487
+ redirectTo?: Array<{
4488
+ /**
4489
+ * Email address
4490
+ */
4491
+ address: string
4492
+ /**
4493
+ * Display name (optional)
4494
+ */
4495
+ name?: string
4496
+ }>
4497
+ /**
4498
+ * Stop processing subsequent rules
4499
+ */
4500
+ stopProcessingRules?: boolean
4501
+ }
4502
+ exceptions?: {
4503
+ bodyContains?: Array<string>
4504
+ bodyOrSubjectContains?: Array<string>
4505
+ categories?: Array<string>
4506
+ fromAddresses?: Array<{
4507
+ address: string
4508
+ name?: string
4509
+ }>
4510
+ hasAttachments?: boolean
4511
+ headerContains?: Array<string>
4512
+ importance?: "low" | "normal" | "high"
4513
+ isApprovalRequest?: boolean
4514
+ isAutomaticForward?: boolean
4515
+ isAutomaticReply?: boolean
4516
+ isEncrypted?: boolean
4517
+ isMeetingRequest?: boolean
4518
+ isMeetingResponse?: boolean
4519
+ isNonDeliveryReport?: boolean
4520
+ isPermissionControlled?: boolean
4521
+ isReadReceipt?: boolean
4522
+ isSigned?: boolean
4523
+ isVoicemail?: boolean
4524
+ messageActionFlag?:
4525
+ | "any"
4526
+ | "call"
4527
+ | "doNotForward"
4528
+ | "followUp"
4529
+ | "fyi"
4530
+ | "forward"
4531
+ | "noResponseNecessary"
4532
+ | "read"
4533
+ | "reply"
4534
+ | "replyToAll"
4535
+ | "review"
4536
+ notSentToMe?: boolean
4537
+ recipientContains?: Array<string>
4538
+ senderContains?: Array<string>
4539
+ sensitivity?: "normal" | "personal" | "private" | "confidential"
4540
+ sentCcMe?: boolean
4541
+ sentOnlyToMe?: boolean
4542
+ sentToMe?: boolean
4543
+ sentToOrCcMe?: boolean
4544
+ sentToAddresses?: Array<{
4545
+ address: string
4546
+ name?: string
4547
+ }>
4548
+ subjectContains?: Array<string>
4549
+ withinSizeRange?: {
4550
+ minimumSize?: number
4551
+ maximumSize?: number
4552
+ }
4553
+ }
4554
+ etag?: string
4555
+ /**
4556
+ * The Outlook email address
4557
+ */
4558
+ userEmailAddress: string
4559
+ }
4560
+
4561
+ /**
4562
+ * Canonical Tool Core output for the "Update Outlook Rule" effect (`mail.updateOutlookRule`).
4563
+ * This is the definition's output schema; the effect's script surface may
4564
+ * re-encode it before returning.
4565
+ */
4566
+ export type UpdateOutlookRuleScriptOutput = {
4567
+ /**
4568
+ * Tool output content.
4569
+ */
4570
+ content: unknown
4571
+ /**
4572
+ * Name of the Mail tool that ran.
4573
+ */
4574
+ name: string
4575
+ /**
4576
+ * Whether the Mail service reported a tool error.
4577
+ */
4578
+ isError?: boolean
4579
+ /**
4580
+ * Execution metadata reported by the MCP server.
4581
+ */
4582
+ metadata?: {
4583
+ /**
4584
+ * Tool execution time in milliseconds.
4585
+ */
4586
+ executionTimeMs?: number
4587
+ /**
4588
+ * Number of bytes processed by the tool.
4589
+ */
4590
+ bytesProcessed?: number
4591
+ /**
4592
+ * Tool execution cost reported by the MCP server.
4593
+ */
4594
+ cost?: number
4595
+ }
4596
+ /**
4597
+ * Mail module name used for display.
4598
+ */
4599
+ moduleName?: string
4600
+ /**
4601
+ * Structured tool output when provided by the Mail service.
4602
+ */
4603
+ structuredContent?: unknown
4604
+ /**
4605
+ * Bounded HTTP-like Mail service error code.
4606
+ */
4607
+ toolErrorCode?: number
4608
+ }
4609
+
4610
+ /**
4611
+ * Script input for the "Update Status" effect (`mail.updateStatus`),
4612
+ * derived from its Tool Core definition's call_function input projection.
4613
+ *
4614
+ * Update the status property value for email threads. Gmail accounts only — status updates are not supported for Outlook accounts.
4615
+ */
4616
+ export type UpdateStatusScriptInput = {
4617
+ /**
4618
+ * The email address of the mailbox
4619
+ */
4620
+ userEmailAddress: string
4621
+ /**
4622
+ * Array of thread IDs to update
4623
+ */
4624
+ threadIds: Array<string>
4625
+ /**
4626
+ * The UUID of the status property
4627
+ */
4628
+ statusID: string
4629
+ /**
4630
+ * The name of the status option to set
4631
+ */
4632
+ optionValue: string
4633
+ }
4634
+
4635
+ /**
4636
+ * Canonical Tool Core output for the "Update Status" effect (`mail.updateStatus`).
4637
+ * This is the definition's output schema; the effect's script surface may
4638
+ * re-encode it before returning.
4639
+ */
4640
+ export type UpdateStatusScriptOutput = {
4641
+ /**
4642
+ * Tool output content.
4643
+ */
4644
+ content: unknown
4645
+ /**
4646
+ * Name of the Mail tool that ran.
4647
+ */
4648
+ name: string
4649
+ /**
4650
+ * Whether the Mail service reported a tool error.
4651
+ */
4652
+ isError?: boolean
4653
+ /**
4654
+ * Execution metadata reported by the MCP server.
4655
+ */
4656
+ metadata?: {
4657
+ /**
4658
+ * Tool execution time in milliseconds.
4659
+ */
4660
+ executionTimeMs?: number
4661
+ /**
4662
+ * Number of bytes processed by the tool.
4663
+ */
4664
+ bytesProcessed?: number
4665
+ /**
4666
+ * Tool execution cost reported by the MCP server.
4667
+ */
4668
+ cost?: number
4669
+ }
4670
+ /**
4671
+ * Mail module name used for display.
4672
+ */
4673
+ moduleName?: string
4674
+ /**
4675
+ * Structured tool output when provided by the Mail service.
4676
+ */
4677
+ structuredContent?: unknown
4678
+ /**
4679
+ * Bounded HTTP-like Mail service error code.
4680
+ */
4681
+ toolErrorCode?: number
4682
+ }
4683
+
4684
+ /**
4685
+ * Script input for the "View Thread Content" effect (`mail.viewThreadContent`),
4686
+ * derived from its Tool Core definition's call_function input projection.
4687
+ *
4688
+ * View the full content of an email thread including all messages. The returned threadId follows the mail thread-id format: The id is a single opaque string; a verification stamp may be appended after a "." (e.g. 1894c2bd0f58f2b7.a83f92c1) and that stamp is part of the value, not a separate field. Pass the whole value to other tools exactly as received. A bare id with no stamp still works — tools just verify it more slowly. Thread identity is the part before the "." — a missing or different stamp never means a different thread — so if you specifically need the raw provider id for another purpose (e.g. matching a Notion mail block that stores the untagged id), it is that leading part (for Gmail, a hex string like 1894c2bd0f58f2b7). The response includes url when a direct provider link is available. When a link would help the user, including when they ask for one, cite that exact URL directly in citation syntax ([^<url>]) so it renders as a provider chip; never construct a provider URL from threadId or message IDs.
4689
+ */
4690
+ export type ViewThreadContentScriptInput = {
4691
+ /**
4692
+ * The email address of the mailbox
4693
+ */
4694
+ userEmailAddress: string
4695
+ /**
4696
+ * The thread ID to view (from search_emails or view_thread_content). A stamped ref is accepted as-is.
4697
+ */
4698
+ threadId: string
4699
+ /**
4700
+ * If true, returns only the most recent message. If false, returns all messages.
4701
+ */
4702
+ mostRecentMessageOnly?: boolean
4703
+ }
4704
+
4705
+ /**
4706
+ * Canonical Tool Core output for the "View Thread Content" effect (`mail.viewThreadContent`).
4707
+ * This is the definition's output schema; the effect's script surface may
4708
+ * re-encode it before returning.
4709
+ */
4710
+ export type ViewThreadContentScriptOutput = {
4711
+ /**
4712
+ * Tool output content.
4713
+ */
4714
+ content: unknown
4715
+ /**
4716
+ * Name of the Mail tool that ran.
4717
+ */
4718
+ name: string
4719
+ /**
4720
+ * Whether the Mail service reported a tool error.
4721
+ */
4722
+ isError?: boolean
4723
+ /**
4724
+ * Execution metadata reported by the MCP server.
4725
+ */
4726
+ metadata?: {
4727
+ /**
4728
+ * Tool execution time in milliseconds.
4729
+ */
4730
+ executionTimeMs?: number
4731
+ /**
4732
+ * Number of bytes processed by the tool.
4733
+ */
4734
+ bytesProcessed?: number
4735
+ /**
4736
+ * Tool execution cost reported by the MCP server.
4737
+ */
4738
+ cost?: number
4739
+ }
4740
+ /**
4741
+ * Mail module name used for display.
4742
+ */
4743
+ moduleName?: string
4744
+ /**
4745
+ * Structured tool output when provided by the Mail service.
4746
+ */
4747
+ structuredContent?: unknown
4748
+ /**
4749
+ * Bounded HTTP-like Mail service error code.
4750
+ */
4751
+ toolErrorCode?: number
4752
+ }
4753
+
4754
+ export class MailConnectionClient {
4755
+ constructor(private readonly invoke: ConnectionActionInvoker) {}
4756
+ addSenderNotificationPreferences(
4757
+ args: AddSenderNotificationPreferencesScriptInput,
4758
+ ): Promise<AddSenderNotificationPreferencesScriptOutput> {
4759
+ return this.invoke<AddSenderNotificationPreferencesScriptOutput>(
4760
+ "addSenderNotificationPreferences",
4761
+ args,
4762
+ )
4763
+ }
4764
+ analyzeRecentEmailActivities(
4765
+ args: AnalyzeRecentEmailActivitiesScriptInput,
4766
+ ): Promise<AnalyzeRecentEmailActivitiesScriptOutput> {
4767
+ return this.invoke<AnalyzeRecentEmailActivitiesScriptOutput>(
4768
+ "analyzeRecentEmailActivities",
4769
+ args,
4770
+ )
4771
+ }
4772
+ applyOutlookCategories(
4773
+ args: ApplyOutlookCategoriesScriptInput,
4774
+ ): Promise<ApplyOutlookCategoriesScriptOutput> {
4775
+ return this.invoke<ApplyOutlookCategoriesScriptOutput>(
4776
+ "applyOutlookCategories",
4777
+ args,
4778
+ )
4779
+ }
4780
+ applyUserLabelsWithLazyCreate(
4781
+ args: ApplyUserLabelsWithLazyCreateScriptInput,
4782
+ ): Promise<ApplyUserLabelsWithLazyCreateScriptOutput> {
4783
+ return this.invoke<ApplyUserLabelsWithLazyCreateScriptOutput>(
4784
+ "applyUserLabelsWithLazyCreate",
4785
+ args,
4786
+ )
4787
+ }
4788
+ archiveThreadsById(
4789
+ args: ArchiveThreadsByIdScriptInput,
4790
+ ): Promise<ArchiveThreadsByIdScriptOutput> {
4791
+ return this.invoke<ArchiveThreadsByIdScriptOutput>(
4792
+ "archiveThreadsById",
4793
+ args,
4794
+ )
4795
+ }
4796
+ archiveThreadsByQuery(
4797
+ args: ArchiveThreadsByQueryScriptInput,
4798
+ ): Promise<ArchiveThreadsByQueryScriptOutput> {
4799
+ return this.invoke<ArchiveThreadsByQueryScriptOutput>(
4800
+ "archiveThreadsByQuery",
4801
+ args,
4802
+ )
4803
+ }
4804
+ blockSender(args: BlockSenderScriptInput): Promise<BlockSenderScriptOutput> {
4805
+ return this.invoke<BlockSenderScriptOutput>("blockSender", args)
4806
+ }
4807
+ createGmailFilter(
4808
+ args: CreateGmailFilterScriptInput,
4809
+ ): Promise<CreateGmailFilterScriptOutput> {
4810
+ return this.invoke<CreateGmailFilterScriptOutput>("createGmailFilter", args)
4811
+ }
4812
+ createLabel(args: CreateLabelScriptInput): Promise<CreateLabelScriptOutput> {
4813
+ return this.invoke<CreateLabelScriptOutput>("createLabel", args)
4814
+ }
4815
+ createMailBlock(
4816
+ args: CreateMailBlockScriptInput,
4817
+ ): Promise<CreateMailBlockScriptOutput> {
4818
+ return this.invoke<CreateMailBlockScriptOutput>("createMailBlock", args)
4819
+ }
4820
+ createOrUpdateDraft(
4821
+ args: CreateOrUpdateDraftScriptInput,
4822
+ ): Promise<CreateOrUpdateDraftScriptOutput> {
4823
+ return this.invoke<CreateOrUpdateDraftScriptOutput>(
4824
+ "createOrUpdateDraft",
4825
+ args,
4826
+ )
4827
+ }
4828
+ createOrUpdateDraftAllClients(
4829
+ args: CreateOrUpdateDraftAllClientsScriptInput,
4830
+ ): Promise<CreateOrUpdateDraftAllClientsScriptOutput> {
4831
+ return this.invoke<CreateOrUpdateDraftAllClientsScriptOutput>(
4832
+ "createOrUpdateDraftAllClients",
4833
+ args,
4834
+ )
4835
+ }
4836
+ createOrUpdateGmailDraft(
4837
+ args: CreateOrUpdateGmailDraftScriptInput,
4838
+ ): Promise<CreateOrUpdateGmailDraftScriptOutput> {
4839
+ return this.invoke<CreateOrUpdateGmailDraftScriptOutput>(
4840
+ "createOrUpdateGmailDraft",
4841
+ args,
4842
+ )
4843
+ }
4844
+ createOrUpdateOutlookDraft(
4845
+ args: CreateOrUpdateOutlookDraftScriptInput,
4846
+ ): Promise<CreateOrUpdateOutlookDraftScriptOutput> {
4847
+ return this.invoke<CreateOrUpdateOutlookDraftScriptOutput>(
4848
+ "createOrUpdateOutlookDraft",
4849
+ args,
4850
+ )
4851
+ }
4852
+ createOutlookCategory(
4853
+ args: CreateOutlookCategoryScriptInput,
4854
+ ): Promise<CreateOutlookCategoryScriptOutput> {
4855
+ return this.invoke<CreateOutlookCategoryScriptOutput>(
4856
+ "createOutlookCategory",
4857
+ args,
4858
+ )
4859
+ }
4860
+ createOutlookFolder(
4861
+ args: CreateOutlookFolderScriptInput,
4862
+ ): Promise<CreateOutlookFolderScriptOutput> {
4863
+ return this.invoke<CreateOutlookFolderScriptOutput>(
4864
+ "createOutlookFolder",
4865
+ args,
4866
+ )
4867
+ }
4868
+ createOutlookRule(
4869
+ args: CreateOutlookRuleScriptInput,
4870
+ ): Promise<CreateOutlookRuleScriptOutput> {
4871
+ return this.invoke<CreateOutlookRuleScriptOutput>("createOutlookRule", args)
4872
+ }
4873
+ createStatusColumn(
4874
+ args: CreateStatusColumnScriptInput,
4875
+ ): Promise<CreateStatusColumnScriptOutput> {
4876
+ return this.invoke<CreateStatusColumnScriptOutput>(
4877
+ "createStatusColumn",
4878
+ args,
4879
+ )
4880
+ }
4881
+ deleteGmailFilter(
4882
+ args: DeleteGmailFilterScriptInput,
4883
+ ): Promise<DeleteGmailFilterScriptOutput> {
4884
+ return this.invoke<DeleteGmailFilterScriptOutput>("deleteGmailFilter", args)
4885
+ }
4886
+ deleteLabel(args: DeleteLabelScriptInput): Promise<DeleteLabelScriptOutput> {
4887
+ return this.invoke<DeleteLabelScriptOutput>("deleteLabel", args)
4888
+ }
4889
+ deleteOutlookCategory(
4890
+ args: DeleteOutlookCategoryScriptInput,
4891
+ ): Promise<DeleteOutlookCategoryScriptOutput> {
4892
+ return this.invoke<DeleteOutlookCategoryScriptOutput>(
4893
+ "deleteOutlookCategory",
4894
+ args,
4895
+ )
4896
+ }
4897
+ deleteOutlookRule(
4898
+ args: DeleteOutlookRuleScriptInput,
4899
+ ): Promise<DeleteOutlookRuleScriptOutput> {
4900
+ return this.invoke<DeleteOutlookRuleScriptOutput>("deleteOutlookRule", args)
4901
+ }
4902
+ flagOutlookThread(
4903
+ args: FlagOutlookThreadScriptInput,
4904
+ ): Promise<FlagOutlookThreadScriptOutput> {
4905
+ return this.invoke<FlagOutlookThreadScriptOutput>("flagOutlookThread", args)
4906
+ }
4907
+ getNotificationPreferences(
4908
+ args: GetNotificationPreferencesScriptInput,
4909
+ ): Promise<GetNotificationPreferencesScriptOutput> {
4910
+ return this.invoke<GetNotificationPreferencesScriptOutput>(
4911
+ "getNotificationPreferences",
4912
+ args,
4913
+ )
4914
+ }
4915
+ healthCheck(args: HealthCheckScriptInput): Promise<HealthCheckScriptOutput> {
4916
+ return this.invoke<HealthCheckScriptOutput>("healthCheck", args)
4917
+ }
4918
+ listGmailFilters(
4919
+ args: ListGmailFiltersScriptInput,
4920
+ ): Promise<ListGmailFiltersScriptOutput> {
4921
+ return this.invoke<ListGmailFiltersScriptOutput>("listGmailFilters", args)
4922
+ }
4923
+ listLabels(args: ListLabelsScriptInput): Promise<ListLabelsScriptOutput> {
4924
+ return this.invoke<ListLabelsScriptOutput>("listLabels", args)
4925
+ }
4926
+ listMailboxViews(
4927
+ args: ListMailboxViewsScriptInput,
4928
+ ): Promise<ListMailboxViewsScriptOutput> {
4929
+ return this.invoke<ListMailboxViewsScriptOutput>("listMailboxViews", args)
4930
+ }
4931
+ listOutlookCategories(
4932
+ args: ListOutlookCategoriesScriptInput,
4933
+ ): Promise<ListOutlookCategoriesScriptOutput> {
4934
+ return this.invoke<ListOutlookCategoriesScriptOutput>(
4935
+ "listOutlookCategories",
4936
+ args,
4937
+ )
4938
+ }
4939
+ listOutlookFolders(
4940
+ args: ListOutlookFoldersScriptInput,
4941
+ ): Promise<ListOutlookFoldersScriptOutput> {
4942
+ return this.invoke<ListOutlookFoldersScriptOutput>(
4943
+ "listOutlookFolders",
4944
+ args,
4945
+ )
4946
+ }
4947
+ listOutlookRules(
4948
+ args: ListOutlookRulesScriptInput,
4949
+ ): Promise<ListOutlookRulesScriptOutput> {
4950
+ return this.invoke<ListOutlookRulesScriptOutput>("listOutlookRules", args)
4951
+ }
4952
+ listStatusProperties(
4953
+ args: ListStatusPropertiesScriptInput,
4954
+ ): Promise<ListStatusPropertiesScriptOutput> {
4955
+ return this.invoke<ListStatusPropertiesScriptOutput>(
4956
+ "listStatusProperties",
4957
+ args,
4958
+ )
4959
+ }
4960
+ markThreadSpam(
4961
+ args: MarkThreadSpamScriptInput,
4962
+ ): Promise<MarkThreadSpamScriptOutput> {
4963
+ return this.invoke<MarkThreadSpamScriptOutput>("markThreadSpam", args)
4964
+ }
4965
+ moveThreadToInbox(
4966
+ args: MoveThreadToInboxScriptInput,
4967
+ ): Promise<MoveThreadToInboxScriptOutput> {
4968
+ return this.invoke<MoveThreadToInboxScriptOutput>("moveThreadToInbox", args)
4969
+ }
4970
+ moveToOutlookFolder(
4971
+ args: MoveToOutlookFolderScriptInput,
4972
+ ): Promise<MoveToOutlookFolderScriptOutput> {
4973
+ return this.invoke<MoveToOutlookFolderScriptOutput>(
4974
+ "moveToOutlookFolder",
4975
+ args,
4976
+ )
4977
+ }
4978
+ readAttachment(
4979
+ args: ReadAttachmentScriptInput,
4980
+ ): Promise<ReadAttachmentScriptOutput> {
4981
+ return this.invoke<ReadAttachmentScriptOutput>("readAttachment", args)
4982
+ }
4983
+ removeOutlookCategories(
4984
+ args: RemoveOutlookCategoriesScriptInput,
4985
+ ): Promise<RemoveOutlookCategoriesScriptOutput> {
4986
+ return this.invoke<RemoveOutlookCategoriesScriptOutput>(
4987
+ "removeOutlookCategories",
4988
+ args,
4989
+ )
4990
+ }
4991
+ removeSenderNotificationPreferences(
4992
+ args: RemoveSenderNotificationPreferencesScriptInput,
4993
+ ): Promise<RemoveSenderNotificationPreferencesScriptOutput> {
4994
+ return this.invoke<RemoveSenderNotificationPreferencesScriptOutput>(
4995
+ "removeSenderNotificationPreferences",
4996
+ args,
4997
+ )
4998
+ }
4999
+ removeUserLabels(
5000
+ args: RemoveUserLabelsScriptInput,
5001
+ ): Promise<RemoveUserLabelsScriptOutput> {
5002
+ return this.invoke<RemoveUserLabelsScriptOutput>("removeUserLabels", args)
5003
+ }
5004
+ searchEmails(
5005
+ args: SearchEmailsScriptInput,
5006
+ ): Promise<SearchEmailsScriptOutput> {
5007
+ return this.invoke<SearchEmailsScriptOutput>("searchEmails", args)
5008
+ }
5009
+ searchOutlookEmails(
5010
+ args: SearchOutlookEmailsScriptInput,
5011
+ ): Promise<SearchOutlookEmailsScriptOutput> {
5012
+ return this.invoke<SearchOutlookEmailsScriptOutput>(
5013
+ "searchOutlookEmails",
5014
+ args,
5015
+ )
5016
+ }
5017
+ sendExistingDraft(
5018
+ args: SendExistingDraftScriptInput,
5019
+ ): Promise<SendExistingDraftScriptOutput> {
5020
+ return this.invoke<SendExistingDraftScriptOutput>("sendExistingDraft", args)
5021
+ }
5022
+ sendNewEmail(
5023
+ args: SendNewEmailScriptInput,
5024
+ ): Promise<SendNewEmailScriptOutput> {
5025
+ return this.invoke<SendNewEmailScriptOutput>("sendNewEmail", args)
5026
+ }
5027
+ setAccountNotificationPreference(
5028
+ args: SetAccountNotificationPreferenceScriptInput,
5029
+ ): Promise<SetAccountNotificationPreferenceScriptOutput> {
5030
+ return this.invoke<SetAccountNotificationPreferenceScriptOutput>(
5031
+ "setAccountNotificationPreference",
5032
+ args,
5033
+ )
5034
+ }
5035
+ setReadStatus(
5036
+ args: SetReadStatusScriptInput,
5037
+ ): Promise<SetReadStatusScriptOutput> {
5038
+ return this.invoke<SetReadStatusScriptOutput>("setReadStatus", args)
5039
+ }
5040
+ setReminder(args: SetReminderScriptInput): Promise<SetReminderScriptOutput> {
5041
+ return this.invoke<SetReminderScriptOutput>("setReminder", args)
5042
+ }
5043
+ setViewNotificationPreferences(
5044
+ args: SetViewNotificationPreferencesScriptInput,
5045
+ ): Promise<SetViewNotificationPreferencesScriptOutput> {
5046
+ return this.invoke<SetViewNotificationPreferencesScriptOutput>(
5047
+ "setViewNotificationPreferences",
5048
+ args,
5049
+ )
5050
+ }
5051
+ starThread(args: StarThreadScriptInput): Promise<StarThreadScriptOutput> {
5052
+ return this.invoke<StarThreadScriptOutput>("starThread", args)
5053
+ }
5054
+ trashThread(args: TrashThreadScriptInput): Promise<TrashThreadScriptOutput> {
5055
+ return this.invoke<TrashThreadScriptOutput>("trashThread", args)
5056
+ }
5057
+ unblockSender(
5058
+ args: UnblockSenderScriptInput,
5059
+ ): Promise<UnblockSenderScriptOutput> {
5060
+ return this.invoke<UnblockSenderScriptOutput>("unblockSender", args)
5061
+ }
5062
+ unsetReminder(
5063
+ args: UnsetReminderScriptInput,
5064
+ ): Promise<UnsetReminderScriptOutput> {
5065
+ return this.invoke<UnsetReminderScriptOutput>("unsetReminder", args)
5066
+ }
5067
+ unsubscribeSender(
5068
+ args: UnsubscribeSenderScriptInput,
5069
+ ): Promise<UnsubscribeSenderScriptOutput> {
5070
+ return this.invoke<UnsubscribeSenderScriptOutput>("unsubscribeSender", args)
5071
+ }
5072
+ updateGmailFilter(
5073
+ args: UpdateGmailFilterScriptInput,
5074
+ ): Promise<UpdateGmailFilterScriptOutput> {
5075
+ return this.invoke<UpdateGmailFilterScriptOutput>("updateGmailFilter", args)
5076
+ }
5077
+ updateLabel(args: UpdateLabelScriptInput): Promise<UpdateLabelScriptOutput> {
5078
+ return this.invoke<UpdateLabelScriptOutput>("updateLabel", args)
5079
+ }
5080
+ updateOutlookRule(
5081
+ args: UpdateOutlookRuleScriptInput,
5082
+ ): Promise<UpdateOutlookRuleScriptOutput> {
5083
+ return this.invoke<UpdateOutlookRuleScriptOutput>("updateOutlookRule", args)
5084
+ }
5085
+ updateStatus(
5086
+ args: UpdateStatusScriptInput,
5087
+ ): Promise<UpdateStatusScriptOutput> {
5088
+ return this.invoke<UpdateStatusScriptOutput>("updateStatus", args)
5089
+ }
5090
+ viewThreadContent(
5091
+ args: ViewThreadContentScriptInput,
5092
+ ): Promise<ViewThreadContentScriptOutput> {
5093
+ return this.invoke<ViewThreadContentScriptOutput>("viewThreadContent", args)
5094
+ }
5095
+ }