@softeria/ms-365-mcp-server 0.17.0 → 0.19.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.
package/README.md CHANGED
@@ -71,6 +71,13 @@ get-sharepoint-site-drive-by-id, list-sharepoint-site-items, get-sharepoint-site
71
71
  get-sharepoint-site-list, list-sharepoint-site-list-items, get-sharepoint-site-list-item,
72
72
  get-sharepoint-sites-delta</sub>
73
73
 
74
+ **Shared Mailboxes**
75
+ <sub>list-shared-mailbox-messages, list-shared-mailbox-folder-messages, get-shared-mailbox-message,
76
+ send-shared-mailbox-mail</sub>
77
+
78
+ **User Management**
79
+ <sub>list-users</sub>
80
+
74
81
  ## Organization/Work Mode
75
82
 
76
83
  To access work/school features (Teams, SharePoint, etc.), enable organization mode using any of these flags:
@@ -89,6 +96,20 @@ To access work/school features (Teams, SharePoint, etc.), enable organization mo
89
96
  Organization mode must be enabled from the start to access work account features. Without this flag, only personal
90
97
  account features (email, calendar, OneDrive, etc.) are available.
91
98
 
99
+ ## Shared Mailbox Access
100
+
101
+ To access shared mailboxes, you need:
102
+
103
+ 1. **Organization mode**: Shared mailbox tools require `--org-mode` flag (work/school accounts only)
104
+ 2. **Delegated permissions**: `Mail.Read.Shared` or `Mail.Send.Shared` scopes
105
+ 3. **Exchange permissions**: The signed-in user must have been granted access to the shared mailbox
106
+ 4. **Usage**: Use the shared mailbox's email address as the `user-id` parameter in the shared mailbox tools
107
+
108
+ **Finding shared mailboxes**: Use the `list-users` tool to discover available users and shared mailboxes in your
109
+ organization.
110
+
111
+ Example: `list-shared-mailbox-messages` with `user-id` set to `shared-mailbox@company.com`
112
+
92
113
  ## Quick Start Example
93
114
 
94
115
  Test login in Claude Desktop:
@@ -127,6 +148,30 @@ claude mcp add ms365 -- npx -y @softeria/ms-365-mcp-server
127
148
  For other interfaces that support MCPs, please refer to their respective documentation for the correct
128
149
  integration method.
129
150
 
151
+ ### Local Development
152
+
153
+ For local development or testing:
154
+
155
+ ```bash
156
+ # From the project directory
157
+ claude mcp add ms -- npx tsx src/index.ts --org-mode
158
+ ```
159
+
160
+ Or configure Claude Desktop manually:
161
+
162
+ ```json
163
+ {
164
+ "mcpServers": {
165
+ "ms365": {
166
+ "command": "node",
167
+ "args": ["/absolute/path/to/ms-365-mcp-server/dist/index.js", "--org-mode"]
168
+ }
169
+ }
170
+ }
171
+ ```
172
+
173
+ > **Note**: Run `npm run build` after code changes to update the `dist/` folder.
174
+
130
175
  ### Authentication
131
176
 
132
177
  > ⚠️ You must authenticate before using tools.
@@ -244,6 +244,7 @@ function reduceProperties(schema, schemaName) {
244
244
  'body',
245
245
  'subject',
246
246
  'message',
247
+ 'attachments',
247
248
  'error',
248
249
  'code',
249
250
  'details',
@@ -31,7 +31,10 @@ function registerAuthTools(server, authManager) {
31
31
  content: [
32
32
  {
33
33
  type: "text",
34
- text
34
+ text: JSON.stringify({
35
+ error: "device_code_required",
36
+ message: text.trim()
37
+ })
35
38
  }
36
39
  ]
37
40
  };
@@ -29,6 +29,36 @@
29
29
  "toolName": "send-mail",
30
30
  "scopes": ["Mail.Send"]
31
31
  },
32
+ {
33
+ "pathPattern": "/users/{user-id}/messages",
34
+ "method": "get",
35
+ "toolName": "list-shared-mailbox-messages",
36
+ "workScopes": ["Mail.Read.Shared"]
37
+ },
38
+ {
39
+ "pathPattern": "/users/{user-id}/mailFolders/{mailFolder-id}/messages",
40
+ "method": "get",
41
+ "toolName": "list-shared-mailbox-folder-messages",
42
+ "workScopes": ["Mail.Read.Shared"]
43
+ },
44
+ {
45
+ "pathPattern": "/users/{user-id}/messages/{message-id}",
46
+ "method": "get",
47
+ "toolName": "get-shared-mailbox-message",
48
+ "workScopes": ["Mail.Read.Shared"]
49
+ },
50
+ {
51
+ "pathPattern": "/users/{user-id}/sendMail",
52
+ "method": "post",
53
+ "toolName": "send-shared-mailbox-mail",
54
+ "workScopes": ["Mail.Send.Shared"]
55
+ },
56
+ {
57
+ "pathPattern": "/users",
58
+ "method": "get",
59
+ "toolName": "list-users",
60
+ "workScopes": ["User.Read.All"]
61
+ },
32
62
  {
33
63
  "pathPattern": "/me/messages",
34
64
  "method": "post",
@@ -47,6 +77,30 @@
47
77
  "toolName": "move-mail-message",
48
78
  "scopes": ["Mail.ReadWrite"]
49
79
  },
