@sam2kb/m365-mcp 1.0.4 → 1.0.6

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.
@@ -1,40 +1,100 @@
1
1
  /**
2
- * Contacts tools — list, search, read, create, update, delete
2
+ * Contacts tools — rich contact CRUD, categories, and contact folders.
3
3
  */
4
4
  import type { GraphClient } from "../graph.js";
5
+ interface ContactLocation {
6
+ folderId?: string;
7
+ parentFolderId?: string;
8
+ }
9
+ interface PhysicalAddressInput {
10
+ street?: string;
11
+ city?: string;
12
+ state?: string;
13
+ countryOrRegion?: string;
14
+ postalCode?: string;
15
+ postOfficeBox?: string;
16
+ }
17
+ interface ContactInput extends ContactLocation {
18
+ givenName?: string;
19
+ middleName?: string;
20
+ surname?: string;
21
+ title?: string;
22
+ generation?: string;
23
+ displayName?: string;
24
+ nickName?: string;
25
+ email?: string;
26
+ emailAddresses?: Array<{
27
+ name?: string;
28
+ address: string;
29
+ }>;
30
+ mobilePhone?: string;
31
+ businessPhone?: string;
32
+ businessPhones?: string[];
33
+ homePhones?: string[];
34
+ company?: string;
35
+ companyName?: string;
36
+ jobTitle?: string;
37
+ department?: string;
38
+ officeLocation?: string;
39
+ profession?: string;
40
+ businessHomePage?: string;
41
+ notes?: string;
42
+ personalNotes?: string;
43
+ birthday?: string;
44
+ spouseName?: string;
45
+ assistantName?: string;
46
+ manager?: string;
47
+ children?: string[];
48
+ categories?: string[];
49
+ imAddresses?: string[];
50
+ fileAs?: string;
51
+ homeAddress?: PhysicalAddressInput;
52
+ businessAddress?: PhysicalAddressInput;
53
+ otherAddress?: PhysicalAddressInput;
54
+ }
55
+ interface ContactUpdateInput extends ContactInput {
56
+ contactId: string;
57
+ }
58
+ type CategoryMatch = "any" | "all";
59
+ interface CategoryFilter {
60
+ category?: string;
61
+ categories?: string[];
62
+ categoryMatch?: CategoryMatch;
63
+ }
5
64
  export declare function registerContactsTools(client: GraphClient): {
6
- contacts_list(args: {
65
+ contacts_list(args: ContactLocation & CategoryFilter & {
7
66
  top?: number;
8
- folderId?: string;
9
67
  }): Promise<string>;
10
- contacts_search(args: {
68
+ contacts_search(args: ContactLocation & CategoryFilter & {
11
69
  query: string;
12
70
  top?: number;
13
71
  }): Promise<string>;
14
- contacts_read(args: {
72
+ contacts_read(args: ContactLocation & {
15
73
  contactId: string;
16
74
  }): Promise<string>;
17
- contacts_create(args: {
18
- givenName?: string;
19
- surname?: string;
20
- email?: string;
21
- company?: string;
22
- jobTitle?: string;
23
- mobilePhone?: string;
24
- businessPhone?: string;
25
- notes?: string;
26
- }): Promise<string>;
27
- contacts_update(args: {
75
+ contacts_create(args: ContactInput): Promise<string>;
76
+ contacts_update(args: ContactUpdateInput): Promise<string>;
77
+ contacts_delete(args: ContactLocation & {
28
78
  contactId: string;
29
- givenName?: string;
30
- surname?: string;
31
- email?: string;
32
- company?: string;
33
- jobTitle?: string;
34
- mobilePhone?: string;
35
79
  }): Promise<string>;
36
- contacts_delete(args: {
37
- contactId: string;
80
+ contacts_categories_list(args?: ContactLocation): Promise<string>;
81
+ contacts_folders_list(args?: {
82
+ parentFolderId?: string;
83
+ top?: number;
84
+ }): Promise<string>;
85
+ contacts_folder_create(args: {
86
+ parentFolderId: string;
87
+ displayName: string;
88
+ }): Promise<string>;
89
+ contacts_folder_update(args: {
90
+ folderId: string;
91
+ parentFolderId?: string;
92
+ displayName?: string;
93
+ moveToParentFolderId?: string;
94
+ }): Promise<string>;
95
+ contacts_folder_delete(args: {
96
+ folderId: string;
97
+ parentFolderId?: string;
38
98
  }): Promise<string>;
39
99
  };
40
100
  export declare const contactsToolSchemas: ({
@@ -43,25 +103,43 @@ export declare const contactsToolSchemas: ({
43
103
  inputSchema: {
44
104
  type: string;
45
105
  properties: {
46
- top: {
106
+ folderId: {
47
107
  type: string;
48
108
  description: string;
49
- default: number;
50
109
  };
51
- folderId: {
110
+ parentFolderId: {
111
+ type: string;
112
+ description: string;
113
+ };
114
+ category: {
115
+ type: string;
116
+ minLength: number;
117
+ description: string;
118
+ };
119
+ categories: {
120
+ type: string;
121
+ minItems: number;
122
+ uniqueItems: boolean;
123
+ description: string;
124
+ items: {
125
+ type: string;
126
+ minLength: number;
127
+ };
128
+ };
129
+ categoryMatch: {
52
130
  type: string;
131
+ enum: string[];
132
+ default: string;
53
133
  description: string;
54
134
  };
55
- query?: undefined;
56
- contactId?: undefined;
57
- givenName?: undefined;
58
- surname?: undefined;
59
- email?: undefined;
60
- company?: undefined;
61
- jobTitle?: undefined;
62
- mobilePhone?: undefined;
63
- businessPhone?: undefined;
64
- notes?: undefined;
135
+ top: {
136
+ type: string;
137
+ minimum: number;
138
+ maximum: number;
139
+ default: number;
140
+ };
141
+ displayName?: undefined;
142
+ moveToParentFolderId?: undefined;
65
143
  };
66
144
  required?: undefined;
67
145
  };
@@ -71,25 +149,46 @@ export declare const contactsToolSchemas: ({
71
149
  inputSchema: {
72
150
  type: string;
73
151
  properties: {
74
- query: {
152
+ folderId: {
75
153
  type: string;
76
154
  description: string;
77
155
  };
78
- top: {
156
+ parentFolderId: {
157
+ type: string;
158
+ description: string;
159
+ };
160
+ category: {
79
161
  type: string;
162
+ minLength: number;
80
163
  description: string;
164
+ };
165
+ categories: {
166
+ type: string;
167
+ minItems: number;
168
+ uniqueItems: boolean;
169
+ description: string;
170
+ items: {
171
+ type: string;
172
+ minLength: number;
173
+ };
174
+ };
175
+ categoryMatch: {
176
+ type: string;
177
+ enum: string[];
178
+ default: string;
179
+ description: string;
180
+ };
181
+ query: {
182
+ type: string;
183
+ };
184
+ top: {
185
+ type: string;
186
+ minimum: number;
187
+ maximum: number;
81
188
  default: number;
82
189
  };
83
- folderId?: undefined;
84
- contactId?: undefined;
85
- givenName?: undefined;
86
- surname?: undefined;
87
- email?: undefined;
88
- company?: undefined;
89
- jobTitle?: undefined;
90
- mobilePhone?: undefined;
91
- businessPhone?: undefined;
92
- notes?: undefined;
190
+ displayName?: undefined;
191
+ moveToParentFolderId?: undefined;
93
192
  };
94
193
  required: string[];
95
194
  };
@@ -99,21 +198,20 @@ export declare const contactsToolSchemas: ({
99
198
  inputSchema: {
100
199
  type: string;
101
200
  properties: {
102
- contactId: {
201
+ folderId: {
202
+ type: string;
203
+ description: string;
204
+ };
205
+ parentFolderId: {
103
206
  type: string;
104
207
  description: string;
105
208
  };
209
+ contactId: {
210
+ type: string;
211
+ };
106
212
  top?: undefined;
107
- folderId?: undefined;
108
- query?: undefined;
109
- givenName?: undefined;
110
- surname?: undefined;
111
- email?: undefined;
112
- company?: undefined;
113
- jobTitle?: undefined;
114
- mobilePhone?: undefined;
115
- businessPhone?: undefined;
116
- notes?: undefined;
213
+ displayName?: undefined;
214
+ moveToParentFolderId?: undefined;
117
215
  };
118
216
  required: string[];
119
217
  };
@@ -123,42 +221,221 @@ export declare const contactsToolSchemas: ({
123
221
  inputSchema: {
124
222
  type: string;
125
223
  properties: {
224
+ folderId: {
225
+ type: string;
226
+ description: string;
227
+ };
228
+ parentFolderId: {
229
+ type: string;
230
+ description: string;
231
+ };
126
232
  givenName: {
127
233
  type: string;
128
234
  description: string;
129
235
  };
236
+ middleName: {
237
+ type: string;
238
+ };
130
239
  surname: {
131
240
  type: string;
132
241
  description: string;
133
242
  };
243
+ title: {
244
+ type: string;
245
+ description: string;
246
+ };
247
+ generation: {
248
+ type: string;
249
+ description: string;
250
+ };
251
+ displayName: {
252
+ type: string;
253
+ };
254
+ nickName: {
255
+ type: string;
256
+ };
134
257
  email: {
135
258
  type: string;
136
259
  description: string;
137
260
  };
261
+ emailAddresses: {
262
+ type: string;
263
+ description: string;
264
+ items: {
265
+ type: string;
266
+ additionalProperties: boolean;
267
+ properties: {
268
+ name: {
269
+ type: string;
270
+ };
271
+ address: {
272
+ type: string;
273
+ };
274
+ };
275
+ required: string[];
276
+ };
277
+ };
278
+ mobilePhone: {
279
+ type: string;
280
+ };
281
+ businessPhone: {
282
+ type: string;
283
+ description: string;
284
+ };
285
+ businessPhones: {
286
+ type: string;
287
+ description: string;
288
+ items: {
289
+ type: string;
290
+ };
291
+ };
292
+ homePhones: {
293
+ type: string;
294
+ description: string;
295
+ items: {
296
+ type: string;
297
+ };
298
+ };
138
299
  company: {
139
300
  type: string;
140
301
  description: string;
141
302
  };
303
+ companyName: {
304
+ type: string;
305
+ };
142
306
  jobTitle: {
143
307
  type: string;
308
+ };
309
+ department: {
310
+ type: string;
311
+ };
312
+ officeLocation: {
313
+ type: string;
314
+ };
315
+ profession: {
316
+ type: string;
317
+ };
318
+ businessHomePage: {
319
+ type: string;
320
+ };
321
+ notes: {
322
+ type: string;
144
323
  description: string;
145
324
  };
146
- mobilePhone: {
325
+ personalNotes: {
326
+ type: string;
327
+ };
328
+ birthday: {
147
329
  type: string;
148
330
  description: string;
149
331
  };
150
- businessPhone: {
332
+ spouseName: {
333
+ type: string;
334
+ };
335
+ assistantName: {
336
+ type: string;
337
+ };
338
+ manager: {
339
+ type: string;
340
+ };
341
+ children: {
151
342
  type: string;
152
343
  description: string;
344
+ items: {
345
+ type: string;
346
+ };
153
347
  };
154
- notes: {
348
+ categories: {
155
349
  type: string;
156
350
  description: string;
351
+ items: {
352
+ type: string;
353
+ };
354
+ };
355
+ imAddresses: {
356
+ type: string;
357
+ description: string;
358
+ items: {
359
+ type: string;
360
+ };
361
+ };
362
+ fileAs: {
363
+ type: string;
364
+ };
365
+ homeAddress: {
366
+ type: string;
367
+ additionalProperties: boolean;
368
+ properties: {
369
+ street: {
370
+ type: string;
371
+ };
372
+ city: {
373
+ type: string;
374
+ };
375
+ state: {
376
+ type: string;
377
+ };
378
+ countryOrRegion: {
379
+ type: string;
380
+ };
381
+ postalCode: {
382
+ type: string;
383
+ };
384
+ postOfficeBox: {
385
+ type: string;
386
+ };
387
+ };
388
+ };
389
+ businessAddress: {
390
+ type: string;
391
+ additionalProperties: boolean;
392
+ properties: {
393
+ street: {
394
+ type: string;
395
+ };
396
+ city: {
397
+ type: string;
398
+ };
399
+ state: {
400
+ type: string;
401
+ };
402
+ countryOrRegion: {
403
+ type: string;
404
+ };
405
+ postalCode: {
406
+ type: string;
407
+ };
408
+ postOfficeBox: {
409
+ type: string;
410
+ };
411
+ };
412
+ };
413
+ otherAddress: {
414
+ type: string;
415
+ additionalProperties: boolean;
416
+ properties: {
417
+ street: {
418
+ type: string;
419
+ };
420
+ city: {
421
+ type: string;
422
+ };
423
+ state: {
424
+ type: string;
425
+ };
426
+ countryOrRegion: {
427
+ type: string;
428
+ };
429
+ postalCode: {
430
+ type: string;
431
+ };
432
+ postOfficeBox: {
433
+ type: string;
434
+ };
435
+ };
157
436
  };
158
437
  top?: undefined;
159
- folderId?: undefined;
160
- query?: undefined;
161
- contactId?: undefined;
438
+ moveToParentFolderId?: undefined;
162
439
  };
163
440
  required?: undefined;
164
441
  };
@@ -168,40 +445,330 @@ export declare const contactsToolSchemas: ({
168
445
  inputSchema: {
169
446
  type: string;
170
447
  properties: {
171
- contactId: {
448
+ folderId: {
449
+ type: string;
450
+ description: string;
451
+ };
452
+ parentFolderId: {
172
453
  type: string;
173
454
  description: string;
174
455
  };
175
456
  givenName: {
176
457
  type: string;
177
- description?: undefined;
458
+ description: string;
459
+ };
460
+ middleName: {
461
+ type: string;
178
462
  };
179
463
  surname: {
180
464
  type: string;
181
- description?: undefined;
465
+ description: string;
466
+ };
467
+ title: {
468
+ type: string;
469
+ description: string;
470
+ };
471
+ generation: {
472
+ type: string;
473
+ description: string;
474
+ };
475
+ displayName: {
476
+ type: string;
477
+ };
478
+ nickName: {
479
+ type: string;
182
480
  };
183
481
  email: {
184
482
  type: string;
185
- description?: undefined;
483
+ description: string;
484
+ };
485
+ emailAddresses: {
486
+ type: string;
487
+ description: string;
488
+ items: {
489
+ type: string;
490
+ additionalProperties: boolean;
491
+ properties: {
492
+ name: {
493
+ type: string;
494
+ };
495
+ address: {
496
+ type: string;
497
+ };
498
+ };
499
+ required: string[];
500
+ };
501
+ };
502
+ mobilePhone: {
503
+ type: string;
504
+ };
505
+ businessPhone: {
506
+ type: string;
507
+ description: string;
508
+ };
509
+ businessPhones: {
510
+ type: string;
511
+ description: string;
512
+ items: {
513
+ type: string;
514
+ };
515
+ };
516
+ homePhones: {
517
+ type: string;
518
+ description: string;
519
+ items: {
520
+ type: string;
521
+ };
186
522
  };
187
523
  company: {
188
524
  type: string;
189
- description?: undefined;
525
+ description: string;
526
+ };
527
+ companyName: {
528
+ type: string;
190
529
  };
191
530
  jobTitle: {
192
531
  type: string;
532
+ };
533
+ department: {
534
+ type: string;
535
+ };
536
+ officeLocation: {
537
+ type: string;
538
+ };
539
+ profession: {
540
+ type: string;
541
+ };
542
+ businessHomePage: {
543
+ type: string;
544
+ };
545
+ notes: {
546
+ type: string;
547
+ description: string;
548
+ };
549
+ personalNotes: {
550
+ type: string;
551
+ };
552
+ birthday: {
553
+ type: string;
554
+ description: string;
555
+ };
556
+ spouseName: {
557
+ type: string;
558
+ };
559
+ assistantName: {
560
+ type: string;
561
+ };
562
+ manager: {
563
+ type: string;
564
+ };
565
+ children: {
566
+ type: string;
567
+ description: string;
568
+ items: {
569
+ type: string;
570
+ };
571
+ };
572
+ categories: {
573
+ type: string;
574
+ description: string;
575
+ items: {
576
+ type: string;
577
+ };
578
+ };
579
+ imAddresses: {
580
+ type: string;
581
+ description: string;
582
+ items: {
583
+ type: string;
584
+ };
585
+ };
586
+ fileAs: {
587
+ type: string;
588
+ };
589
+ homeAddress: {
590
+ type: string;
591
+ additionalProperties: boolean;
592
+ properties: {
593
+ street: {
594
+ type: string;
595
+ };
596
+ city: {
597
+ type: string;
598
+ };
599
+ state: {
600
+ type: string;
601
+ };
602
+ countryOrRegion: {
603
+ type: string;
604
+ };
605
+ postalCode: {
606
+ type: string;
607
+ };
608
+ postOfficeBox: {
609
+ type: string;
610
+ };
611
+ };
612
+ };
613
+ businessAddress: {
614
+ type: string;
615
+ additionalProperties: boolean;
616
+ properties: {
617
+ street: {
618
+ type: string;
619
+ };
620
+ city: {
621
+ type: string;
622
+ };
623
+ state: {
624
+ type: string;
625
+ };
626
+ countryOrRegion: {
627
+ type: string;
628
+ };
629
+ postalCode: {
630
+ type: string;
631
+ };
632
+ postOfficeBox: {
633
+ type: string;
634
+ };
635
+ };
636
+ };
637
+ otherAddress: {
638
+ type: string;
639
+ additionalProperties: boolean;
640
+ properties: {
641
+ street: {
642
+ type: string;
643
+ };
644
+ city: {
645
+ type: string;
646
+ };
647
+ state: {
648
+ type: string;
649
+ };
650
+ countryOrRegion: {
651
+ type: string;
652
+ };
653
+ postalCode: {
654
+ type: string;
655
+ };
656
+ postOfficeBox: {
657
+ type: string;
658
+ };
659
+ };
660
+ };
661
+ contactId: {
662
+ type: string;
663
+ };
664
+ top?: undefined;
665
+ moveToParentFolderId?: undefined;
666
+ };
667
+ required: string[];
668
+ };
669
+ } | {
670
+ name: string;
671
+ description: string;
672
+ inputSchema: {
673
+ type: string;
674
+ properties: {
675
+ folderId: {
676
+ type: string;
677
+ description: string;
678
+ };
679
+ parentFolderId: {
680
+ type: string;
681
+ description: string;
682
+ };
683
+ top?: undefined;
684
+ displayName?: undefined;
685
+ moveToParentFolderId?: undefined;
686
+ };
687
+ required?: undefined;
688
+ };
689
+ } | {
690
+ name: string;
691
+ description: string;
692
+ inputSchema: {
693
+ type: string;
694
+ properties: {
695
+ parentFolderId: {
696
+ type: string;
193
697
  description?: undefined;
194
698
  };
195
- mobilePhone: {
699
+ top: {
700
+ type: string;
701
+ minimum: number;
702
+ maximum: number;
703
+ default: number;
704
+ };
705
+ displayName?: undefined;
706
+ folderId?: undefined;
707
+ moveToParentFolderId?: undefined;
708
+ };
709
+ required?: undefined;
710
+ };
711
+ } | {
712
+ name: string;
713
+ description: string;
714
+ inputSchema: {
715
+ type: string;
716
+ properties: {
717
+ parentFolderId: {
196
718
  type: string;
197
719
  description?: undefined;
198
720
  };
721
+ displayName: {
722
+ type: string;
723
+ };
199
724
  top?: undefined;
200
725
  folderId?: undefined;
201
- query?: undefined;
202
- businessPhone?: undefined;
203
- notes?: undefined;
726
+ moveToParentFolderId?: undefined;
727
+ };
728
+ required: string[];
729
+ };
730
+ } | {
731
+ name: string;
732
+ description: string;
733
+ inputSchema: {
734
+ type: string;
735
+ properties: {
736
+ folderId: {
737
+ type: string;
738
+ };
739
+ parentFolderId: {
740
+ type: string;
741
+ description: string;
742
+ };
743
+ displayName: {
744
+ type: string;
745
+ };
746
+ moveToParentFolderId: {
747
+ type: string;
748
+ description: string;
749
+ };
750
+ top?: undefined;
751
+ };
752
+ required: string[];
753
+ };
754
+ } | {
755
+ name: string;
756
+ description: string;
757
+ inputSchema: {
758
+ type: string;
759
+ properties: {
760
+ folderId: {
761
+ type: string;
762
+ };
763
+ parentFolderId: {
764
+ type: string;
765
+ description: string;
766
+ };
767
+ top?: undefined;
768
+ displayName?: undefined;
769
+ moveToParentFolderId?: undefined;
204
770
  };
205
771
  required: string[];
206
772
  };
207
773
  })[];
774
+ export {};