@softeria/ms-365-mcp-server 0.20.3 → 0.21.1

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.
@@ -198,7 +198,7 @@
198
198
  "scopes": ["Files.Read"]
199
199
  },
200
200
  {
201
- "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/children/{driveItem-id1}/content",
201
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/content",
202
202
  "method": "get",
203
203
  "toolName": "download-onedrive-file-content",
204
204
  "scopes": ["Files.Read"]
@@ -660,8 +660,8 @@ const microsoft_graph_driveItem = z.object({
660
660
  webUrl: z.string().describe(
661
661
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
662
662
  ).nullish(),
663
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
664
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
663
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
664
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
665
665
  audio: microsoft_graph_audio.optional(),
666
666
  bundle: microsoft_graph_bundle.optional(),
667
667
  cTag: z.string().describe(
@@ -1757,8 +1757,8 @@ const microsoft_graph_listItem = z.object({
1757
1757
  webUrl: z.string().describe(
1758
1758
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
1759
1759
  ).nullish(),
1760
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1761
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1760
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1761
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1762
1762
  contentType: microsoft_graph_contentTypeInfo.optional(),
1763
1763
  sharepointIds: microsoft_graph_sharepointIds.optional(),
1764
1764
  analytics: microsoft_graph_itemAnalytics.optional(),
@@ -1877,8 +1877,8 @@ const microsoft_graph_list = z.lazy(
1877
1877
  webUrl: z.string().describe(
1878
1878
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
1879
1879
  ).nullish(),
1880
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1881
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1880
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1881
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1882
1882
  displayName: z.string().describe("The displayable title of the list.").nullish(),
1883
1883
  list: microsoft_graph_listInfo.optional(),
1884
1884
  sharepointIds: microsoft_graph_sharepointIds.optional(),
@@ -1909,8 +1909,8 @@ const microsoft_graph_drive = z.lazy(
1909
1909
  webUrl: z.string().describe(
1910
1910
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
1911
1911
  ).nullish(),
1912
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1913
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
1912
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1913
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
1914
1914
  driveType: z.string().describe(
1915
1915
  "Describes the type of drive represented by this resource. OneDrive personal drives return personal. OneDrive for Business returns business. SharePoint document libraries return documentLibrary. Read-only."
1916
1916
  ).nullish(),
@@ -2195,7 +2195,7 @@ const microsoft_graph_team = z.lazy(
2195
2195
  ).nullish(),
2196
2196
  allChannels: z.array(microsoft_graph_channel).describe("List of channels either hosted in or shared with the team (incoming channels).").optional(),
2197
2197
  channels: z.array(microsoft_graph_channel).describe("The collection of channels and messages associated with the team.").optional(),
2198
- group: microsoft_graph_group.describe("[Note: Simplified from 70 properties to 25 most common ones]").optional(),
2198
+ group: microsoft_graph_group.describe("[Note: Simplified from 71 properties to 25 most common ones]").optional(),
2199
2199
  incomingChannels: z.array(microsoft_graph_channel).describe("List of channels shared with the team.").optional(),
2200
2200
  installedApps: z.array(microsoft_graph_teamsAppInstallation).describe("The apps installed in this team.").optional(),
2201
2201
  members: z.array(microsoft_graph_conversationMember).describe("Members and owners of the team.").optional(),
@@ -3119,8 +3119,8 @@ const microsoft_graph_baseItem = z.object({
3119
3119
  webUrl: z.string().describe(
3120
3120
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
3121
3121
  ).nullish(),
3122
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
3123
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional()
3122
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
3123
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional()
3124
3124
  }).strict();
3125
3125
  const microsoft_graph_site = z.object({
3126
3126
  id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
@@ -3141,8 +3141,8 @@ const microsoft_graph_site = z.object({
3141
3141
  webUrl: z.string().describe(
3142
3142
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
3143
3143
  ).nullish(),
3144
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
3145
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
3144
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
3145
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
3146
3146
  isPersonalSite: z.boolean().describe("Identifies whether the site is personal or not. Read-only.").nullish(),
3147
3147
  root: microsoft_graph_root.optional(),
3148
3148
  sharepointIds: microsoft_graph_sharepointIds.optional(),
@@ -3622,7 +3622,7 @@ const endpoints = makeApi([
3622
3622
  method: "post",
3623
3623
  path: "/chats/:chatId/messages",
3624
3624
  alias: "send-chat-message",
3625
- description: `Send a new chatMessage in the specified channel or a chat.`,
3625
+ description: `Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.`,
3626
3626
  requestFormat: "json",
3627
3627
  parameters: [
3628
3628
  {
@@ -3884,7 +3884,7 @@ const endpoints = makeApi([
3884
3884
  },
3885
3885
  {
3886
3886
  method: "get",
3887
- path: "/drives/:driveId/items/:driveItemId/children/:driveItemId1/content",
3887
+ path: "/drives/:driveId/items/:driveItemId/content",
3888
3888
  alias: "download-onedrive-file-content",
3889
3889
  description: `The content stream, if the item represents a file.`,
3890
3890
  requestFormat: "json",
@@ -3951,8 +3951,8 @@ const endpoints = makeApi([
3951
3951
  webUrl: z.string().describe(
3952
3952
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
3953
3953
  ).nullish(),
3954
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
3955
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
3954
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
3955
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
3956
3956
  audio: microsoft_graph_audio.optional(),
3957
3957
  bundle: microsoft_graph_bundle.optional(),
3958
3958
  cTag: z.string().describe(
@@ -4217,8 +4217,8 @@ const endpoints = makeApi([
4217
4217
  webUrl: z.string().describe(
4218
4218
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
4219
4219
  ).nullish(),
4220
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
4221
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
4220
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
4221
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
4222
4222
  audio: microsoft_graph_audio.optional(),
4223
4223
  bundle: microsoft_graph_bundle.optional(),
4224
4224
  cTag: z.string().describe(
@@ -4251,7 +4251,7 @@ const endpoints = makeApi([
4251
4251
  method: "get",
4252
4252
  path: "/me",
4253
4253
  alias: "get-current-user",
4254
- description: `Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.`,
4254
+ description: `Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details.`,
4255
4255
  requestFormat: "json",
4256
4256
  parameters: [
4257
4257
  {
@@ -5611,13 +5611,8 @@ get the instances of an event. Currently, this operation returns event bodies in
5611
5611
  method: "post",
5612
5612
  path: "/me/events",
5613
5613
  alias: "create-calendar-event",
5614
- description: `Create an event in the user's default calendar or specified calendar. By default, the allowNewTimeProposals property is set to true when an event is created, which means invitees can propose a different date/time for the event. See Propose new meeting times for more information on how to propose a time, and how to receive and accept a new time proposal. You can specify the time zone for each of the start and end times of the event as part of their values, because the
5615
- start and end properties are of dateTimeTimeZone type. First find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server. When an event is sent, the server sends invitations to all the attendees. Setting the location in an event An Exchange administrator can set up a mailbox and an email address for a resource such as a meeting room, or equipment
5616
- like a projector. Users can then invite the resource as an attendee to a meeting. On behalf of the resource, the server accepts or rejects
5617
- the meeting request based on the free/busy schedule of the resource.
5618
- If the server accepts a meeting for the resource, it creates an event for the meeting in the resource's calendar. If the meeting is rescheduled,
5619
- the server automatically updates the event in the resource's calendar. Another advantage of setting up a mailbox for a resource is to control scheduling of the resource, for example, only executives
5620
- or their delegates can book a private meeting room. If you're organizing an event that involves a meeting location: Additionally, if the meeting location has been set up as a resource, or if the event involves some equipment that has been set up as a resource:`,
5614
+ description: `Create one or more multi-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources are supported: See Extended properties overview for more information about when to use
5615
+ open extensions or extended properties, and how to specify extended properties.`,
5621
5616
  requestFormat: "json",
5622
5617
  parameters: [
5623
5618
  {
@@ -6233,7 +6228,7 @@ or their delegates can book a private meeting room. If you're organizing an
6233
6228
  method: "get",
6234
6229
  path: "/me/messages",
6235
6230
  alias: "list-mail-messages",
6236
- description: `Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use $top to customize the page size, within the range of 1 and 1000. To improve the operation response time, use $select to specify the exact properties you need; see example 1 below. Fine-tune the values for $select and $top, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in @odata.nextLink to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the $skip value from the @odata.nextLink URL to manipulate responses. This API uses the $skip value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the $skip value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder:`,
6231
+ description: `Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance.`,
6237
6232
  requestFormat: "json",
6238
6233
  parameters: [
6239
6234
  {
@@ -6422,13 +6417,7 @@ or their delegates can book a private meeting room. If you're organizing an
6422
6417
  method: "get",
6423
6418
  path: "/me/messages/:messageId",
6424
6419
  alias: "get-mail-message",
6425
- description: `You can get a single resource instance expanded with a specific extended property, or a collection of resource instances
6426
- that include extended properties matching a filter. Using the query parameter $expand allows you to get the specified resource instance expanded with a specific extended
6427
- property. Use a $filter and eq operator on the id property to specify the extended property. This is currently the only way to get the singleValueLegacyExtendedProperty object that represents an extended property. To get resource instances that have certain extended properties, use the $filter query parameter and apply an eq operator
6428
- on the id property. In addition, for numeric extended properties, apply one of the following operators on the value property:
6429
- eq, ne,ge, gt, le, or lt. For string-typed extended properties, apply a contains, startswith, eq, or ne operator on value. The filter is applied to all instances of the resource in the signed-in user's mailbox. Filtering the string name (Name) in the id of an extended property is case-sensitive. Filtering the value property of an extended
6430
- property is case-insensitive. The following user resources are supported: As well as the following group resources: See Extended properties overview for more information about when to use
6431
- open extensions or extended properties, and how to specify extended properties.`,
6420
+ description: `Get the properties and relationships of the eventMessage object. Apply the $expand parameter on the event navigation property to get the associated event in an attendee's calendar. Currently, this operation returns event message bodies in only HTML format.`,
6432
6421
  requestFormat: "json",
6433
6422
  parameters: [
6434
6423
  {
@@ -8074,8 +8063,8 @@ A site resource represents a team site in SharePoint.`,
8074
8063
  webUrl: z.string().describe(
8075
8064
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
8076
8065
  ).nullish(),
8077
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
8078
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
8066
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
8067
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
8079
8068
  isPersonalSite: z.boolean().describe("Identifies whether the site is personal or not. Read-only.").nullish(),
8080
8069
  root: microsoft_graph_root.optional(),
8081
8070
  sharepointIds: microsoft_graph_sharepointIds.optional(),
@@ -8239,8 +8228,8 @@ A site resource represents a team site in SharePoint.`,
8239
8228
  webUrl: z.string().describe(
8240
8229
  "URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only."
8241
8230
  ).nullish(),
8242
- createdByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
8243
- lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 132 properties to 25 most common ones]").optional(),
8231
+ createdByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
8232
+ lastModifiedByUser: microsoft_graph_user.describe("[Note: Simplified from 133 properties to 25 most common ones]").optional(),
8244
8233
  isPersonalSite: z.boolean().describe("Identifies whether the site is personal or not. Read-only.").nullish(),
8245
8234
  root: microsoft_graph_root.optional(),
8246
8235
  sharepointIds: microsoft_graph_sharepointIds.optional(),
@@ -8712,7 +8701,7 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
8712
8701
  "List of channels either hosted in or shared with the team (incoming channels)."
8713
8702
  ).optional(),
8714
8703
  channels: z.array(microsoft_graph_channel).describe("The collection of channels and messages associated with the team.").optional(),
8715
- group: microsoft_graph_group.describe("[Note: Simplified from 70 properties to 25 most common ones]").optional(),
8704
+ group: microsoft_graph_group.describe("[Note: Simplified from 71 properties to 25 most common ones]").optional(),
8716
8705
  incomingChannels: z.array(microsoft_graph_channel).describe("List of channels shared with the team.").optional(),
8717
8706
  installedApps: z.array(microsoft_graph_teamsAppInstallation).describe("The apps installed in this team.").optional(),
8718
8707
  members: z.array(microsoft_graph_conversationMember).describe("Members and owners of the team.").optional(),
@@ -9044,7 +9033,7 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
9044
9033
  method: "get",
9045
9034
  path: "/users",
9046
9035
  alias: "list-users",
9047
- description: `List properties and relationships of the user objects.`,
9036
+ description: `Retrieve a list of user objects.`,
9048
9037
  requestFormat: "json",
9049
9038
  parameters: [
9050
9039
  {
@@ -98,7 +98,7 @@ class GraphClient {
98
98
  try {
99
99
  logger.info(`Calling ${endpoint} with options: ${JSON.stringify(options)}`);
100
100
  const result = await this.makeRequest(endpoint, options);
101
- return this.formatJsonResponse(result, options.rawResponse);
101
+ return this.formatJsonResponse(result, options.rawResponse, options.excludeResponse);
102
102
  } catch (error) {
103
103
  logger.error(`Error in Graph API request: ${error}`);
104
104
  return {
@@ -107,7 +107,12 @@ class GraphClient {
107
107
  };
108
108
  }
109
109
  }
110
- formatJsonResponse(data, rawResponse = false) {
110
+ formatJsonResponse(data, rawResponse = false, excludeResponse = false) {
111
+ if (excludeResponse) {
112
+ return {
113
+ content: [{ type: "text", text: JSON.stringify({ success: true }) }]
114
+ };
115
+ }
111
116
  if (data && typeof data === "object" && "_headers" in data) {
112
117
  const responseData = data;
113
118
  const meta = {};
@@ -43,6 +43,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
43
43
  paramSchema["fetchAllPages"] = z.boolean().describe("Automatically fetch all pages of results").optional();
44
44
  }
45
45
  paramSchema["includeHeaders"] = z.boolean().describe("Include response headers (including ETag) in the response metadata").optional();
46
+ paramSchema["excludeResponse"] = z.boolean().describe("Exclude the full response body and only return success or failure indication").optional();
46
47
  server.tool(
47
48
  tool.alias,
48
49
  tool.description || `Execute ${tool.method.toUpperCase()} request to ${tool.path}`,
@@ -67,6 +68,9 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
67
68
  if (paramName === "includeHeaders") {
68
69
  continue;
69
70
  }
71
+ if (paramName === "excludeResponse") {
72
+ continue;
73
+ }
70
74
  const odataParams = [
71
75
  "filter",
72
76
  "select",
@@ -136,6 +140,9 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
136
140
  if (params.includeHeaders === true) {
137
141
  options.includeHeaders = true;
138
142
  }
143
+ if (params.excludeResponse === true) {
144
+ options.excludeResponse = true;
145
+ }
139
146
  logger.info(`Making graph request to ${path2} with options: ${JSON.stringify(options)}`);
140
147
  let response = await graphClient.graphRequest(path2, options);
141
148
  const fetchAllPages = params.fetchAllPages === true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.20.3",
3
+ "version": "0.21.1",
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",
@@ -198,7 +198,7 @@
198
198
  "scopes": ["Files.Read"]
199
199
  },
200
200
  {
201
- "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/children/{driveItem-id1}/content",
201
+ "pathPattern": "/drives/{drive-id}/items/{driveItem-id}/content",
202
202
  "method": "get",
203
203
  "toolName": "download-onedrive-file-content",
204
204
  "scopes": ["Files.Read"]