80
+ {
81
+ "pathPattern": "/me/messages/{message-id}/attachments",
82
+ "method": "post",
83
+ "toolName": "add-mail-attachment",
84
+ "scopes": ["Mail.ReadWrite"]
85
+ },
86
+ {
87
+ "pathPattern": "/me/messages/{message-id}/attachments",
88
+ "method": "get",
89
+ "toolName": "list-mail-attachments",
90
+ "scopes": ["Mail.Read"]
91
+ },
92
+ {
93
+ "pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
94
+ "method": "get",
95
+ "toolName": "get-mail-attachment",
96
+ "scopes": ["Mail.Read"]
97
+ },
98
+ {
99
+ "pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
100
+ "method": "delete",
101
+ "toolName": "delete-mail-attachment",
102
+ "scopes": ["Mail.ReadWrite"]
103
+ },
50
104
  {
51
105
  "pathPattern": "/me/events",
52
106
  "method": "get",
@@ -355,7 +355,7 @@ const microsoft_graph_teamsTab = z.object({
355
355
  id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
356
356
  configuration: microsoft_graph_teamsTabConfiguration.optional(),
357
357
  displayName: z.string().describe("Name of the tab.").nullish(),
358
- webUrl: z.string().describe("Deep link URL of the tab instance. Read only.").nullish(),
358
+ webUrl: z.string().describe("Deep link URL of the tab instance. Read-only.").nullish(),
359
359
  teamsApp: microsoft_graph_teamsApp.optional()
360
360
  }).strict();
361
361
  const microsoft_graph_chat = z.object({
@@ -1161,6 +1161,18 @@ const microsoft_graph_eventType = z.enum([
1161
1161
  "exception",
1162
1162
  "seriesMaster"
1163
1163
  ]);
1164
+ const microsoft_graph_attachment = z.object({
1165
+ id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
1166
+ contentType: z.string().describe("The MIME type.").nullish(),
1167
+ isInline: z.boolean().describe("true if the attachment is an inline attachment; otherwise, false.").optional(),
1168
+ lastModifiedDateTime: z.string().regex(
1169
+ /^[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])$/
1170
+ ).datetime({ offset: true }).describe(
1171
+ "The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
1172
+ ).nullish(),
1173
+ name: z.string().describe("The attachment's file name.").nullish(),
1174
+ size: z.number().gte(-2147483648).lte(2147483647).describe("The length of the attachment in bytes.").optional()
1175
+ }).strict();
1164
1176
  const microsoft_graph_dateTimeTimeZone = z.object({
1165
1177
  dateTime: z.string().describe(
1166
1178
  "A single point of time in a combined date and time representation ({date}T{time}; for example, 2017-08-29T04:00:00.0000000)."
@@ -1274,6 +1286,9 @@ const microsoft_graph_event = z.object({
1274
1286
  type: microsoft_graph_eventType.optional(),
1275
1287
  body: microsoft_graph_itemBody.optional(),
1276
1288
  subject: z.string().describe("The text of the event's subject line.").nullish(),
1289
+ attachments: z.array(microsoft_graph_attachment).describe(
1290
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
1291
+ ).optional(),
1277
1292
  allowNewTimeProposals: z.boolean().describe(
1278
1293
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
1279
1294
  ).nullish(),
@@ -1314,10 +1329,7 @@ const microsoft_graph_event = z.object({
1314
1329
  onlineMeetingUrl: z.string().describe(
1315
1330
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
1316
1331
  ).nullish(),
1317
- organizer: microsoft_graph_recipient.optional(),
1318
- originalEndTimeZone: z.string().describe(
1319
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
1320
- ).nullish()
1332
+ organizer: microsoft_graph_recipient.optional()
1321
1333
  }).strict().passthrough();
1322
1334
  const microsoft_graph_multiValueLegacyExtendedProperty = z.object({
1323
1335
  id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
@@ -2291,6 +2303,7 @@ const microsoft_graph_internetMessageHeader = z.object({
2291
2303
  const microsoft_graph_message = z.object({
2292
2304
  body: microsoft_graph_itemBody.optional(),
2293
2305
  subject: z.string().describe("The subject of the message.").nullish(),
2306
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
2294
2307
  bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
2295
2308
  bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
2296
2309
  ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
@@ -2326,8 +2339,7 @@ const microsoft_graph_message = z.object({
2326
2339
  ).datetime({ offset: true }).describe(
2327
2340
  "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
2328
2341
  ).nullish(),
2329
- toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
2330
- uniqueBody: microsoft_graph_itemBody.optional()
2342
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
2331
2343
  }).strict().passthrough();
2332
2344
  const microsoft_graph_mailFolder = z.lazy(
2333
2345
  () => z.object({
@@ -2361,6 +2373,11 @@ const microsoft_graph_messageCollectionResponse = z.object({
2361
2373
  "@odata.nextLink": z.string().nullable(),
2362
2374
  value: z.array(microsoft_graph_message)
2363
2375
  }).partial().strict();
2376
+ const microsoft_graph_attachmentCollectionResponse = z.object({
2377
+ "@odata.count": z.number().int().nullable(),
2378
+ "@odata.nextLink": z.string().nullable(),
2379
+ value: z.array(microsoft_graph_attachment)
2380
+ }).partial().strict();
2364
2381
  const send_mail_Body = z.object({
2365
2382
  Message: microsoft_graph_message.describe(
2366
2383
  "[Note: Simplified from 30 properties to 25 most common ones]"
@@ -3104,6 +3121,11 @@ const microsoft_graph_conversationMemberCollectionResponse = z.object({
3104
3121
  "@odata.nextLink": z.string().nullable(),
3105
3122
  value: z.array(microsoft_graph_conversationMember)
3106
3123
  }).partial().strict();
3124
+ const microsoft_graph_userCollectionResponse = z.object({
3125
+ "@odata.count": z.number().int().nullable(),
3126
+ "@odata.nextLink": z.string().nullable(),
3127
+ value: z.array(microsoft_graph_user)
3128
+ }).partial().strict();
3107
3129
  const schemas = {
3108
3130
  microsoft_graph_chatType,
3109
3131
  microsoft_graph_teamworkUserIdentityType,
@@ -3231,6 +3253,7 @@ const schemas = {
3231
3253
  microsoft_graph_calendarRoleType,
3232
3254
  microsoft_graph_calendarPermission,
3233
3255
  microsoft_graph_eventType,
3256
+ microsoft_graph_attachment,
3234
3257
  microsoft_graph_dateTimeTimeZone,
3235
3258
  microsoft_graph_timeSlot,
3236
3259
  microsoft_graph_responseType,
@@ -3334,6 +3357,7 @@ const schemas = {
3334
3357
  microsoft_graph_mailFolder,
3335
3358
  microsoft_graph_mailFolderCollectionResponse,
3336
3359
  microsoft_graph_messageCollectionResponse,
3360
+ microsoft_graph_attachmentCollectionResponse,
3337
3361
  send_mail_Body,
3338
3362
  microsoft_graph_externalLink,
3339
3363
  microsoft_graph_notebookLinks,
@@ -3421,7 +3445,8 @@ const schemas = {
3421
3445
  microsoft_graph_listItemCollectionResponse,
3422
3446
  BaseDeltaFunctionResponse,
3423
3447
  microsoft_graph_channelCollectionResponse,
3424
- microsoft_graph_conversationMemberCollectionResponse
3448
+ microsoft_graph_conversationMemberCollectionResponse,
3449
+ microsoft_graph_userCollectionResponse
3425
3450
  };
3426
3451
  const endpoints = makeApi([
3427
3452
  {
@@ -4161,7 +4186,7 @@ const endpoints = makeApi([
4161
4186
  method: "get",
4162
4187
  path: "/me",
4163
4188
  alias: "get-current-user",
4164
- 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.`,
4189
+ description: `Returns the user or organizational contact assigned as the user&#x27;s manager. Optionally, you can expand the manager&#x27;s chain up to the root node.`,
4165
4190
  requestFormat: "json",
4166
4191
  parameters: [
4167
4192
  {
@@ -5011,6 +5036,9 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5011
5036
  type: microsoft_graph_eventType.optional(),
5012
5037
  body: microsoft_graph_itemBody.optional(),
5013
5038
  subject: z.string().describe("The text of the event's subject line.").nullish(),
5039
+ attachments: z.array(microsoft_graph_attachment).describe(
5040
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
5041
+ ).optional(),
5014
5042
  allowNewTimeProposals: z.boolean().describe(
5015
5043
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
5016
5044
  ).nullish(),
@@ -5053,10 +5081,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5053
5081
  onlineMeetingUrl: z.string().describe(
5054
5082
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
5055
5083
  ).nullish(),
5056
- organizer: microsoft_graph_recipient.optional(),
5057
- originalEndTimeZone: z.string().describe(
5058
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
5059
- ).nullish()
5084
+ organizer: microsoft_graph_recipient.optional()
5060
5085
  }).strict().passthrough()
5061
5086
  }
5062
5087
  ],
@@ -5069,6 +5094,9 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5069
5094
  type: microsoft_graph_eventType.optional(),
5070
5095
  body: microsoft_graph_itemBody.optional(),
5071
5096
  subject: z.string().describe("The text of the event's subject line.").nullish(),
5097
+ attachments: z.array(microsoft_graph_attachment).describe(
5098
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
5099
+ ).optional(),
5072
5100
  allowNewTimeProposals: z.boolean().describe(
5073
5101
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
5074
5102
  ).nullish(),
@@ -5111,10 +5139,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5111
5139
  onlineMeetingUrl: z.string().describe(
5112
5140
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
5113
5141
  ).nullish(),
5114
- organizer: microsoft_graph_recipient.optional(),
5115
- originalEndTimeZone: z.string().describe(
5116
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
5117
- ).nullish()
5142
+ organizer: microsoft_graph_recipient.optional()
5118
5143
  }).strict().passthrough()
5119
5144
  },
5120
5145
  {
@@ -5156,6 +5181,9 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5156
5181
  type: microsoft_graph_eventType.optional(),
5157
5182
  body: microsoft_graph_itemBody.optional(),
5158
5183
  subject: z.string().describe("The text of the event's subject line.").nullish(),
5184
+ attachments: z.array(microsoft_graph_attachment).describe(
5185
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
5186
+ ).optional(),
5159
5187
  allowNewTimeProposals: z.boolean().describe(
5160
5188
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
5161
5189
  ).nullish(),
@@ -5198,10 +5226,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5198
5226
  onlineMeetingUrl: z.string().describe(
5199
5227
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
5200
5228
  ).nullish(),
5201
- organizer: microsoft_graph_recipient.optional(),
5202
- originalEndTimeZone: z.string().describe(
5203
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
5204
- ).nullish()
5229
+ organizer: microsoft_graph_recipient.optional()
5205
5230
  }).strict().passthrough()
5206
5231
  },
5207
5232
  {
@@ -5231,6 +5256,9 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5231
5256
  type: microsoft_graph_eventType.optional(),
5232
5257
  body: microsoft_graph_itemBody.optional(),
5233
5258
  subject: z.string().describe("The text of the event's subject line.").nullish(),
5259
+ attachments: z.array(microsoft_graph_attachment).describe(
5260
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
5261
+ ).optional(),
5234
5262
  allowNewTimeProposals: z.boolean().describe(
5235
5263
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
5236
5264
  ).nullish(),
@@ -5273,10 +5301,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5273
5301
  onlineMeetingUrl: z.string().describe(
5274
5302
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
5275
5303
  ).nullish(),
5276
- organizer: microsoft_graph_recipient.optional(),
5277
- originalEndTimeZone: z.string().describe(
5278
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
5279
- ).nullish()
5304
+ organizer: microsoft_graph_recipient.optional()
5280
5305
  }).strict().passthrough()
5281
5306
  }
5282
5307
  ],
@@ -5289,6 +5314,9 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5289
5314
  type: microsoft_graph_eventType.optional(),
5290
5315
  body: microsoft_graph_itemBody.optional(),
5291
5316
  subject: z.string().describe("The text of the event's subject line.").nullish(),
5317
+ attachments: z.array(microsoft_graph_attachment).describe(
5318
+ "The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
5319
+ ).optional(),
5292
5320
  allowNewTimeProposals: z.boolean().describe(
5293
5321
  "true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
5294
5322
  ).nullish(),
@@ -5331,10 +5359,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5331
5359
  onlineMeetingUrl: z.string().describe(
5332
5360
  "A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future."
5333
5361
  ).nullish(),
5334
- organizer: microsoft_graph_recipient.optional(),
5335
- originalEndTimeZone: z.string().describe(
5336
- "The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook."
5337
- ).nullish()
5362
+ organizer: microsoft_graph_recipient.optional()
5338
5363
  }).strict().passthrough()
5339
5364
  },
5340
5365
  {
@@ -5658,7 +5683,11 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5658
5683
  method: "post",
5659
5684
  path: "/me/messages",
5660
5685
  alias: "create-draft-email",
5661
- description: `Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions.`,
5686
+ description: `Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:
5687
+ - Include an attachment to the message.
5688
+ - Update the draft later to add content to the body or change other message properties. When using MIME format:
5689
+ - Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.
5690
+ - /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message.`,
5662
5691
  requestFormat: "json",
5663
5692
  parameters: [
5664
5693
  {
@@ -5668,6 +5697,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5668
5697
  schema: z.object({
5669
5698
  body: microsoft_graph_itemBody.optional(),
5670
5699
  subject: z.string().describe("The subject of the message.").nullish(),
5700
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
5671
5701
  bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
5672
5702
  bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
5673
5703
  ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
@@ -5703,8 +5733,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5703
5733
  ).datetime({ offset: true }).describe(
5704
5734
  "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
5705
5735
  ).nullish(),
5706
- toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
5707
- uniqueBody: microsoft_graph_itemBody.optional()
5736
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
5708
5737
  }).strict().passthrough()
5709
5738
  }
5710
5739
  ],
@@ -5716,6 +5745,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5716
5745
  schema: z.object({
5717
5746
  body: microsoft_graph_itemBody.optional(),
5718
5747
  subject: z.string().describe("The subject of the message.").nullish(),
5748
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
5719
5749
  bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
5720
5750
  bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
5721
5751
  ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
@@ -5751,8 +5781,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5751
5781
  ).datetime({ offset: true }).describe(
5752
5782
  "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
5753
5783
  ).nullish(),
5754
- toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
5755
- uniqueBody: microsoft_graph_itemBody.optional()
5784
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
5756
5785
  }).strict().passthrough()
5757
5786
  },
5758
5787
  {
@@ -5771,13 +5800,7 @@ or their delegates can book a private meeting room. If you&#x27;re organizing an
5771
5800
  method: "get",
5772
5801
  path: "/me/messages/:messageId",
5773
5802
  alias: "get-mail-message",
5774
- description: `You can get a single resource instance expanded with a specific extended property, or a collection of resource instances
5775
- 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
5776
- 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
5777
- on the id property. In addition, for numeric extended properties, apply one of the following operators on the value property:
5778
- 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&#x27;s mailbox. Filtering the string name (Name) in the id of an extended property is case-sensitive. Filtering the value property of an extended
5779
- 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
5780
- open extensions or extended properties, and how to specify extended properties.`,
5803
+ 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&#x27;s calendar. Currently, this operation returns event message bodies in only HTML format.`,
5781
5804
  requestFormat: "json",
5782
5805
  parameters: [
5783
5806
  {
@@ -5799,6 +5822,7 @@ open extensions or extended properties, and how to specify extended properties.`
5799
5822
  schema: z.object({
5800
5823
  body: microsoft_graph_itemBody.optional(),
5801
5824
  subject: z.string().describe("The subject of the message.").nullish(),
5825
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
5802
5826
  bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
5803
5827
  bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
5804
5828
  ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
@@ -5834,8 +5858,7 @@ open extensions or extended properties, and how to specify extended properties.`
5834
5858
  ).datetime({ offset: true }).describe(
5835
5859
  "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
5836
5860
  ).nullish(),
5837
- toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
5838
- uniqueBody: microsoft_graph_itemBody.optional()
5861
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
5839
5862
  }).strict().passthrough()
5840
5863
  },
5841
5864
  {
@@ -5877,6 +5900,172 @@ open extensions or extended properties, and how to specify extended properties.`
5877
5900
  }
5878
5901
  ]
5879
5902
  },
5903
+ {
5904
+ method: "get",
5905
+ path: "/me/messages/:messageId/attachments",
5906
+ alias: "list-mail-attachments",
5907
+ description: `Retrieve a list of attachment objects attached to a message.`,
5908
+ requestFormat: "json",
5909
+ parameters: [
5910
+ {
5911
+ name: "$top",
5912
+ type: "Query",
5913
+ schema: z.number().int().gte(0).describe("Show only the first n items").optional()
5914
+ },
5915
+ {
5916
+ name: "$skip",
5917
+ type: "Query",
5918
+ schema: z.number().int().gte(0).describe("Skip the first n items").optional()
5919
+ },
5920
+ {
5921
+ name: "$search",
5922
+ type: "Query",
5923
+ schema: z.string().describe("Search items by search phrases").optional()
5924
+ },
5925
+ {
5926
+ name: "$filter",
5927
+ type: "Query",
5928
+ schema: z.string().describe("Filter items by property values").optional()
5929
+ },
5930
+ {
5931
+ name: "$count",
5932
+ type: "Query",
5933
+ schema: z.boolean().describe("Include count of items").optional()
5934
+ },
5935
+ {
5936
+ name: "$orderby",
5937
+ type: "Query",
5938
+ schema: z.array(z.string()).describe("Order items by property values").optional()
5939
+ },
5940
+ {
5941
+ name: "$select",
5942
+ type: "Query",
5943
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
5944
+ },
5945
+ {
5946
+ name: "$expand",
5947
+ type: "Query",
5948
+ schema: z.array(z.string()).describe("Expand related entities").optional()
5949
+ }
5950
+ ],
5951
+ response: z.void(),
5952
+ errors: [
5953
+ {
5954
+ status: NaN,
5955
+ description: `Retrieved collection`,
5956
+ schema: microsoft_graph_attachmentCollectionResponse
5957
+ },
5958
+ {
5959
+ status: NaN,
5960
+ description: `error`,
5961
+ schema: microsoft_graph_ODataErrors_ODataError
5962
+ },
5963
+ {
5964
+ status: NaN,
5965
+ description: `error`,
5966
+ schema: microsoft_graph_ODataErrors_ODataError
5967
+ }
5968
+ ]
5969
+ },
5970
+ {
5971
+ method: "post",
5972
+ path: "/me/messages/:messageId/attachments",
5973
+ alias: "add-mail-attachment",
5974
+ description: `Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachment
5975
+ resource. You can add an attachment to an existing message by posting to its attachments collection, or you can
5976
+ add an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB.`,
5977
+ requestFormat: "json",
5978
+ parameters: [
5979
+ {
5980
+ name: "body",
5981
+ description: `New navigation property`,
5982
+ type: "Body",
5983
+ schema: microsoft_graph_attachment
5984
+ }
5985
+ ],
5986
+ response: z.void(),
5987
+ errors: [
5988
+ {
5989
+ status: NaN,
5990
+ description: `Created navigation property.`,
5991
+ schema: microsoft_graph_attachment
5992
+ },
5993
+ {
5994
+ status: NaN,
5995
+ description: `error`,
5996
+ schema: microsoft_graph_ODataErrors_ODataError
5997
+ },
5998
+ {
5999
+ status: NaN,
6000
+ description: `error`,
6001
+ schema: microsoft_graph_ODataErrors_ODataError
6002
+ }
6003
+ ]
6004
+ },
6005
+ {
6006
+ method: "get",
6007
+ path: "/me/messages/:messageId/attachments/:attachmentId",
6008
+ alias: "get-mail-attachment",
6009
+ description: `Read the properties, relationships, or raw contents of an attachment that is attached to a user event, message, or group post. An attachment can be one of the following types: All these types of attachments are derived from the attachment resource.`,
6010
+ requestFormat: "json",
6011
+ parameters: [
6012
+ {
6013
+ name: "$select",
6014
+ type: "Query",
6015
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
6016
+ },
6017
+ {
6018
+ name: "$expand",
6019
+ type: "Query",
6020
+ schema: z.array(z.string()).describe("Expand related entities").optional()
6021
+ }
6022
+ ],
6023
+ response: z.void(),
6024
+ errors: [
6025
+ {
6026
+ status: NaN,
6027
+ description: `Retrieved navigation property`,
6028
+ schema: microsoft_graph_attachment
6029
+ },
6030
+ {
6031
+ status: NaN,
6032
+ description: `error`,
6033
+ schema: microsoft_graph_ODataErrors_ODataError
6034
+ },
6035
+ {
6036
+ status: NaN,
6037
+ description: `error`,
6038
+ schema: microsoft_graph_ODataErrors_ODataError
6039
+ }
6040
+ ]
6041
+ },
6042
+ {
6043
+ method: "delete",
6044
+ path: "/me/messages/:messageId/attachments/:attachmentId",
6045
+ alias: "delete-mail-attachment",
6046
+ description: `Delete navigation property attachments for me`,
6047
+ requestFormat: "json",
6048
+ parameters: [
6049
+ {
6050
+ name: "If-Match",
6051
+ type: "Header",
6052
+ schema: z.string().describe("ETag").optional()
6053
+ }
6054
+ ],
6055
+ response: z.void(),
6056
+ errors: [
6057
+ {
6058
+ status: NaN,
6059
+ description: `error`,
6060
+ schema: microsoft_graph_ODataErrors_ODataError
6061
+ },
6062
+ {
6063
+ status: NaN,
6064
+ description: `error`,
6065
+ schema: microsoft_graph_ODataErrors_ODataError
6066
+ }
6067
+ ]
6068
+ },
5880
6069
  {
5881
6070
  method: "post",
5882
6071
  path: "/me/messages/:messageId/move",
@@ -5899,6 +6088,7 @@ open extensions or extended properties, and how to specify extended properties.`
5899
6088
  schema: z.object({
5900
6089
  body: microsoft_graph_itemBody.optional(),
5901
6090
  subject: z.string().describe("The subject of the message.").nullish(),
6091
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
5902
6092
  bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
5903
6093
  bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
5904
6094
  ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
@@ -5934,8 +6124,7 @@ open extensions or extended properties, and how to specify extended properties.`
5934
6124
  ).datetime({ offset: true }).describe(
5935
6125
  "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
5936
6126
  ).nullish(),
5937
- toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional(),
5938
- uniqueBody: microsoft_graph_itemBody.optional()
6127
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
5939
6128
  }).strict().passthrough()
5940
6129
  },
5941
6130
  {
@@ -6545,7 +6734,7 @@ open extensions or extended properties, and how to specify extended properties.`
6545
6734
  method: "delete",
6546
6735
  path: "/me/todo/lists/:todoTaskListId/tasks/:todoTaskId",
6547
6736
  alias: "delete-todo-task",
6548
- description: `Deletes a todoTask object.`,
6737
+ description: `Delete a todoTask object.`,
6549
6738
  requestFormat: "json",
6550
6739
  parameters: [
6551
6740
  {
@@ -8219,6 +8408,324 @@ To monitor future changes, call the delta API by using the @odata.deltaLink in t
8219
8408
  schema: microsoft_graph_ODataErrors_ODataError
8220
8409
  }
8221
8410
  ]
8411
+ },
8412
+ {
8413
+ method: "get",
8414
+ path: "/users",
8415
+ alias: "list-users",
8416
+ description: `List properties and relationships of the user objects.`,
8417
+ requestFormat: "json",
8418
+ parameters: [
8419
+ {
8420
+ name: "ConsistencyLevel",
8421
+ type: "Header",
8422
+ schema: z.string().describe(
8423
+ "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries"
8424
+ ).optional()
8425
+ },
8426
+ {
8427
+ name: "$top",
8428
+ type: "Query",
8429
+ schema: z.number().int().gte(0).describe("Show only the first n items").optional()
8430
+ },
8431
+ {
8432
+ name: "$search",
8433
+ type: "Query",
8434
+ schema: z.string().describe("Search items by search phrases").optional()
8435
+ },
8436
+ {
8437
+ name: "$filter",
8438
+ type: "Query",
8439
+ schema: z.string().describe("Filter items by property values").optional()
8440
+ },
8441
+ {
8442
+ name: "$count",
8443
+ type: "Query",
8444
+ schema: z.boolean().describe("Include count of items").optional()
8445
+ },
8446
+ {
8447
+ name: "$orderby",
8448
+ type: "Query",
8449
+ schema: z.array(z.string()).describe("Order items by property values").optional()
8450
+ },
8451
+ {
8452
+ name: "$select",
8453
+ type: "Query",
8454
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
8455
+ },
8456
+ {
8457
+ name: "$expand",
8458
+ type: "Query",
8459
+ schema: z.array(z.string()).describe("Expand related entities").optional()
8460
+ }
8461
+ ],
8462
+ response: z.void(),
8463
+ errors: [
8464
+ {
8465
+ status: NaN,
8466
+ description: `Retrieved collection`,
8467
+ schema: microsoft_graph_userCollectionResponse
8468
+ },
8469
+ {
8470
+ status: NaN,
8471
+ description: `error`,
8472
+ schema: microsoft_graph_ODataErrors_ODataError
8473
+ },
8474
+ {
8475
+ status: NaN,
8476
+ description: `error`,
8477
+ schema: microsoft_graph_ODataErrors_ODataError
8478
+ }
8479
+ ]
8480
+ },
8481
+ {
8482
+ method: "get",
8483
+ path: "/users/:userId/mailFolders/:mailFolderId/messages",
8484
+ alias: "list-shared-mailbox-folder-messages",
8485
+ description: `The collection of messages in the mailFolder.`,
8486
+ requestFormat: "json",
8487
+ parameters: [
8488
+ {
8489
+ name: "$top",
8490
+ type: "Query",
8491
+ schema: z.number().int().gte(0).describe("Show only the first n items").optional()
8492
+ },
8493
+ {
8494
+ name: "$skip",
8495
+ type: "Query",
8496
+ schema: z.number().int().gte(0).describe("Skip the first n items").optional()
8497
+ },
8498
+ {
8499
+ name: "$search",
8500
+ type: "Query",
8501
+ schema: z.string().describe("Search items by search phrases").optional()
8502
+ },
8503
+ {
8504
+ name: "$filter",
8505
+ type: "Query",
8506
+ schema: z.string().describe("Filter items by property values").optional()
8507
+ },
8508
+ {
8509
+ name: "$count",
8510
+ type: "Query",
8511
+ schema: z.boolean().describe("Include count of items").optional()
8512
+ },
8513
+ {
8514
+ name: "$orderby",
8515
+ type: "Query",
8516
+ schema: z.array(z.string()).describe("Order items by property values").optional()
8517
+ },
8518
+ {
8519
+ name: "$select",
8520
+ type: "Query",
8521
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
8522
+ },
8523
+ {
8524
+ name: "$expand",
8525
+ type: "Query",
8526
+ schema: z.array(z.string()).describe("Expand related entities").optional()
8527
+ }
8528
+ ],
8529
+ response: z.void(),
8530
+ errors: [
8531
+ {
8532
+ status: NaN,
8533
+ description: `Retrieved collection`,
8534
+ schema: microsoft_graph_messageCollectionResponse
8535
+ },
8536
+ {
8537
+ status: NaN,
8538
+ description: `error`,
8539
+ schema: microsoft_graph_ODataErrors_ODataError
8540
+ },
8541
+ {
8542
+ status: NaN,
8543
+ description: `error`,
8544
+ schema: microsoft_graph_ODataErrors_ODataError
8545
+ }
8546
+ ]
8547
+ },
8548
+ {
8549
+ method: "get",
8550
+ path: "/users/:userId/messages",
8551
+ alias: "list-shared-mailbox-messages",
8552
+ description: `The messages in a mailbox or folder. Read-only. Nullable.`,
8553
+ requestFormat: "json",
8554
+ parameters: [
8555
+ {
8556
+ name: "includeHiddenMessages",
8557
+ type: "Query",
8558
+ schema: z.string().describe("Include Hidden Messages").optional()
8559
+ },
8560
+ {
8561
+ name: "$top",
8562
+ type: "Query",
8563
+ schema: z.number().int().gte(0).describe("Show only the first n items").optional()
8564
+ },
8565
+ {
8566
+ name: "$skip",
8567
+ type: "Query",
8568
+ schema: z.number().int().gte(0).describe("Skip the first n items").optional()
8569
+ },
8570
+ {
8571
+ name: "$search",
8572
+ type: "Query",
8573
+ schema: z.string().describe("Search items by search phrases").optional()
8574
+ },
8575
+ {
8576
+ name: "$filter",
8577
+ type: "Query",
8578
+ schema: z.string().describe("Filter items by property values").optional()
8579
+ },
8580
+ {
8581
+ name: "$count",
8582
+ type: "Query",
8583
+ schema: z.boolean().describe("Include count of items").optional()
8584
+ },
8585
+ {
8586
+ name: "$orderby",
8587
+ type: "Query",
8588
+ schema: z.array(z.string()).describe("Order items by property values").optional()
8589
+ },
8590
+ {
8591
+ name: "$select",
8592
+ type: "Query",
8593
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
8594
+ },
8595
+ {
8596
+ name: "$expand",
8597
+ type: "Query",
8598
+ schema: z.array(z.string()).describe("Expand related entities").optional()
8599
+ }
8600
+ ],
8601
+ response: z.void(),
8602
+ errors: [
8603
+ {
8604
+ status: NaN,
8605
+ description: `Retrieved collection`,
8606
+ schema: microsoft_graph_messageCollectionResponse
8607
+ },
8608
+ {
8609
+ status: NaN,
8610
+ description: `error`,
8611
+ schema: microsoft_graph_ODataErrors_ODataError
8612
+ },
8613
+ {
8614
+ status: NaN,
8615
+ description: `error`,
8616
+ schema: microsoft_graph_ODataErrors_ODataError
8617
+ }
8618
+ ]
8619
+ },
8620
+ {
8621
+ method: "get",
8622
+ path: "/users/:userId/messages/:messageId",
8623
+ alias: "get-shared-mailbox-message",
8624
+ description: `The messages in a mailbox or folder. Read-only. Nullable.`,
8625
+ requestFormat: "json",
8626
+ parameters: [
8627
+ {
8628
+ name: "includeHiddenMessages",
8629
+ type: "Query",
8630
+ schema: z.string().describe("Include Hidden Messages").optional()
8631
+ },
8632
+ {
8633
+ name: "$select",
8634
+ type: "Query",
8635
+ schema: z.array(z.string()).describe("Select properties to be returned").optional()
8636
+ },
8637
+ {
8638
+ name: "$expand",
8639
+ type: "Query",
8640
+ schema: z.array(z.string()).describe("Expand related entities").optional()
8641
+ }
8642
+ ],
8643
+ response: z.void(),
8644
+ errors: [
8645
+ {
8646
+ status: NaN,
8647
+ description: `Retrieved navigation property`,
8648
+ schema: z.object({
8649
+ body: microsoft_graph_itemBody.optional(),
8650
+ subject: z.string().describe("The subject of the message.").nullish(),
8651
+ attachments: z.array(microsoft_graph_attachment).describe("The fileAttachment and itemAttachment attachments for the message.").optional(),
8652
+ bccRecipients: z.array(microsoft_graph_recipient).describe("The Bcc: recipients for the message.").optional(),
8653
+ bodyPreview: z.string().describe("The first 255 characters of the message body. It is in text format.").nullish(),
8654
+ ccRecipients: z.array(microsoft_graph_recipient).describe("The Cc: recipients for the message.").optional(),
8655
+ conversationId: z.string().describe("The ID of the conversation the email belongs to.").nullish(),
8656
+ conversationIndex: z.string().describe("Indicates the position of the message within the conversation.").nullish(),
8657
+ flag: microsoft_graph_followupFlag.optional(),
8658
+ from: microsoft_graph_recipient.optional(),
8659
+ hasAttachments: z.boolean().describe(
8660
+ "Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>."
8661
+ ).nullish(),
8662
+ importance: microsoft_graph_importance.optional(),
8663
+ inferenceClassification: microsoft_graph_inferenceClassificationType.optional(),
8664
+ internetMessageHeaders: z.array(microsoft_graph_internetMessageHeader).describe(
8665
+ "A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only."
8666
+ ).optional(),
8667
+ internetMessageId: z.string().describe("The message ID in the format specified by RFC2822.").nullish(),
8668
+ isDeliveryReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
8669
+ isDraft: z.boolean().describe(
8670
+ "Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet."
8671
+ ).nullish(),
8672
+ isRead: z.boolean().describe("Indicates whether the message has been read.").nullish(),
8673
+ isReadReceiptRequested: z.boolean().describe("Indicates whether a read receipt is requested for the message.").nullish(),
8674
+ parentFolderId: z.string().describe("The unique identifier for the message's parent mailFolder.").nullish(),
8675
+ receivedDateTime: z.string().regex(
8676
+ /^[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])$/
8677
+ ).datetime({ offset: true }).describe(
8678
+ "The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
8679
+ ).nullish(),
8680
+ replyTo: z.array(microsoft_graph_recipient).describe("The email addresses to use when replying.").optional(),
8681
+ sender: microsoft_graph_recipient.optional(),
8682
+ sentDateTime: z.string().regex(
8683
+ /^[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])$/
8684
+ ).datetime({ offset: true }).describe(
8685
+ "The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z."
8686
+ ).nullish(),
8687
+ toRecipients: z.array(microsoft_graph_recipient).describe("The To: recipients for the message.").optional()
8688
+ }).strict().passthrough()
8689
+ },
8690
+ {
8691
+ status: NaN,
8692
+ description: `error`,
8693
+ schema: microsoft_graph_ODataErrors_ODataError
8694
+ },
8695
+ {
8696
+ status: NaN,
8697
+ description: `error`,
8698
+ schema: microsoft_graph_ODataErrors_ODataError
8699
+ }
8700
+ ]
8701
+ },
8702
+ {
8703
+ method: "post",
8704
+ path: "/users/:userId/sendMail",
8705
+ alias: "send-shared-mailbox-mail",
8706
+ description: `Send the message specified in the request body using either JSON or MIME format. When using JSON format, you can include a file attachment in the same sendMail action call. When using MIME format: This method saves the message in the Sent Items folder. Alternatively, create a draft message to send later. To learn more about the steps involved in the backend before a mail is delivered to recipients, see here.`,
8707
+ requestFormat: "json",
8708
+ parameters: [
8709
+ {
8710
+ name: "body",
8711
+ description: `Action parameters`,
8712
+ type: "Body",
8713
+ schema: send_mail_Body
8714
+ }
8715
+ ],
8716
+ response: z.void(),
8717
+ errors: [
8718
+ {
8719
+ status: NaN,
8720
+ description: `error`,
8721
+ schema: microsoft_graph_ODataErrors_ODataError
8722
+ },
8723
+ {
8724
+ status: NaN,
8725
+ description: `error`,
8726
+ schema: microsoft_graph_ODataErrors_ODataError
8727
+ }
8728
+ ]
8222
8729
  }
8223
8730
  ]);
8224
8731
  const api = new Zodios(endpoints);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.17.0",
3
+ "version": "0.19.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",
@@ -29,6 +29,36 @@
29
29
  "toolName": "send-mail",
30
30
  "scopes": ["Mail.Send"]
31
31
  },
32
+ {
33
+ "pathPattern": "/users/{user-id}/messages",
34
+ "method": "get",
35
+ "toolName": "list-shared-mailbox-messages",
36
+ "workScopes": ["Mail.Read.Shared"]
37
+ },
38
+ {
39
+ "pathPattern": "/users/{user-id}/mailFolders/{mailFolder-id}/messages",
40
+ "method": "get",
41
+ "toolName": "list-shared-mailbox-folder-messages",
42
+ "workScopes": ["Mail.Read.Shared"]
43
+ },
44
+ {
45
+ "pathPattern": "/users/{user-id}/messages/{message-id}",
46
+ "method": "get",
47
+ "toolName": "get-shared-mailbox-message",
48
+ "workScopes": ["Mail.Read.Shared"]
49
+ },
50
+ {
51
+ "pathPattern": "/users/{user-id}/sendMail",
52
+ "method": "post",
53
+ "toolName": "send-shared-mailbox-mail",
54
+ "workScopes": ["Mail.Send.Shared"]
55
+ },
56
+ {
57
+ "pathPattern": "/users",
58
+ "method": "get",
59
+ "toolName": "list-users",
60
+ "workScopes": ["User.Read.All"]
61
+ },
32
62
  {
33
63
  "pathPattern": "/me/messages",
34
64
  "method": "post",
@@ -47,6 +77,30 @@
47
77
  "toolName": "move-mail-message",
48
78
  "scopes": ["Mail.ReadWrite"]
49
79
  },
80
+ {
81
+ "pathPattern": "/me/messages/{message-id}/attachments",
82
+ "method": "post",
83
+ "toolName": "add-mail-attachment",
84
+ "scopes": ["Mail.ReadWrite"]
85
+ },
86
+ {
87
+ "pathPattern": "/me/messages/{message-id}/attachments",
88
+ "method": "get",
89
+ "toolName": "list-mail-attachments",
90
+ "scopes": ["Mail.Read"]
91
+ },
92
+ {
93
+ "pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
94
+ "method": "get",
95
+ "toolName": "get-mail-attachment",
96
+ "scopes": ["Mail.Read"]
97
+ },
98
+ {
99
+ "pathPattern": "/me/messages/{message-id}/attachments/{attachment-id}",
100
+ "method": "delete",
101
+ "toolName": "delete-mail-attachment",
102
+ "scopes": ["Mail.ReadWrite"]
103
+ },
50
104
  {
51
105
  "pathPattern": "/me/events",
52
106
  "method": "get",