@softeria/ms-365-mcp-server 0.89.0 → 0.90.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.
@@ -500,6 +500,27 @@
500
500
  "scopes": ["Files.ReadWrite"],
501
501
  "llmTip": "Shares a file or folder with specific users. Body: { recipients: [{ email: 'user@example.com' }], roles: ['read'], sendInvitation: true, message: 'Please review this file.' }. Roles: 'read', 'write', 'owner'. Set requireSignIn to true to require authentication."
502
502
  },
503
+ {
504
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/createLink",
505
+ "method": "post",
506
+ "toolName": "create-drive-item-share-link",
507
+ "scopes": ["Files.ReadWrite"],
508
+ "llmTip": "Create a shareable link for a file or folder WITHOUT sending an email invitation. Body: { type: 'view' | 'edit' | 'embed', scope: 'anonymous' | 'organization' | 'users', password?: string, expirationDateTime?: ISO-8601, retainInheritedPermissions?: boolean }. Returns a permission with link.webUrl. Pair with share-drive-item when you want to grant explicit access; use this when you only need a URL to paste into a doc/email/chat without triggering OneDrive notifications."
509
+ },
510
+ {
511
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/copy",
512
+ "method": "post",
513
+ "toolName": "copy-drive-item",
514
+ "scopes": ["Files.ReadWrite"],
515
+ "llmTip": "Asynchronously copy a file or folder to a new location and/or name. Body: { parentReference: { driveId: '...', id: '...' }, name?: 'New Name.xlsx' }. Returns 202 Accepted with a Location header pointing at a monitor URL for the async job. Ideal for duplicating templates (e.g. clone an Armhr Census Template per prospect), bulk file provisioning, or preserving an immutable snapshot of a working file."
516
+ },
517
+ {
518
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/preview",
519
+ "method": "post",
520
+ "toolName": "create-drive-item-preview",
521
+ "scopes": ["Files.Read"],
522
+ "llmTip": "Generate a short-lived embeddable preview URL for a file (Office docs, PDFs, images). Body: { page?: number | string, zoom?: number, viewer?: 'onedrive' | 'office' }. Returns getUrl (interactive) and postUrl (form-post). Useful for surfacing inline previews in summary emails or chat messages without needing the recipient to open the file."
523
+ },
503
524
  {
504
525
  "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/permissions",
505
526
  "method": "get",
@@ -763,46 +763,24 @@ const microsoft_graph_driveItemCollectionResponse = z.object({
763
763
  "@odata.nextLink": z.string().nullable(),
764
764
  value: z.array(microsoft_graph_driveItem)
765
765
  }).partial().passthrough();
766
- const create_upload_session_Body = z.object({ item: z.object({}).partial().passthrough() }).partial().passthrough();
767
- const microsoft_graph_uploadSession = z.object({
766
+ const copy_drive_item_Body = z.object({
767
+ name: z.string().nullable(),
768
+ parentReference: z.union([microsoft_graph_itemReference, z.object({}).partial().passthrough()]),
769
+ childrenOnly: z.boolean().nullable().default(false),
770
+ includeAllVersionHistory: z.boolean().nullable().default(false)
771
+ }).partial().passthrough();
772
+ const create_drive_item_share_link_Body = z.object({
773
+ type: z.string().nullable(),
774
+ scope: z.string().nullable(),
768
775
  expirationDateTime: z.string().regex(
769
776
  /^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
770
- ).datetime({ offset: true }).describe(
771
- "The date and time in UTC that the upload session expires. The complete file must be uploaded before this expiration time is reached. Each fragment uploaded during the session extends the expiration time."
772
- ).nullish(),
773
- nextExpectedRanges: z.array(z.string().nullable()).describe(
774
- "A collection of byte ranges that the server is missing for the file. These ranges are zero indexed and of the format 'start-end' (for example '0-26' to indicate the first 27 bytes of the file). When uploading files as Outlook attachments, instead of a collection of ranges, this property always indicates a single value '{start}', the location in the file where the next upload should begin."
775
- ).optional(),
776
- uploadUrl: z.string().describe("The URL endpoint that accepts PUT requests for byte ranges of the file.").nullish()
777
- }).passthrough();
778
- const BaseDeltaFunctionResponse = z.object({ "@odata.nextLink": z.string().nullable(), "@odata.deltaLink": z.string().nullable() }).partial().passthrough();
779
- const microsoft_graph_sensitivityLabelAssignmentMethod = z.enum([
780
- "standard",
781
- "privileged",
782
- "auto",
783
- "unknownFutureValue"
784
- ]);
785
- const microsoft_graph_sensitivityLabelAssignment = z.object({
786
- assignmentMethod: microsoft_graph_sensitivityLabelAssignmentMethod.optional(),
787
- sensitivityLabelId: z.string().describe("The unique identifier for the sensitivity label assigned to the file.").optional(),
788
- tenantId: z.string().describe(
789
- "The unique identifier for the tenant that hosts the file when this label is applied."
790
- ).optional()
791
- }).passthrough();
792
- const microsoft_graph_extractSensitivityLabelsResult = z.object({
793
- labels: z.array(microsoft_graph_sensitivityLabelAssignment).describe("List of sensitivity labels assigned to a file.").optional()
794
- }).passthrough();
795
- const share_drive_item_Body = z.object({
796
- requireSignIn: z.boolean().nullable().default(false),
797
- roles: z.array(z.string().nullable()),
798
- sendInvitation: z.boolean().nullable().default(false),
777
+ ).datetime({ offset: true }).nullable(),
778
+ password: z.string().nullable(),
799
779
  message: z.string().nullable(),
800
780
  recipients: z.array(z.object({}).partial().passthrough()),
801
781
  retainInheritedPermissions: z.boolean().nullable().default(false),
802
- expirationDateTime: z.string().nullable(),
803
- password: z.string().nullable()
782
+ sendNotification: z.boolean().nullable().default(false)
804
783
  }).partial().passthrough();
805
- const BaseCollectionPaginationCountResponse = z.object({ "@odata.count": z.number().int().nullable(), "@odata.nextLink": z.string().nullable() }).partial().passthrough();
806
784
  const microsoft_graph_sharePointGroupIdentity = z.object({
807
785
  displayName: z.string().describe(
808
786
  "The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta."
@@ -883,6 +861,56 @@ const microsoft_graph_permission = z.object({
883
861
  "A unique token that can be used to access this shared item via the shares API. Read-only."
884
862
  ).nullish()
885
863
  }).passthrough();
864
+ const create_upload_session_Body = z.object({ item: z.object({}).partial().passthrough() }).partial().passthrough();
865
+ const microsoft_graph_uploadSession = z.object({
866
+ expirationDateTime: z.string().regex(
867
+ /^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
868
+ ).datetime({ offset: true }).describe(
869
+ "The date and time in UTC that the upload session expires. The complete file must be uploaded before this expiration time is reached. Each fragment uploaded during the session extends the expiration time."
870
+ ).nullish(),
871
+ nextExpectedRanges: z.array(z.string().nullable()).describe(
872
+ "A collection of byte ranges that the server is missing for the file. These ranges are zero indexed and of the format 'start-end' (for example '0-26' to indicate the first 27 bytes of the file). When uploading files as Outlook attachments, instead of a collection of ranges, this property always indicates a single value '{start}', the location in the file where the next upload should begin."
873
+ ).optional(),
874
+ uploadUrl: z.string().describe("The URL endpoint that accepts PUT requests for byte ranges of the file.").nullish()
875
+ }).passthrough();
876
+ const BaseDeltaFunctionResponse = z.object({ "@odata.nextLink": z.string().nullable(), "@odata.deltaLink": z.string().nullable() }).partial().passthrough();
877
+ const microsoft_graph_sensitivityLabelAssignmentMethod = z.enum([
878
+ "standard",
879
+ "privileged",
880
+ "auto",
881
+ "unknownFutureValue"
882
+ ]);
883
+ const microsoft_graph_sensitivityLabelAssignment = z.object({
884
+ assignmentMethod: microsoft_graph_sensitivityLabelAssignmentMethod.optional(),
885
+ sensitivityLabelId: z.string().describe("The unique identifier for the sensitivity label assigned to the file.").optional(),
886
+ tenantId: z.string().describe(
887
+ "The unique identifier for the tenant that hosts the file when this label is applied."
888
+ ).optional()
889
+ }).passthrough();
890
+ const microsoft_graph_extractSensitivityLabelsResult = z.object({
891
+ labels: z.array(microsoft_graph_sensitivityLabelAssignment).describe("List of sensitivity labels assigned to a file.").optional()
892
+ }).passthrough();
893
+ const share_drive_item_Body = z.object({
894
+ requireSignIn: z.boolean().nullable().default(false),
895
+ roles: z.array(z.string().nullable()),
896
+ sendInvitation: z.boolean().nullable().default(false),
897
+ message: z.string().nullable(),
898
+ recipients: z.array(z.object({}).partial().passthrough()),
899
+ retainInheritedPermissions: z.boolean().nullable().default(false),
900
+ expirationDateTime: z.string().nullable(),
901
+ password: z.string().nullable()
902
+ }).partial().passthrough();
903
+ const BaseCollectionPaginationCountResponse = z.object({ "@odata.count": z.number().int().nullable(), "@odata.nextLink": z.string().nullable() }).partial().passthrough();
904
+ const ReferenceNumeric = z.enum(["-INF", "INF", "NaN"]);
905
+ const create_drive_item_preview_Body = z.object({
906
+ page: z.string().nullable(),
907
+ zoom: z.union([z.number(), z.string(), ReferenceNumeric])
908
+ }).partial().passthrough();
909
+ const microsoft_graph_itemPreviewInfo = z.object({
910
+ getUrl: z.string().nullish(),
911
+ postParameters: z.string().nullish(),
912
+ postUrl: z.string().nullish()
913
+ }).passthrough();
886
914
  const microsoft_graph_permissionCollectionResponse = z.object({
887
915
  "@odata.count": z.number().int().nullable(),
888
916
  "@odata.nextLink": z.string().nullable(),
@@ -3081,7 +3109,6 @@ const microsoft_graph_timeConstraint = z.object({
3081
3109
  activityDomain: microsoft_graph_activityDomain.optional(),
3082
3110
  timeSlots: z.array(microsoft_graph_timeSlot).optional()
3083
3111
  }).passthrough();
3084
- const ReferenceNumeric = z.enum(["-INF", "INF", "NaN"]);
3085
3112
  const find_meeting_times_Body = z.object({
3086
3113
  attendees: z.array(microsoft_graph_attendeeBase),
3087
3114
  locationConstraint: z.union([
@@ -4478,6 +4505,14 @@ const schemas = {
4478
4505
  microsoft_graph_pendingOperations,
4479
4506
  microsoft_graph_driveItem,
4480
4507
  microsoft_graph_driveItemCollectionResponse,
4508
+ copy_drive_item_Body,
4509
+ create_drive_item_share_link_Body,
4510
+ microsoft_graph_sharePointGroupIdentity,
4511
+ microsoft_graph_sharePointIdentity,
4512
+ microsoft_graph_sharePointIdentitySet,
4513
+ microsoft_graph_sharingInvitation,
4514
+ microsoft_graph_sharingLink,
4515
+ microsoft_graph_permission,
4481
4516
  create_upload_session_Body,
4482
4517
  microsoft_graph_uploadSession,
4483
4518
  BaseDeltaFunctionResponse,
@@ -4486,12 +4521,9 @@ const schemas = {
4486
4521
  microsoft_graph_extractSensitivityLabelsResult,
4487
4522
  share_drive_item_Body,
4488
4523
  BaseCollectionPaginationCountResponse,
4489
- microsoft_graph_sharePointGroupIdentity,
4490
- microsoft_graph_sharePointIdentity,
4491
- microsoft_graph_sharePointIdentitySet,
4492
- microsoft_graph_sharingInvitation,
4493
- microsoft_graph_sharingLink,
4494
- microsoft_graph_permission,
4524
+ ReferenceNumeric,
4525
+ create_drive_item_preview_Body,
4526
+ microsoft_graph_itemPreviewInfo,
4495
4527
  microsoft_graph_permissionCollectionResponse,
4496
4528
  microsoft_graph_publicationFacet,
4497
4529
  microsoft_graph_driveItemVersion,
@@ -4705,7 +4737,6 @@ const schemas = {
4705
4737
  microsoft_graph_locationConstraint,
4706
4738
  microsoft_graph_activityDomain,
4707
4739
  microsoft_graph_timeConstraint,
4708
- ReferenceNumeric,
4709
4740
  find_meeting_times_Body,
4710
4741
  send_mail_Body,
4711
4742
  microsoft_graph_externalLink,
@@ -5487,6 +5518,39 @@ const endpoints = makeApi([
5487
5518
  ],
5488
5519
  response: z.void()
5489
5520
  },
5521
+ {
5522
+ method: "post",
5523
+ path: "/drives/:driveId/items/:driveItemId/copy",
5524
+ alias: "copy-drive-item",
5525
+ description: `Invoke action copy`,
5526
+ requestFormat: "json",
5527
+ parameters: [
5528
+ {
5529
+ name: "body",
5530
+ description: `Action parameters`,
5531
+ type: "Body",
5532
+ schema: copy_drive_item_Body
5533
+ }
5534
+ ],
5535
+ response: z.void()
5536
+ },
5537
+ {
5538
+ method: "post",
5539
+ path: "/drives/:driveId/items/:driveItemId/createLink",
5540
+ alias: "create-drive-item-share-link",
5541
+ description: `Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application.
5542
+ If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors.`,
5543
+ requestFormat: "json",
5544
+ parameters: [
5545
+ {
5546
+ name: "body",
5547
+ description: `Action parameters`,
5548
+ type: "Body",
5549
+ schema: create_drive_item_share_link_Body
5550
+ }
5551
+ ],
5552
+ response: z.void()
5553
+ },
5490
5554
  {
5491
5555
  method: "post",
5492
5556
  path: "/drives/:driveId/items/:driveItemId/createUploadSession",
@@ -5646,6 +5710,22 @@ Items with this property set should be removed from your local state.`,
5646
5710
  ],
5647
5711
  response: z.void()
5648
5712
  },
5713
+ {
5714
+ method: "post",
5715
+ path: "/drives/:driveId/items/:driveItemId/preview",
5716
+ alias: "create-drive-item-preview",
5717
+ description: `Invoke action preview`,
5718
+ requestFormat: "json",
5719
+ parameters: [
5720
+ {
5721
+ name: "body",
5722
+ description: `Action parameters`,
5723
+ type: "Body",
5724
+ schema: create_drive_item_preview_Body
5725
+ }
5726
+ ],
5727
+ response: z.void()
5728
+ },
5649
5729
  {
5650
5730
  method: "get",
5651
5731
  path: "/drives/:driveId/items/:driveItemId/versions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.89.0",
3
+ "version": "0.90.0",
4
4
  "description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -500,6 +500,27 @@
500
500
  "scopes": ["Files.ReadWrite"],
501
501
  "llmTip": "Shares a file or folder with specific users. Body: { recipients: [{ email: 'user@example.com' }], roles: ['read'], sendInvitation: true, message: 'Please review this file.' }. Roles: 'read', 'write', 'owner'. Set requireSignIn to true to require authentication."
502
502
  },
503
+ {
504
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/createLink",
505
+ "method": "post",
506
+ "toolName": "create-drive-item-share-link",
507
+ "scopes": ["Files.ReadWrite"],
508
+ "llmTip": "Create a shareable link for a file or folder WITHOUT sending an email invitation. Body: { type: 'view' | 'edit' | 'embed', scope: 'anonymous' | 'organization' | 'users', password?: string, expirationDateTime?: ISO-8601, retainInheritedPermissions?: boolean }. Returns a permission with link.webUrl. Pair with share-drive-item when you want to grant explicit access; use this when you only need a URL to paste into a doc/email/chat without triggering OneDrive notifications."
509
+ },
510
+ {
511
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/copy",
512
+ "method": "post",
513
+ "toolName": "copy-drive-item",
514
+ "scopes": ["Files.ReadWrite"],
515
+ "llmTip": "Asynchronously copy a file or folder to a new location and/or name. Body: { parentReference: { driveId: '...', id: '...' }, name?: 'New Name.xlsx' }. Returns 202 Accepted with a Location header pointing at a monitor URL for the async job. Ideal for duplicating templates (e.g. clone an Armhr Census Template per prospect), bulk file provisioning, or preserving an immutable snapshot of a working file."
516
+ },
517
+ {
518
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/preview",
519
+ "method": "post",
520
+ "toolName": "create-drive-item-preview",
521
+ "scopes": ["Files.Read"],
522
+ "llmTip": "Generate a short-lived embeddable preview URL for a file (Office docs, PDFs, images). Body: { page?: number | string, zoom?: number, viewer?: 'onedrive' | 'office' }. Returns getUrl (interactive) and postUrl (form-post). Useful for surfacing inline previews in summary emails or chat messages without needing the recipient to open the file."
523
+ },
503
524
  {
504
525
  "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/permissions",
505
526
  "method": "get",