@sam2kb/m365-mcp 1.0.3 → 1.0.5

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