@softeria/ms-365-mcp-server 0.180.1 → 0.180.2
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 +12 -8
- package/bin/modules/simplified-openapi.mjs +4 -1
- package/dist/endpoints.json +12 -4
- package/dist/generated/client.js +1 -1
- package/dist/graph-tools.js +41 -1
- package/package.json +1 -1
- package/src/endpoints.json +12 -4
package/PRESETS.md
CHANGED
|
@@ -10,16 +10,16 @@ Every preset also includes the account tools (`login`, `logout`, `verify-login`,
|
|
|
10
10
|
|
|
11
11
|
| Preset | Mode | Tools | Scopes | Org mode | Description |
|
|
12
12
|
| ------------- | ---------------------------------------------------------------- | ---------: | -------: | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| `all` | [full](#all-full)<br>[read only](#all-read-only) |
|
|
13
|
+
| `all` | [full](#all-full)<br>[read only](#all-read-only) | 370<br>180 | 63<br>37 | -<br>- | All available tools |
|
|
14
14
|
| `calendar` | [full](#calendar-full)<br>[read only](#calendar-read-only) | 47<br>22 | 7<br>5 | -<br>- | Calendar and event management |
|
|
15
15
|
| `contacts` | [full](#contacts-full)<br>[read only](#contacts-read-only) | 15<br>7 | 1<br>1 | -<br>- | Outlook contacts management |
|
|
16
16
|
| `excel` | [full](#excel-full)<br>[read only](#excel-read-only) | 25<br>9 | 1<br>1 | -<br>- | Excel spreadsheet operations |
|
|
17
17
|
| `files` | [full](#files-full)<br>[read only](#files-read-only) | 25<br>14 | 3<br>2 | -<br>- | OneDrive file and folder operations |
|
|
18
|
-
| `mail` | [full](#mail-full)<br>[read only](#mail-read-only) |
|
|
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
19
|
| `onedrive` | [full](#onedrive-full)<br>[read only](#onedrive-read-only) | 23<br>12 | 2<br>1 | -<br>- | OneDrive app only: drive and file operations, excluding Excel |
|
|
20
20
|
| `onenote` | [full](#onenote-full)<br>[read only](#onenote-read-only) | 29<br>17 | 3<br>1 | -<br>- | OneNote notebook operations |
|
|
21
|
-
| `outlook` | [full](#outlook-full)<br>[read only](#outlook-read-only) |
|
|
22
|
-
| `personal` | [full](#personal-full)<br>[read only](#personal-read-only) |
|
|
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
23
|
| `search` | [full](#search-full)<br>[read only](#search-read-only) | 7<br>7 | 8<br>8 | -<br>- | Microsoft Search capabilities |
|
|
24
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
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 |
|
|
@@ -31,7 +31,7 @@ Every preset also includes the account tools (`login`, `logout`, `verify-login`,
|
|
|
31
31
|
|
|
32
32
|
All available tools
|
|
33
33
|
|
|
34
|
-
Tools (
|
|
34
|
+
Tools (370):
|
|
35
35
|
|
|
36
36
|
- `accept-calendar-event`
|
|
37
37
|
- `add-calendar-event-attachment`
|
|
@@ -118,6 +118,7 @@ Tools (369):
|
|
|
118
118
|
- `delete-mail-attachment`
|
|
119
119
|
- `delete-mail-folder`
|
|
120
120
|
- `delete-mail-message`
|
|
121
|
+
- `delete-mail-message-skip-deleted-items`
|
|
121
122
|
- `delete-mail-rule`
|
|
122
123
|
- `delete-my-calendar-permission`
|
|
123
124
|
- `delete-onedrive-file`
|
|
@@ -965,7 +966,7 @@ Scopes (2):
|
|
|
965
966
|
|
|
966
967
|
Email operations (read, send, manage folders, attachments)
|
|
967
968
|
|
|
968
|
-
Tools (
|
|
969
|
+
Tools (50):
|
|
969
970
|
|
|
970
971
|
- `add-mail-attachment`
|
|
971
972
|
- `copy-mail-message`
|
|
@@ -983,6 +984,7 @@ Tools (49):
|
|
|
983
984
|
- `delete-mail-attachment`
|
|
984
985
|
- `delete-mail-folder`
|
|
985
986
|
- `delete-mail-message`
|
|
987
|
+
- `delete-mail-message-skip-deleted-items`
|
|
986
988
|
- `delete-mail-rule`
|
|
987
989
|
- `download-bytes`
|
|
988
990
|
- `download-bytes-to-file`
|
|
@@ -1189,7 +1191,7 @@ Scopes (1):
|
|
|
1189
1191
|
|
|
1190
1192
|
Outlook app only: mail, calendar and contacts
|
|
1191
1193
|
|
|
1192
|
-
Tools (
|
|
1194
|
+
Tools (97):
|
|
1193
1195
|
|
|
1194
1196
|
- `accept-calendar-event`
|
|
1195
1197
|
- `add-calendar-event-attachment`
|
|
@@ -1223,6 +1225,7 @@ Tools (96):
|
|
|
1223
1225
|
- `delete-mail-attachment`
|
|
1224
1226
|
- `delete-mail-folder`
|
|
1225
1227
|
- `delete-mail-message`
|
|
1228
|
+
- `delete-mail-message-skip-deleted-items`
|
|
1226
1229
|
- `delete-mail-rule`
|
|
1227
1230
|
- `delete-my-calendar-permission`
|
|
1228
1231
|
- `delete-outlook-contact`
|
|
@@ -1356,7 +1359,7 @@ Scopes (6):
|
|
|
1356
1359
|
|
|
1357
1360
|
Personal productivity tools (mail, calendar, files, contacts, tasks, notes, search)
|
|
1358
1361
|
|
|
1359
|
-
Tools (
|
|
1362
|
+
Tools (178):
|
|
1360
1363
|
|
|
1361
1364
|
- `accept-calendar-event`
|
|
1362
1365
|
- `add-calendar-event-attachment`
|
|
@@ -1410,6 +1413,7 @@ Tools (177):
|
|
|
1410
1413
|
- `delete-mail-attachment`
|
|
1411
1414
|
- `delete-mail-folder`
|
|
1412
1415
|
- `delete-mail-message`
|
|
1416
|
+
- `delete-mail-message-skip-deleted-items`
|
|
1413
1417
|
- `delete-mail-rule`
|
|
1414
1418
|
- `delete-my-calendar-permission`
|
|
1415
1419
|
- `delete-onedrive-file`
|
|
@@ -10,8 +10,11 @@ export function createAndSaveSimplifiedOpenAPI(
|
|
|
10
10
|
const allEndpoints = JSON.parse(fs.readFileSync(endpointsFile, 'utf8'));
|
|
11
11
|
// Each spec is trimmed against only the endpoints targeting its version. Entries
|
|
12
12
|
// without an explicit apiVersion default to v1.0, so existing endpoints are unchanged.
|
|
13
|
+
// An entry with fixedBody shares another tool's operation (see EndpointConfig in
|
|
14
|
+
// src/graph-tools.ts), so it adds nothing to the spec.
|
|
13
15
|
const endpoints = allEndpoints.filter(
|
|
14
|
-
(endpoint) =>
|
|
16
|
+
(endpoint) =>
|
|
17
|
+
!endpoint.disabled && !endpoint.fixedBody && (endpoint.apiVersion ?? 'v1.0') === apiVersion
|
|
15
18
|
);
|
|
16
19
|
|
|
17
20
|
const spec = fs.readFileSync(openapiFile, 'utf8');
|
package/dist/endpoints.json
CHANGED
|
@@ -294,14 +294,22 @@
|
|
|
294
294
|
"presets": ["mail", "outlook", "personal"],
|
|
295
295
|
"scopes": ["Mail.ReadWrite"]
|
|
296
296
|
},
|
|
297
|
+
{
|
|
298
|
+
"pathPattern": "/me/messages/{message-id}/move",
|
|
299
|
+
"method": "post",
|
|
300
|
+
"toolName": "delete-mail-message",
|
|
301
|
+
"fixedBody": { "destinationId": "deleteditems" },
|
|
302
|
+
"descriptionOverride": "Delete an Outlook email message by its message ID, the way Delete in Outlook does: the message moves to the Deleted Items folder, where the user can see and restore it. Returns the moved message, which has a new id. A message already in Deleted Items stays there; to remove it from Deleted Items, use delete-mail-message-skip-deleted-items.",
|
|
303
|
+
"presets": ["mail", "outlook", "personal"],
|
|
304
|
+
"scopes": ["Mail.ReadWrite"]
|
|
305
|
+
},
|
|
297
306
|
{
|
|
298
307
|
"pathPattern": "/me/messages/{message-id}",
|
|
299
308
|
"method": "delete",
|
|
300
|
-
"toolName": "delete-mail-message",
|
|
301
|
-
"descriptionOverride": "Delete an Outlook email message by its message ID
|
|
309
|
+
"toolName": "delete-mail-message-skip-deleted-items",
|
|
310
|
+
"descriptionOverride": "Delete an Outlook email message by its message ID without moving it to Deleted Items, the way Shift+Delete in Outlook does: the message goes to Recoverable Items, is no longer shown in the mailbox, and the user can only restore it with Recover Deleted Items until the retention period ends. Also removes a message from Deleted Items. For an ordinary delete, use delete-mail-message.",
|
|
302
311
|
"presets": ["mail", "outlook", "personal"],
|
|
303
|
-
"scopes": ["Mail.ReadWrite"]
|
|
304
|
-
"llmTip": "Soft delete — moves to Deleted Items. To permanently delete, delete again from Deleted Items."
|
|
312
|
+
"scopes": ["Mail.ReadWrite"]
|
|
305
313
|
},
|
|
306
314
|
{
|
|
307
315
|
"pathPattern": "/me/messages/{message-id}/move",
|
package/dist/generated/client.js
CHANGED
|
@@ -10638,7 +10638,7 @@ having to fetch the entire set of messages from the server every time.`,
|
|
|
10638
10638
|
{
|
|
10639
10639
|
method: "delete",
|
|
10640
10640
|
path: "/me/messages/:messageId",
|
|
10641
|
-
alias: "delete-mail-message",
|
|
10641
|
+
alias: "delete-mail-message-skip-deleted-items",
|
|
10642
10642
|
description: `Delete eventMessage.`,
|
|
10643
10643
|
requestFormat: "json",
|
|
10644
10644
|
parameters: [
|
package/dist/graph-tools.js
CHANGED
|
@@ -84,12 +84,47 @@ import {
|
|
|
84
84
|
import logger from "./logger.js";
|
|
85
85
|
import { getRequestTokens } from "./request-context.js";
|
|
86
86
|
import { TOOL_CATEGORIES } from "./tool-categories.js";
|
|
87
|
-
const allEndpoints = [...api.endpoints, ...betaApi.endpoints];
|
|
88
87
|
const __filename = fileURLToPath(import.meta.url);
|
|
89
88
|
const __dirname = path.dirname(__filename);
|
|
90
89
|
const endpointsData = JSON.parse(
|
|
91
90
|
readFileSync(path.join(__dirname, "endpoints.json"), "utf8")
|
|
92
91
|
);
|
|
92
|
+
function generatedPathFor(pathPattern) {
|
|
93
|
+
return pathPattern.replace(
|
|
94
|
+
/\{([^}]+)\}/g,
|
|
95
|
+
(_, name) => `:${name.replace(/-([a-z])/g, (_m, c) => c.toUpperCase())}`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function deriveFixedBodyEndpoints(configs, generated, report) {
|
|
99
|
+
const derived = [];
|
|
100
|
+
for (const e of configs) {
|
|
101
|
+
if (!e.fixedBody || e.disabled) continue;
|
|
102
|
+
const source = e.apiVersion === "beta" ? generated.beta : generated.v1;
|
|
103
|
+
const wantedPath = generatedPathFor(e.pathPattern);
|
|
104
|
+
const base = source.find((t) => t.method === e.method.toLowerCase() && t.path === wantedPath);
|
|
105
|
+
if (!base) {
|
|
106
|
+
report(
|
|
107
|
+
`endpoints.json: ${e.toolName} has fixedBody but no generated operation for ${e.method.toUpperCase()} ${e.pathPattern}; tool not registered`
|
|
108
|
+
);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
derived.push({
|
|
112
|
+
...base,
|
|
113
|
+
alias: e.toolName,
|
|
114
|
+
parameters: (base.parameters ?? []).filter((p) => p.type !== "Body")
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return derived;
|
|
118
|
+
}
|
|
119
|
+
const allEndpoints = [
|
|
120
|
+
...api.endpoints,
|
|
121
|
+
...betaApi.endpoints,
|
|
122
|
+
...deriveFixedBodyEndpoints(
|
|
123
|
+
endpointsData,
|
|
124
|
+
{ v1: api.endpoints, beta: betaApi.endpoints },
|
|
125
|
+
(m) => logger.error(m)
|
|
126
|
+
)
|
|
127
|
+
];
|
|
93
128
|
function withApiVersionPrefix(description, config) {
|
|
94
129
|
return config?.apiVersion === "beta" ? `[beta] ${description}` : description;
|
|
95
130
|
}
|
|
@@ -2070,6 +2105,9 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
2070
2105
|
method: tool.method.toUpperCase(),
|
|
2071
2106
|
headers
|
|
2072
2107
|
};
|
|
2108
|
+
if (config?.fixedBody) {
|
|
2109
|
+
body = { ...config.fixedBody };
|
|
2110
|
+
}
|
|
2073
2111
|
if (config?.blobOutput && isBlobOutputEnabled()) {
|
|
2074
2112
|
options.forceBinary = true;
|
|
2075
2113
|
options.maxBytes = getBlobMaxBytes();
|
|
@@ -2987,7 +3025,9 @@ export {
|
|
|
2987
3025
|
UTILITY_TOOLS,
|
|
2988
3026
|
buildDiscoverySearchIndex,
|
|
2989
3027
|
buildToolsRegistry,
|
|
3028
|
+
deriveFixedBodyEndpoints,
|
|
2990
3029
|
filterMembersByName,
|
|
3030
|
+
generatedPathFor,
|
|
2991
3031
|
isDestructiveOperation,
|
|
2992
3032
|
isUtilityToolAvailable,
|
|
2993
3033
|
registerDiscoveryTools,
|
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.180.
|
|
4
|
+
"version": "0.180.2",
|
|
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",
|
package/src/endpoints.json
CHANGED
|
@@ -294,14 +294,22 @@
|
|
|
294
294
|
"presets": ["mail", "outlook", "personal"],
|
|
295
295
|
"scopes": ["Mail.ReadWrite"]
|
|
296
296
|
},
|
|
297
|
+
{
|
|
298
|
+
"pathPattern": "/me/messages/{message-id}/move",
|
|
299
|
+
"method": "post",
|
|
300
|
+
"toolName": "delete-mail-message",
|
|
301
|
+
"fixedBody": { "destinationId": "deleteditems" },
|
|
302
|
+
"descriptionOverride": "Delete an Outlook email message by its message ID, the way Delete in Outlook does: the message moves to the Deleted Items folder, where the user can see and restore it. Returns the moved message, which has a new id. A message already in Deleted Items stays there; to remove it from Deleted Items, use delete-mail-message-skip-deleted-items.",
|
|
303
|
+
"presets": ["mail", "outlook", "personal"],
|
|
304
|
+
"scopes": ["Mail.ReadWrite"]
|
|
305
|
+
},
|
|
297
306
|
{
|
|
298
307
|
"pathPattern": "/me/messages/{message-id}",
|
|
299
308
|
"method": "delete",
|
|
300
|
-
"toolName": "delete-mail-message",
|
|
301
|
-
"descriptionOverride": "Delete an Outlook email message by its message ID
|
|
309
|
+
"toolName": "delete-mail-message-skip-deleted-items",
|
|
310
|
+
"descriptionOverride": "Delete an Outlook email message by its message ID without moving it to Deleted Items, the way Shift+Delete in Outlook does: the message goes to Recoverable Items, is no longer shown in the mailbox, and the user can only restore it with Recover Deleted Items until the retention period ends. Also removes a message from Deleted Items. For an ordinary delete, use delete-mail-message.",
|
|
302
311
|
"presets": ["mail", "outlook", "personal"],
|
|
303
|
-
"scopes": ["Mail.ReadWrite"]
|
|
304
|
-
"llmTip": "Soft delete — moves to Deleted Items. To permanently delete, delete again from Deleted Items."
|
|
312
|
+
"scopes": ["Mail.ReadWrite"]
|
|
305
313
|
},
|
|
306
314
|
{
|
|
307
315
|
"pathPattern": "/me/messages/{message-id}/move",
|