@honest-magic/mail-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,658 @@
1
+ #!/usr/bin/env node
2
+ export declare class MailMCPServer {
3
+ private readonly readOnly;
4
+ private server;
5
+ private services;
6
+ constructor(readOnly?: boolean);
7
+ private getService;
8
+ getTools(readOnly: boolean): ({
9
+ name: string;
10
+ description: string;
11
+ annotations: {
12
+ readOnlyHint: boolean;
13
+ destructiveHint: boolean;
14
+ };
15
+ inputSchema: {
16
+ type: string;
17
+ properties: {
18
+ accountId?: undefined;
19
+ folder?: undefined;
20
+ count?: undefined;
21
+ from?: undefined;
22
+ subject?: undefined;
23
+ since?: undefined;
24
+ before?: undefined;
25
+ keywords?: undefined;
26
+ uid?: undefined;
27
+ to?: undefined;
28
+ body?: undefined;
29
+ isHtml?: undefined;
30
+ cc?: undefined;
31
+ bcc?: undefined;
32
+ sourceFolder?: undefined;
33
+ targetFolder?: undefined;
34
+ addLabels?: undefined;
35
+ removeLabels?: undefined;
36
+ threadId?: undefined;
37
+ filename?: undefined;
38
+ clientId?: undefined;
39
+ clientSecret?: undefined;
40
+ refreshToken?: undefined;
41
+ tokenEndpoint?: undefined;
42
+ uids?: undefined;
43
+ action?: undefined;
44
+ };
45
+ required?: undefined;
46
+ };
47
+ } | {
48
+ name: string;
49
+ description: string;
50
+ annotations: {
51
+ readOnlyHint: boolean;
52
+ destructiveHint: boolean;
53
+ };
54
+ inputSchema: {
55
+ type: string;
56
+ properties: {
57
+ accountId: {
58
+ type: string;
59
+ description: string;
60
+ };
61
+ folder: {
62
+ type: string;
63
+ description: string;
64
+ };
65
+ count: {
66
+ type: string;
67
+ description: string;
68
+ };
69
+ from?: undefined;
70
+ subject?: undefined;
71
+ since?: undefined;
72
+ before?: undefined;
73
+ keywords?: undefined;
74
+ uid?: undefined;
75
+ to?: undefined;
76
+ body?: undefined;
77
+ isHtml?: undefined;
78
+ cc?: undefined;
79
+ bcc?: undefined;
80
+ sourceFolder?: undefined;
81
+ targetFolder?: undefined;
82
+ addLabels?: undefined;
83
+ removeLabels?: undefined;
84
+ threadId?: undefined;
85
+ filename?: undefined;
86
+ clientId?: undefined;
87
+ clientSecret?: undefined;
88
+ refreshToken?: undefined;
89
+ tokenEndpoint?: undefined;
90
+ uids?: undefined;
91
+ action?: undefined;
92
+ };
93
+ required: string[];
94
+ };
95
+ } | {
96
+ name: string;
97
+ description: string;
98
+ annotations: {
99
+ readOnlyHint: boolean;
100
+ destructiveHint: boolean;
101
+ };
102
+ inputSchema: {
103
+ type: string;
104
+ properties: {
105
+ accountId: {
106
+ type: string;
107
+ description: string;
108
+ };
109
+ folder: {
110
+ type: string;
111
+ description: string;
112
+ };
113
+ from: {
114
+ type: string;
115
+ description: string;
116
+ };
117
+ subject: {
118
+ type: string;
119
+ description: string;
120
+ };
121
+ since: {
122
+ type: string;
123
+ description: string;
124
+ };
125
+ before: {
126
+ type: string;
127
+ description: string;
128
+ };
129
+ keywords: {
130
+ type: string;
131
+ description: string;
132
+ };
133
+ count: {
134
+ type: string;
135
+ description: string;
136
+ };
137
+ uid?: undefined;
138
+ to?: undefined;
139
+ body?: undefined;
140
+ isHtml?: undefined;
141
+ cc?: undefined;
142
+ bcc?: undefined;
143
+ sourceFolder?: undefined;
144
+ targetFolder?: undefined;
145
+ addLabels?: undefined;
146
+ removeLabels?: undefined;
147
+ threadId?: undefined;
148
+ filename?: undefined;
149
+ clientId?: undefined;
150
+ clientSecret?: undefined;
151
+ refreshToken?: undefined;
152
+ tokenEndpoint?: undefined;
153
+ uids?: undefined;
154
+ action?: undefined;
155
+ };
156
+ required: string[];
157
+ };
158
+ } | {
159
+ name: string;
160
+ description: string;
161
+ annotations: {
162
+ readOnlyHint: boolean;
163
+ destructiveHint: boolean;
164
+ };
165
+ inputSchema: {
166
+ type: string;
167
+ properties: {
168
+ accountId: {
169
+ type: string;
170
+ description: string;
171
+ };
172
+ uid: {
173
+ type: string;
174
+ description: string;
175
+ };
176
+ folder: {
177
+ type: string;
178
+ description: string;
179
+ };
180
+ count?: undefined;
181
+ from?: undefined;
182
+ subject?: undefined;
183
+ since?: undefined;
184
+ before?: undefined;
185
+ keywords?: undefined;
186
+ to?: undefined;
187
+ body?: undefined;
188
+ isHtml?: undefined;
189
+ cc?: undefined;
190
+ bcc?: undefined;
191
+ sourceFolder?: undefined;
192
+ targetFolder?: undefined;
193
+ addLabels?: undefined;
194
+ removeLabels?: undefined;
195
+ threadId?: undefined;
196
+ filename?: undefined;
197
+ clientId?: undefined;
198
+ clientSecret?: undefined;
199
+ refreshToken?: undefined;
200
+ tokenEndpoint?: undefined;
201
+ uids?: undefined;
202
+ action?: undefined;
203
+ };
204
+ required: string[];
205
+ };
206
+ } | {
207
+ name: string;
208
+ description: string;
209
+ annotations: {
210
+ readOnlyHint: boolean;
211
+ destructiveHint: boolean;
212
+ };
213
+ inputSchema: {
214
+ type: string;
215
+ properties: {
216
+ accountId: {
217
+ type: string;
218
+ description: string;
219
+ };
220
+ to: {
221
+ type: string;
222
+ description: string;
223
+ };
224
+ subject: {
225
+ type: string;
226
+ description: string;
227
+ };
228
+ body: {
229
+ type: string;
230
+ description: string;
231
+ };
232
+ isHtml: {
233
+ type: string;
234
+ description: string;
235
+ };
236
+ cc: {
237
+ type: string;
238
+ description: string;
239
+ };
240
+ bcc: {
241
+ type: string;
242
+ description: string;
243
+ };
244
+ folder?: undefined;
245
+ count?: undefined;
246
+ from?: undefined;
247
+ since?: undefined;
248
+ before?: undefined;
249
+ keywords?: undefined;
250
+ uid?: undefined;
251
+ sourceFolder?: undefined;
252
+ targetFolder?: undefined;
253
+ addLabels?: undefined;
254
+ removeLabels?: undefined;
255
+ threadId?: undefined;
256
+ filename?: undefined;
257
+ clientId?: undefined;
258
+ clientSecret?: undefined;
259
+ refreshToken?: undefined;
260
+ tokenEndpoint?: undefined;
261
+ uids?: undefined;
262
+ action?: undefined;
263
+ };
264
+ required: string[];
265
+ };
266
+ } | {
267
+ name: string;
268
+ description: string;
269
+ annotations: {
270
+ readOnlyHint: boolean;
271
+ destructiveHint: boolean;
272
+ };
273
+ inputSchema: {
274
+ type: string;
275
+ properties: {
276
+ accountId: {
277
+ type: string;
278
+ description: string;
279
+ };
280
+ folder?: undefined;
281
+ count?: undefined;
282
+ from?: undefined;
283
+ subject?: undefined;
284
+ since?: undefined;
285
+ before?: undefined;
286
+ keywords?: undefined;
287
+ uid?: undefined;
288
+ to?: undefined;
289
+ body?: undefined;
290
+ isHtml?: undefined;
291
+ cc?: undefined;
292
+ bcc?: undefined;
293
+ sourceFolder?: undefined;
294
+ targetFolder?: undefined;
295
+ addLabels?: undefined;
296
+ removeLabels?: undefined;
297
+ threadId?: undefined;
298
+ filename?: undefined;
299
+ clientId?: undefined;
300
+ clientSecret?: undefined;
301
+ refreshToken?: undefined;
302
+ tokenEndpoint?: undefined;
303
+ uids?: undefined;
304
+ action?: undefined;
305
+ };
306
+ required: string[];
307
+ };
308
+ } | {
309
+ name: string;
310
+ description: string;
311
+ annotations: {
312
+ readOnlyHint: boolean;
313
+ destructiveHint: boolean;
314
+ };
315
+ inputSchema: {
316
+ type: string;
317
+ properties: {
318
+ accountId: {
319
+ type: string;
320
+ description: string;
321
+ };
322
+ uid: {
323
+ type: string;
324
+ description: string;
325
+ };
326
+ sourceFolder: {
327
+ type: string;
328
+ description: string;
329
+ };
330
+ targetFolder: {
331
+ type: string;
332
+ description: string;
333
+ };
334
+ folder?: undefined;
335
+ count?: undefined;
336
+ from?: undefined;
337
+ subject?: undefined;
338
+ since?: undefined;
339
+ before?: undefined;
340
+ keywords?: undefined;
341
+ to?: undefined;
342
+ body?: undefined;
343
+ isHtml?: undefined;
344
+ cc?: undefined;
345
+ bcc?: undefined;
346
+ addLabels?: undefined;
347
+ removeLabels?: undefined;
348
+ threadId?: undefined;
349
+ filename?: undefined;
350
+ clientId?: undefined;
351
+ clientSecret?: undefined;
352
+ refreshToken?: undefined;
353
+ tokenEndpoint?: undefined;
354
+ uids?: undefined;
355
+ action?: undefined;
356
+ };
357
+ required: string[];
358
+ };
359
+ } | {
360
+ name: string;
361
+ description: string;
362
+ annotations: {
363
+ readOnlyHint: boolean;
364
+ destructiveHint: boolean;
365
+ };
366
+ inputSchema: {
367
+ type: string;
368
+ properties: {
369
+ accountId: {
370
+ type: string;
371
+ description: string;
372
+ };
373
+ uid: {
374
+ type: string;
375
+ description: string;
376
+ };
377
+ folder: {
378
+ type: string;
379
+ description: string;
380
+ };
381
+ addLabels: {
382
+ type: string;
383
+ items: {
384
+ type: string;
385
+ };
386
+ description: string;
387
+ };
388
+ removeLabels: {
389
+ type: string;
390
+ items: {
391
+ type: string;
392
+ };
393
+ description: string;
394
+ };
395
+ count?: undefined;
396
+ from?: undefined;
397
+ subject?: undefined;
398
+ since?: undefined;
399
+ before?: undefined;
400
+ keywords?: undefined;
401
+ to?: undefined;
402
+ body?: undefined;
403
+ isHtml?: undefined;
404
+ cc?: undefined;
405
+ bcc?: undefined;
406
+ sourceFolder?: undefined;
407
+ targetFolder?: undefined;
408
+ threadId?: undefined;
409
+ filename?: undefined;
410
+ clientId?: undefined;
411
+ clientSecret?: undefined;
412
+ refreshToken?: undefined;
413
+ tokenEndpoint?: undefined;
414
+ uids?: undefined;
415
+ action?: undefined;
416
+ };
417
+ required: string[];
418
+ };
419
+ } | {
420
+ name: string;
421
+ description: string;
422
+ annotations: {
423
+ readOnlyHint: boolean;
424
+ destructiveHint: boolean;
425
+ };
426
+ inputSchema: {
427
+ type: string;
428
+ properties: {
429
+ accountId: {
430
+ type: string;
431
+ description: string;
432
+ };
433
+ threadId: {
434
+ type: string;
435
+ description: string;
436
+ };
437
+ folder: {
438
+ type: string;
439
+ description: string;
440
+ };
441
+ count?: undefined;
442
+ from?: undefined;
443
+ subject?: undefined;
444
+ since?: undefined;
445
+ before?: undefined;
446
+ keywords?: undefined;
447
+ uid?: undefined;
448
+ to?: undefined;
449
+ body?: undefined;
450
+ isHtml?: undefined;
451
+ cc?: undefined;
452
+ bcc?: undefined;
453
+ sourceFolder?: undefined;
454
+ targetFolder?: undefined;
455
+ addLabels?: undefined;
456
+ removeLabels?: undefined;
457
+ filename?: undefined;
458
+ clientId?: undefined;
459
+ clientSecret?: undefined;
460
+ refreshToken?: undefined;
461
+ tokenEndpoint?: undefined;
462
+ uids?: undefined;
463
+ action?: undefined;
464
+ };
465
+ required: string[];
466
+ };
467
+ } | {
468
+ name: string;
469
+ description: string;
470
+ annotations: {
471
+ readOnlyHint: boolean;
472
+ destructiveHint: boolean;
473
+ };
474
+ inputSchema: {
475
+ type: string;
476
+ properties: {
477
+ accountId: {
478
+ type: string;
479
+ description: string;
480
+ };
481
+ uid: {
482
+ type: string;
483
+ description: string;
484
+ };
485
+ filename: {
486
+ type: string;
487
+ description: string;
488
+ };
489
+ folder: {
490
+ type: string;
491
+ description: string;
492
+ };
493
+ count?: undefined;
494
+ from?: undefined;
495
+ subject?: undefined;
496
+ since?: undefined;
497
+ before?: undefined;
498
+ keywords?: undefined;
499
+ to?: undefined;
500
+ body?: undefined;
501
+ isHtml?: undefined;
502
+ cc?: undefined;
503
+ bcc?: undefined;
504
+ sourceFolder?: undefined;
505
+ targetFolder?: undefined;
506
+ addLabels?: undefined;
507
+ removeLabels?: undefined;
508
+ threadId?: undefined;
509
+ clientId?: undefined;
510
+ clientSecret?: undefined;
511
+ refreshToken?: undefined;
512
+ tokenEndpoint?: undefined;
513
+ uids?: undefined;
514
+ action?: undefined;
515
+ };
516
+ required: string[];
517
+ };
518
+ } | {
519
+ name: string;
520
+ description: string;
521
+ annotations: {
522
+ readOnlyHint: boolean;
523
+ destructiveHint: boolean;
524
+ };
525
+ inputSchema: {
526
+ type: string;
527
+ properties: {
528
+ accountId: {
529
+ type: string;
530
+ description: string;
531
+ };
532
+ clientId: {
533
+ type: string;
534
+ description: string;
535
+ };
536
+ clientSecret: {
537
+ type: string;
538
+ description: string;
539
+ };
540
+ refreshToken: {
541
+ type: string;
542
+ description: string;
543
+ };
544
+ tokenEndpoint: {
545
+ type: string;
546
+ description: string;
547
+ };
548
+ folder?: undefined;
549
+ count?: undefined;
550
+ from?: undefined;
551
+ subject?: undefined;
552
+ since?: undefined;
553
+ before?: undefined;
554
+ keywords?: undefined;
555
+ uid?: undefined;
556
+ to?: undefined;
557
+ body?: undefined;
558
+ isHtml?: undefined;
559
+ cc?: undefined;
560
+ bcc?: undefined;
561
+ sourceFolder?: undefined;
562
+ targetFolder?: undefined;
563
+ addLabels?: undefined;
564
+ removeLabels?: undefined;
565
+ threadId?: undefined;
566
+ filename?: undefined;
567
+ uids?: undefined;
568
+ action?: undefined;
569
+ };
570
+ required: string[];
571
+ };
572
+ } | {
573
+ name: string;
574
+ description: string;
575
+ annotations: {
576
+ readOnlyHint: boolean;
577
+ destructiveHint: boolean;
578
+ };
579
+ inputSchema: {
580
+ type: string;
581
+ properties: {
582
+ accountId: {
583
+ type: string;
584
+ description: string;
585
+ };
586
+ uids: {
587
+ type: string;
588
+ items: {
589
+ type: string;
590
+ };
591
+ description: string;
592
+ };
593
+ folder: {
594
+ type: string;
595
+ description: string;
596
+ };
597
+ action: {
598
+ type: string;
599
+ enum: string[];
600
+ description: string;
601
+ };
602
+ targetFolder: {
603
+ type: string;
604
+ description: string;
605
+ };
606
+ addLabels: {
607
+ type: string;
608
+ items: {
609
+ type: string;
610
+ };
611
+ description: string;
612
+ };
613
+ removeLabels: {
614
+ type: string;
615
+ items: {
616
+ type: string;
617
+ };
618
+ description: string;
619
+ };
620
+ count?: undefined;
621
+ from?: undefined;
622
+ subject?: undefined;
623
+ since?: undefined;
624
+ before?: undefined;
625
+ keywords?: undefined;
626
+ uid?: undefined;
627
+ to?: undefined;
628
+ body?: undefined;
629
+ isHtml?: undefined;
630
+ cc?: undefined;
631
+ bcc?: undefined;
632
+ sourceFolder?: undefined;
633
+ threadId?: undefined;
634
+ filename?: undefined;
635
+ clientId?: undefined;
636
+ clientSecret?: undefined;
637
+ refreshToken?: undefined;
638
+ tokenEndpoint?: undefined;
639
+ };
640
+ required: string[];
641
+ };
642
+ })[];
643
+ dispatchTool(name: string, readOnly: boolean, args: Record<string, unknown>): Promise<{
644
+ content: {
645
+ type: string;
646
+ text: string;
647
+ }[];
648
+ isError: boolean;
649
+ } | {
650
+ content: {
651
+ type: string;
652
+ text: string;
653
+ }[];
654
+ isError?: undefined;
655
+ }>;
656
+ private setupToolHandlers;
657
+ run(): Promise<void>;
658
+ }