@softeria/ms-365-mcp-server 0.190.2 → 0.190.4

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/PRESETS.md CHANGED
@@ -8,30 +8,30 @@ Every preset also includes the account tools (`login`, `logout`, `verify-login`,
8
8
 
9
9
  ## Summary
10
10
 
11
- | Preset | Mode | Tools | Scopes | Org mode | Description |
12
- | ------------- | ---------------------------------------------------------------- | ---------: | -------: | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
13
- | `all` | [full](#all-full)<br>[read only](#all-read-only) | 372<br>182 | 65<br>38 | -<br>- | All available tools |
14
- | `calendar` | [full](#calendar-full)<br>[read only](#calendar-read-only) | 48<br>23 | 7<br>5 | -<br>- | Calendar and event management |
15
- | `contacts` | [full](#contacts-full)<br>[read only](#contacts-read-only) | 15<br>7 | 1<br>1 | -<br>- | Outlook contacts management |
16
- | `excel` | [full](#excel-full)<br>[read only](#excel-read-only) | 25<br>9 | 1<br>1 | -<br>- | Excel spreadsheet operations |
17
- | `files` | [full](#files-full)<br>[read only](#files-read-only) | 26<br>14 | 3<br>2 | -<br>- | OneDrive file and folder operations |
18
- | `mail` | [full](#mail-full)<br>[read only](#mail-read-only) | 50<br>19 | 5<br>3 | -<br>- | Email operations (read, send, manage folders, attachments) |
19
- | `onedrive` | [full](#onedrive-full)<br>[read only](#onedrive-read-only) | 24<br>12 | 2<br>1 | -<br>- | OneDrive app only: drive and file operations, excluding Excel |
20
- | `onenote` | [full](#onenote-full)<br>[read only](#onenote-read-only) | 29<br>17 | 5<br>2 | -<br>- | OneNote notebook operations |
21
- | `outlook` | [full](#outlook-full)<br>[read only](#outlook-read-only) | 97<br>37 | 8<br>6 | -<br>- | Outlook app only: mail, calendar and contacts |
22
- | `personal` | [full](#personal-full)<br>[read only](#personal-read-only) | 178<br>74 | 20<br>15 | -<br>- | Personal productivity tools (mail, calendar, files, contacts, tasks, notes, search) |
23
- | `search` | [full](#search-full)<br>[read only](#search-read-only) | 8<br>8 | 8<br>8 | -<br>- | Microsoft Search capabilities |
24
- | `tasks` | [full](#tasks-full)<br>[read only](#tasks-read-only) | 35<br>16 | 1<br>1 | -<br>- | Task and planning tools (To Do, Planner) |
25
- | `teams` | [full](#teams-full)<br>[read only](#teams-read-only) | 73<br>43 | 31<br>18 | required<br>required | Teams app only: chats, channels, meetings and presence |
26
- | `teams-write` | [full](#teams-write-full)<br>[read only](#teams-write-read-only) | 11<br>7 | 6<br>3 | required<br>required | Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading |
27
- | `users` | [full](#users-full)<br>[read only](#users-read-only) | 11<br>11 | 4<br>4 | required<br>required | User directory access |
28
- | `work` | [full](#work-full)<br>[read only](#work-read-only) | 192<br>112 | 55<br>33 | required<br>required | Organization/work tools (Teams, SharePoint, shared mailboxes, search) |
11
+ | Preset | Mode | Tools | Scopes | Org mode | Description |
12
+ | ------------- | ---------------------------------------------------------------- | ---------: | -------: | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | `all` | [full](#all-full)<br>[read only](#all-read-only) | 370<br>181 | 65<br>38 | -<br>- | All available tools |
14
+ | `calendar` | [full](#calendar-full)<br>[read only](#calendar-read-only) | 48<br>23 | 7<br>5 | -<br>- | Calendar and event management |
15
+ | `contacts` | [full](#contacts-full)<br>[read only](#contacts-read-only) | 15<br>7 | 1<br>1 | -<br>- | Outlook contacts management |
16
+ | `excel` | [full](#excel-full)<br>[read only](#excel-read-only) | 25<br>9 | 1<br>1 | -<br>- | Excel spreadsheet operations |
17
+ | `files` | [full](#files-full)<br>[read only](#files-read-only) | 26<br>14 | 3<br>2 | -<br>- | OneDrive file and folder operations |
18
+ | `mail` | [full](#mail-full)<br>[read only](#mail-read-only) | 50<br>19 | 5<br>3 | -<br>- | Email operations (read, send, manage folders, attachments) |
19
+ | `onedrive` | [full](#onedrive-full)<br>[read only](#onedrive-read-only) | 24<br>12 | 2<br>1 | -<br>- | OneDrive app only: drive and file operations, excluding Excel |
20
+ | `onenote` | [full](#onenote-full)<br>[read only](#onenote-read-only) | 29<br>17 | 5<br>2 | -<br>- | OneNote notebook operations |
21
+ | `outlook` | [full](#outlook-full)<br>[read only](#outlook-read-only) | 97<br>37 | 8<br>6 | -<br>- | Outlook app only: mail, calendar and contacts |
22
+ | `personal` | [full](#personal-full)<br>[read only](#personal-read-only) | 178<br>74 | 20<br>15 | -<br>- | Personal productivity tools (mail, calendar, files, contacts, tasks, notes, search) |
23
+ | `search` | [full](#search-full)<br>[read only](#search-read-only) | 8<br>8 | 8<br>8 | -<br>- | Microsoft Search capabilities |
24
+ | `tasks` | [full](#tasks-full)<br>[read only](#tasks-read-only) | 35<br>16 | 1<br>1 | -<br>- | Task and planning tools (To Do, Planner) |
25
+ | `teams` | [full](#teams-full)<br>[read only](#teams-read-only) | 71<br>42 | 31<br>18 | required<br>required | Teams app only: chats, channels, meetings and presence |
26
+ | `teams-write` | [full](#teams-write-full)<br>[read only](#teams-write-read-only) | 11<br>7 | 6<br>3 | required<br>required | Teams send-only: send in chats, send/reply in channels, list chats/teams/channels by name, activity notifications - no message reading |
27
+ | `users` | [full](#users-full)<br>[read only](#users-read-only) | 11<br>11 | 4<br>4 | required<br>required | User directory access |
28
+ | `work` | [full](#work-full)<br>[read only](#work-read-only) | 190<br>111 | 55<br>33 | required<br>required | Organization/work tools (Teams, SharePoint, shared mailboxes, search) |
29
29
 
30
30
  ## `all` full
31
31
 
32
32
  All available tools
33
33
 
34
- Tools (372):
34
+ Tools (370):
35
35
 
36
36
  - `accept-calendar-event`
37
37
  - `add-calendar-event-attachment`
@@ -235,7 +235,6 @@ Tools (372):
235
235
  - `list-channel-tabs`
236
236
  - `list-chat-members`
237
237
  - `list-chat-message-hosted-contents`
238
- - `list-chat-message-replies`
239
238
  - `list-chat-messages`
240
239
  - `list-chats`
241
240
  - `list-contact-folder-child-folders`
@@ -342,7 +341,6 @@ Tools (372):
342
341
  - `reply-mail-message`
343
342
  - `reply-shared-mailbox-mail`
344
343
  - `reply-to-channel-message`
345
- - `reply-to-chat-message`
346
344
  - `reply-to-group-thread`
347
345
  - `search-files`
348
346
  - `search-onedrive-files`
@@ -478,7 +476,7 @@ Scopes (65):
478
476
 
479
477
  All available tools
480
478
 
481
- Tools (182):
479
+ Tools (181):
482
480
 
483
481
  - `copilot-retrieve`
484
482
  - `download-bytes`
@@ -565,7 +563,6 @@ Tools (182):
565
563
  - `list-channel-tabs`
566
564
  - `list-chat-members`
567
565
  - `list-chat-message-hosted-contents`
568
- - `list-chat-message-replies`
569
566
  - `list-chat-messages`
570
567
  - `list-chats`
571
568
  - `list-contact-folder-child-folders`
@@ -1807,7 +1804,7 @@ Teams app only: chats, channels, meetings and presence
1807
1804
 
1808
1805
  Requires `--org-mode`.
1809
1806
 
1810
- Tools (73):
1807
+ Tools (71):
1811
1808
 
1812
1809
  - `add-team-member`
1813
1810
  - `clear-my-presence`
@@ -1845,7 +1842,6 @@ Tools (73):
1845
1842
  - `list-channel-tabs`
1846
1843
  - `list-chat-members`
1847
1844
  - `list-chat-message-hosted-contents`
1848
- - `list-chat-message-replies`
1849
1845
  - `list-chat-messages`
1850
1846
  - `list-chats`
1851
1847
  - `list-custom-emojis`
@@ -1865,7 +1861,6 @@ Tools (73):
1865
1861
  - `pin-chat-message`
1866
1862
  - `remove-team-member`
1867
1863
  - `reply-to-channel-message`
1868
- - `reply-to-chat-message`
1869
1864
  - `send-channel-message`
1870
1865
  - `send-chat-message`
1871
1866
  - `send-my-activity-notification`
@@ -1923,7 +1918,7 @@ Teams app only: chats, channels, meetings and presence
1923
1918
 
1924
1919
  Requires `--org-mode`.
1925
1920
 
1926
- Tools (43):
1921
+ Tools (42):
1927
1922
 
1928
1923
  - `download-bytes`
1929
1924
  - `download-bytes-to-file`
@@ -1951,7 +1946,6 @@ Tools (43):
1951
1946
  - `list-channel-tabs`
1952
1947
  - `list-chat-members`
1953
1948
  - `list-chat-message-hosted-contents`
1954
- - `list-chat-message-replies`
1955
1949
  - `list-chat-messages`
1956
1950
  - `list-chats`
1957
1951
  - `list-custom-emojis`
@@ -1992,7 +1986,7 @@ Scopes (18):
1992
1986
 
1993
1987
  ## `teams-write` full
1994
1988
 
1995
- Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading
1989
+ Teams send-only: send in chats, send/reply in channels, list chats/teams/channels by name, activity notifications - no message reading
1996
1990
 
1997
1991
  Requires `--org-mode`.
1998
1992
 
@@ -2021,7 +2015,7 @@ Scopes (6):
2021
2015
 
2022
2016
  ## `teams-write` read only
2023
2017
 
2024
- Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading
2018
+ Teams send-only: send in chats, send/reply in channels, list chats/teams/channels by name, activity notifications - no message reading
2025
2019
 
2026
2020
  Requires `--org-mode`.
2027
2021
 
@@ -2101,7 +2095,7 @@ Organization/work tools (Teams, SharePoint, shared mailboxes, search)
2101
2095
 
2102
2096
  Requires `--org-mode`.
2103
2097
 
2104
- Tools (192):
2098
+ Tools (190):
2105
2099
 
2106
2100
  - `add-group-member`
2107
2101
  - `add-group-owner`
@@ -2198,7 +2192,6 @@ Tools (192):
2198
2192
  - `list-channel-tabs`
2199
2193
  - `list-chat-members`
2200
2194
  - `list-chat-message-hosted-contents`
2201
- - `list-chat-message-replies`
2202
2195
  - `list-chat-messages`
2203
2196
  - `list-chats`
2204
2197
  - `list-custom-emojis`
@@ -2260,7 +2253,6 @@ Tools (192):
2260
2253
  - `reply-all-shared-mailbox-mail`
2261
2254
  - `reply-shared-mailbox-mail`
2262
2255
  - `reply-to-channel-message`
2263
- - `reply-to-chat-message`
2264
2256
  - `reply-to-group-thread`
2265
2257
  - `search-files`
2266
2258
  - `search-query`
@@ -2360,7 +2352,7 @@ Organization/work tools (Teams, SharePoint, shared mailboxes, search)
2360
2352
 
2361
2353
  Requires `--org-mode`.
2362
2354
 
2363
- Tools (112):
2355
+ Tools (111):
2364
2356
 
2365
2357
  - `copilot-retrieve`
2366
2358
  - `download-bytes`
@@ -2417,7 +2409,6 @@ Tools (112):
2417
2409
  - `list-channel-tabs`
2418
2410
  - `list-chat-members`
2419
2411
  - `list-chat-message-hosted-contents`
2420
- - `list-chat-message-replies`
2421
2412
  - `list-chat-messages`
2422
2413
  - `list-chats`
2423
2414
  - `list-custom-emojis`
package/README.md CHANGED
@@ -895,6 +895,8 @@ When running as an MCP server, the following options can be used:
895
895
 
896
896
  The account tools (`login`, `logout`, `verify-login`, `list-accounts`, `select-account`, `remove-account`) follow the same filters: `--enabled-tools` applies to them, every `--preset` includes them, and `--read-only` or `MS365_MCP_OAUTH_TOKEN` keeps only `verify-login` and `list-accounts`.
897
897
 
898
+ `--read-only` keeps `download-bytes-to-file` (stdio, or HTTP with `--http-local-file-tools`), since it only reads from Microsoft 365. It tells clients that it writes files (`readOnlyHint: false`), so they can ask before running it.
899
+
898
900
  Environment variables:
899
901
 
900
902
  - `READ_ONLY=true|1`: Alternative to --read-only flag
@@ -330,7 +330,7 @@ export function synthesizeDescriptionFromToolName(toolName) {
330
330
  }
331
331
  if (!verb) return null;
332
332
 
333
- // reply-to-chat-message: the verb phrase already ends in that preposition.
333
+ // reply-to-channel-message: the verb phrase already ends in that preposition.
334
334
  if (parts[0] === 'to' && verb.endsWith(' to')) parts.shift();
335
335
  if (parts.length === 0) return null;
336
336
 
@@ -3508,7 +3508,7 @@ describe("graph-tools", () => {
3508
3508
  });
3509
3509
  });
3510
3510
  describe("utility tools in read-only mode", () => {
3511
- it("skips utility tools whose readOnlyHint is not true", async () => {
3511
+ it("keeps read-only utility tools and skips write ones", async () => {
3512
3512
  mockEndpoints.length = 0;
3513
3513
  mockEndpointsJson = [];
3514
3514
  const server = createMockServer();
@@ -3516,6 +3516,32 @@ describe("graph-tools", () => {
3516
3516
  registerGraphTools(server, {}, { readOnly: true });
3517
3517
  expect(server.tools.has("download-bytes")).toBe(true);
3518
3518
  expect(server.tools.has("parse-teams-url")).toBe(true);
3519
+ expect(server.tools.has("get-upload-url")).toBe(false);
3520
+ });
3521
+ it("keeps download-bytes-to-file, but tells clients it writes files", async () => {
3522
+ mockEndpoints.length = 0;
3523
+ mockEndpointsJson = [];
3524
+ const server = createMockServer();
3525
+ const { registerGraphTools } = await loadModule();
3526
+ registerGraphTools(server, {}, { readOnly: true });
3527
+ const call = server.tool.mock.calls.find((c) => c[0] === "download-bytes-to-file");
3528
+ expect(call?.[3]).toEqual({
3529
+ title: "download-bytes-to-file",
3530
+ readOnlyHint: false,
3531
+ destructiveHint: false,
3532
+ openWorldHint: true
3533
+ });
3534
+ });
3535
+ });
3536
+ describe("utility tool annotations", () => {
3537
+ it("sends destructiveHint only for download-bytes-to-file", async () => {
3538
+ mockEndpoints.length = 0;
3539
+ mockEndpointsJson = [];
3540
+ const server = createMockServer();
3541
+ const { registerGraphTools } = await loadModule();
3542
+ registerGraphTools(server, {}, {});
3543
+ const withHint = server.tool.mock.calls.filter((c) => "destructiveHint" in c[3]).map((c) => c[0]);
3544
+ expect(withHint).toEqual(["download-bytes-to-file"]);
3519
3545
  });
3520
3546
  });
3521
3547
  describe("destructive operations require confirm: true", () => {
@@ -4433,7 +4459,6 @@ describe("graph-tools", () => {
4433
4459
  ["update-channel-message", "patch"],
4434
4460
  ["update-channel-message-reply", "patch"],
4435
4461
  ["send-chat-message", "post"],
4436
- ["reply-to-chat-message", "post"],
4437
4462
  ["update-chat-message", "patch"]
4438
4463
  ];
4439
4464
  async function call(alias, method, body, flagged = true) {
@@ -1987,7 +1987,7 @@
1987
1987
  "method": "get",
1988
1988
  "toolName": "list-chat-messages",
1989
1989
  "presets": ["teams", "work"],
1990
- "workScopes": ["ChatMessage.Read"],
1990
+ "workScopes": ["Chat.Read"],
1991
1991
  "appScopes": ["Chat.Read.All"],
1992
1992
  "llmTip": "Lists messages in a chat. $top is capped at 50 (higher values return 400) and $orderby accepts only descending order on createdDateTime or lastModifiedDateTime - ascending is rejected. Meeting chats mostly hold system events; transcripts are not available here, use list-meeting-transcripts instead."
1993
1993
  },
@@ -1996,7 +1996,7 @@
1996
1996
  "method": "get",
1997
1997
  "toolName": "get-chat-message",
1998
1998
  "presets": ["teams", "work"],
1999
- "workScopes": ["ChatMessage.Read"],
1999
+ "workScopes": ["Chat.Read"],
2000
2000
  "appScopes": ["Chat.Read.All"]
2001
2001
  },
2002
2002
  {
@@ -2013,7 +2013,7 @@
2013
2013
  "method": "get",
2014
2014
  "toolName": "list-chat-message-hosted-contents",
2015
2015
  "presets": ["teams", "work"],
2016
- "workScopes": ["ChatMessage.Read"],
2016
+ "workScopes": ["Chat.Read"],
2017
2017
  "appScopes": ["Chat.Read.All"],
2018
2018
  "llmTip": "Lists hosted-content references (inline images, code snippets) attached to a Teams chat message. Returns { id, contentType } per item. To download bytes, call download-bytes with target=/chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{id}/$value. IDs can also be extracted from the <img src> URL in the message body between /hostedContents/ and /$value."
2019
2019
  },
@@ -2287,22 +2287,6 @@
2287
2287
  "appScopes": [["Files.Read.All"], ["Group.Read.All"], ["Sites.Read.All"]],
2288
2288
  "llmTip": "Gets the SharePoint driveItem (folder) that contains the files for a Teams channel. Returns id, name, webUrl, and parentReference with driveId. Use the driveId and id with OneDrive/SharePoint endpoints (list-folder-files) to browse and download channel files."
2289
2289
  },
2290
- {
2291
- "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/replies",
2292
- "method": "get",
2293
- "toolName": "list-chat-message-replies",
2294
- "presets": ["teams", "work"],
2295
- "workScopes": ["ChatMessage.Read"]
2296
- },
2297
- {
2298
- "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/replies",
2299
- "method": "post",
2300
- "toolName": "reply-to-chat-message",
2301
- "presets": ["teams", "work"],
2302
- "workScopes": ["ChatMessage.Send"],
2303
- "mentionShorthand": true,
2304
- "llmTip": "To @mention someone, put <at user-id=\"<aad-user-id>\">Display Name</at> in the html content; the server numbers the tag and builds the mentions array. Use the userId field (not id) from list-team-members or list-chat-members. Use contentType 'html' in the body — plain text contentType gets mangled by Graph API. Alternatively, hand-build the raw form: put an <at id=\"0\">Name</at> tag in the html content and add a mentions array to the request body, as a sibling of the body property (not a separate top-level tool parameter): { body: { contentType: 'html', content: 'Hi <at id=\"0\">Name</at>' }, mentions: [{ id: 0, mentionText: 'Name', mentioned: { user: { id: '<aad-user-id>', displayName: 'Name', userIdentityType: 'aadUser' } } }] }. Each mention id must match its <at id> value; include userIdentityType: 'aadUser' or Graph returns 400 'value without a type name'."
2305
- },
2306
2290
  {
2307
2291
  "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/setReaction",
2308
2292
  "method": "post",
@@ -5736,72 +5736,6 @@ const endpoints = makeApi([
5736
5736
  ],
5737
5737
  response: z.void()
5738
5738
  },
5739
- {
5740
- method: "get",
5741
- path: "/chats/:chatId/messages/:chatMessageId/replies",
5742
- alias: "list-chat-message-replies",
5743
- description: `Replies for a specified message. Supports $expand for channel messages.`,
5744
- requestFormat: "json",
5745
- parameters: [
5746
- {
5747
- name: "$top",
5748
- type: "Query",
5749
- schema: z.number().int().gte(0).describe("Show only the first n items").optional()
5750
- },
5751
- {
5752
- name: "$skip",
5753
- type: "Query",
5754
- schema: z.number().int().gte(0).describe("Skip the first n items").optional()
5755
- },
5756
- {
5757
- name: "$search",
5758
- type: "Query",
5759
- schema: z.string().describe("Search items by search phrases").optional()
5760
- },
5761
- {
5762
- name: "$filter",
5763
- type: "Query",
5764
- schema: z.string().describe("Filter items by property values").optional()
5765
- },
5766
- {
5767
- name: "$count",
5768
- type: "Query",
5769
- schema: z.boolean().describe("Include count of items").optional()
5770
- },
5771
- {
5772
- name: "$orderby",
5773
- type: "Query",
5774
- schema: z.array(z.string()).describe("Order items by property values").optional()
5775
- },
5776
- {
5777
- name: "$select",
5778
- type: "Query",
5779
- schema: z.array(z.string()).describe("Select properties to be returned").optional()
5780
- },
5781
- {
5782
- name: "$expand",
5783
- type: "Query",
5784
- schema: z.array(z.string()).describe("Expand related entities").optional()
5785
- }
5786
- ],
5787
- response: z.void()
5788
- },
5789
- {
5790
- method: "post",
5791
- path: "/chats/:chatId/messages/:chatMessageId/replies",
5792
- alias: "reply-to-chat-message",
5793
- description: `Reply to a chat message.`,
5794
- requestFormat: "json",
5795
- parameters: [
5796
- {
5797
- name: "body",
5798
- description: `New navigation property`,
5799
- type: "Body",
5800
- schema: microsoft_graph_chatMessage
5801
- }
5802
- ],
5803
- response: z.void()
5804
- },
5805
5739
  {
5806
5740
  method: "post",
5807
5741
  path: "/chats/:chatId/messages/:chatMessageId/setReaction",
@@ -635,7 +635,7 @@ async function executeUtilityTool(utility, ctx, params) {
635
635
  }
636
636
  }
637
637
  function isUtilityToolAvailable(utility, options) {
638
- if (options.readOnly && !utility.readOnlyHint) return false;
638
+ if (options.readOnly && !utility.readOnlyHint && !utility.allowedInReadOnly) return false;
639
639
  if (options.httpMode && utility.stdioOnly) return false;
640
640
  if (options.scopeMode === "app" && utility.meOnly) return false;
641
641
  if (utility.enabled && !utility.enabled()) return false;
@@ -1513,7 +1513,11 @@ const UTILITY_TOOLS = [
1513
1513
  // sits past the cap. That keeps the hint for the reading LLM while letting
1514
1514
  // get-download-url own the high-signal "drive"/"sharepoint" search terms.
1515
1515
  description: "Write authenticated Microsoft Graph byte content to a local file on the server, returning { path, contentType, bytesWritten } instead of base64. An out-of-band way to save mail attachments and meeting recordings. With --enable-attachment-urls in HTTP mode, prefer get-download-url to hand their bytes to an external downloader or converter. Also handles profile photos and Teams hosted content. Writes to an absolute outputPath and never overwrites an existing file. stdio mode, or HTTP with --http-local-file-tools. For OneDrive or SharePoint file content, get-download-url is preferred \u2014 it returns a pre-authenticated URL for fully out-of-band download without the server fetching the bytes.",
1516
- readOnlyHint: true,
1516
+ // Writes to the local disk, so clients must not see it as read-only. It only
1517
+ // creates new files, and it only reads from Microsoft 365, so --read-only keeps it.
1518
+ readOnlyHint: false,
1519
+ destructiveHint: false,
1520
+ allowedInReadOnly: true,
1517
1521
  openWorldHint: true,
1518
1522
  stdioOnly: true,
1519
1523
  buildSchema: (ctx) => {
@@ -1935,6 +1939,7 @@ function registerUtilityToolWithMcp(server, utility, ctx) {
1935
1939
  {
1936
1940
  title: utility.name,
1937
1941
  readOnlyHint: utility.readOnlyHint ?? true,
1942
+ ...utility.destructiveHint !== void 0 ? { destructiveHint: utility.destructiveHint } : {},
1938
1943
  openWorldHint: utility.openWorldHint ?? true
1939
1944
  },
1940
1945
  async (params) => executeUtilityTool(utility, ctx, params)
@@ -14,7 +14,7 @@ function buildGeneralMcpInstructions(opts) {
14
14
  parts.push(
15
15
  "App mode: there is no signed-in user, so /me paths do not work. Name the user in /users/{user-id} paths with a UPN or object id."
16
16
  );
17
- if (opts.readOnly) parts.push("This server is read-only; write operations are disabled.");
17
+ if (opts.readOnly) parts.push("This server is read-only; writes to Microsoft 365 are disabled.");
18
18
  else
19
19
  parts.push(
20
20
  "Mail reply, reply-all and forward tools (including their drafts and shared mailboxes): Graph puts comment into an HTML body, so plain-text line breaks are usually lost; use <br> for line breaks or <p> for paragraphs."
@@ -53,7 +53,7 @@ const PRESET_META = {
53
53
  requiresOrgMode: true
54
54
  },
55
55
  "teams-write": {
56
- description: "Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading",
56
+ description: "Teams send-only: send in chats, send/reply in channels, list chats/teams/channels by name, activity notifications - no message reading",
57
57
  requiresOrgMode: true,
58
58
  // A write-only preset must not include the generic byte readers.
59
59
  omitUniversalUtilities: true
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
3
  "mcpName": "io.github.Softeria/ms-365-mcp-server",
4
- "version": "0.190.2",
4
+ "version": "0.190.4",
5
5
  "description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1987,7 +1987,7 @@
1987
1987
  "method": "get",
1988
1988
  "toolName": "list-chat-messages",
1989
1989
  "presets": ["teams", "work"],
1990
- "workScopes": ["ChatMessage.Read"],
1990
+ "workScopes": ["Chat.Read"],
1991
1991
  "appScopes": ["Chat.Read.All"],
1992
1992
  "llmTip": "Lists messages in a chat. $top is capped at 50 (higher values return 400) and $orderby accepts only descending order on createdDateTime or lastModifiedDateTime - ascending is rejected. Meeting chats mostly hold system events; transcripts are not available here, use list-meeting-transcripts instead."
1993
1993
  },
@@ -1996,7 +1996,7 @@
1996
1996
  "method": "get",
1997
1997
  "toolName": "get-chat-message",
1998
1998
  "presets": ["teams", "work"],
1999
- "workScopes": ["ChatMessage.Read"],
1999
+ "workScopes": ["Chat.Read"],
2000
2000
  "appScopes": ["Chat.Read.All"]
2001
2001
  },
2002
2002
  {
@@ -2013,7 +2013,7 @@
2013
2013
  "method": "get",
2014
2014
  "toolName": "list-chat-message-hosted-contents",
2015
2015
  "presets": ["teams", "work"],
2016
- "workScopes": ["ChatMessage.Read"],
2016
+ "workScopes": ["Chat.Read"],
2017
2017
  "appScopes": ["Chat.Read.All"],
2018
2018
  "llmTip": "Lists hosted-content references (inline images, code snippets) attached to a Teams chat message. Returns { id, contentType } per item. To download bytes, call download-bytes with target=/chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{id}/$value. IDs can also be extracted from the <img src> URL in the message body between /hostedContents/ and /$value."
2019
2019
  },
@@ -2287,22 +2287,6 @@
2287
2287
  "appScopes": [["Files.Read.All"], ["Group.Read.All"], ["Sites.Read.All"]],
2288
2288
  "llmTip": "Gets the SharePoint driveItem (folder) that contains the files for a Teams channel. Returns id, name, webUrl, and parentReference with driveId. Use the driveId and id with OneDrive/SharePoint endpoints (list-folder-files) to browse and download channel files."
2289
2289
  },
2290
- {
2291
- "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/replies",
2292
- "method": "get",
2293
- "toolName": "list-chat-message-replies",
2294
- "presets": ["teams", "work"],
2295
- "workScopes": ["ChatMessage.Read"]
2296
- },
2297
- {
2298
- "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/replies",
2299
- "method": "post",
2300
- "toolName": "reply-to-chat-message",
2301
- "presets": ["teams", "work"],
2302
- "workScopes": ["ChatMessage.Send"],
2303
- "mentionShorthand": true,
2304
- "llmTip": "To @mention someone, put <at user-id=\"<aad-user-id>\">Display Name</at> in the html content; the server numbers the tag and builds the mentions array. Use the userId field (not id) from list-team-members or list-chat-members. Use contentType 'html' in the body — plain text contentType gets mangled by Graph API. Alternatively, hand-build the raw form: put an <at id=\"0\">Name</at> tag in the html content and add a mentions array to the request body, as a sibling of the body property (not a separate top-level tool parameter): { body: { contentType: 'html', content: 'Hi <at id=\"0\">Name</at>' }, mentions: [{ id: 0, mentionText: 'Name', mentioned: { user: { id: '<aad-user-id>', displayName: 'Name', userIdentityType: 'aadUser' } } }] }. Each mention id must match its <at id> value; include userIdentityType: 'aadUser' or Graph returns 400 'value without a type name'."
2305
- },
2306
2290
  {
2307
2291
  "pathPattern": "/chats/{chat-id}/messages/{chatMessage-id}/setReaction",
2308
2292
  "method": "post",