@softeria/ms-365-mcp-server 0.12.1 → 0.12.3
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.
|
@@ -23,6 +23,9 @@ export function createAndSaveSimplifiedOpenAPI(endpointsFile, openapiFile, opena
|
|
|
23
23
|
const eo = e.find((ep) => ep.method.toLowerCase() === method);
|
|
24
24
|
if (eo) {
|
|
25
25
|
operation.operationId = eo.toolName;
|
|
26
|
+
if (!operation.description && operation.summary) {
|
|
27
|
+
operation.description = operation.summary;
|
|
28
|
+
}
|
|
26
29
|
} else {
|
|
27
30
|
delete value[method];
|
|
28
31
|
}
|
package/dist/auth-tools.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
function registerAuthTools(server, authManager) {
|
|
3
3
|
server.tool(
|
|
4
4
|
"login",
|
|
5
|
+
"Authenticate with Microsoft using device code flow",
|
|
5
6
|
{
|
|
6
7
|
force: z.boolean().default(false).describe("Force a new login even if already logged in")
|
|
7
8
|
},
|
|
@@ -46,7 +47,7 @@ function registerAuthTools(server, authManager) {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
);
|
|
49
|
-
server.tool("logout", {}, async () => {
|
|
50
|
+
server.tool("logout", "Log out from Microsoft account", {}, async () => {
|
|
50
51
|
try {
|
|
51
52
|
await authManager.logout();
|
|
52
53
|
return {
|
|
@@ -68,7 +69,7 @@ function registerAuthTools(server, authManager) {
|
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
|
-
server.tool("verify-login", async () => {
|
|
72
|
+
server.tool("verify-login", "Check current Microsoft authentication status", {}, async () => {
|
|
72
73
|
const testResult = await authManager.testLogin();
|
|
73
74
|
return {
|
|
74
75
|
content: [
|
|
@@ -79,7 +80,7 @@ function registerAuthTools(server, authManager) {
|
|
|
79
80
|
]
|
|
80
81
|
};
|
|
81
82
|
});
|
|
82
|
-
server.tool("list-accounts", {}, async () => {
|
|
83
|
+
server.tool("list-accounts", "List all available Microsoft accounts", {}, async () => {
|
|
83
84
|
try {
|
|
84
85
|
const accounts = await authManager.listAccounts();
|
|
85
86
|
const selectedAccountId = authManager.getSelectedAccountId();
|
|
@@ -110,6 +111,7 @@ function registerAuthTools(server, authManager) {
|
|
|
110
111
|
});
|
|
111
112
|
server.tool(
|
|
112
113
|
"select-account",
|
|
114
|
+
"Select a specific Microsoft account to use",
|
|
113
115
|
{
|
|
114
116
|
accountId: z.string().describe("The account ID to select")
|
|
115
117
|
},
|
|
@@ -140,7 +142,9 @@ function registerAuthTools(server, authManager) {
|
|
|
140
142
|
content: [
|
|
141
143
|
{
|
|
142
144
|
type: "text",
|
|
143
|
-
text: JSON.stringify({
|
|
145
|
+
text: JSON.stringify({
|
|
146
|
+
error: `Failed to select account: ${error.message}`
|
|
147
|
+
})
|
|
144
148
|
}
|
|
145
149
|
]
|
|
146
150
|
};
|
|
@@ -149,6 +153,7 @@ function registerAuthTools(server, authManager) {
|
|
|
149
153
|
);
|
|
150
154
|
server.tool(
|
|
151
155
|
"remove-account",
|
|
156
|
+
"Remove a Microsoft account from the cache",
|
|
152
157
|
{
|
|
153
158
|
accountId: z.string().describe("The account ID to remove")
|
|
154
159
|
},
|
|
@@ -179,7 +184,9 @@ function registerAuthTools(server, authManager) {
|
|
|
179
184
|
content: [
|
|
180
185
|
{
|
|
181
186
|
type: "text",
|
|
182
|
-
text: JSON.stringify({
|
|
187
|
+
text: JSON.stringify({
|
|
188
|
+
error: `Failed to remove account: ${error.message}`
|
|
189
|
+
})
|
|
183
190
|
}
|
|
184
191
|
]
|
|
185
192
|
};
|
package/dist/generated/client.js
CHANGED
|
@@ -3416,6 +3416,7 @@ const endpoints = makeApi([
|
|
|
3416
3416
|
method: "post",
|
|
3417
3417
|
path: "/chats/:chatId/messages/:chatMessageId/replies",
|
|
3418
3418
|
alias: "reply-to-chat-message",
|
|
3419
|
+
description: `Create new navigation property to replies for chats`,
|
|
3419
3420
|
requestFormat: "json",
|
|
3420
3421
|
parameters: [
|
|
3421
3422
|
{
|
|
@@ -3448,6 +3449,7 @@ const endpoints = makeApi([
|
|
|
3448
3449
|
method: "delete",
|
|
3449
3450
|
path: "/drives/:driveId/items/:driveItemId",
|
|
3450
3451
|
alias: "delete-onedrive-file",
|
|
3452
|
+
description: `Delete navigation property items for drives`,
|
|
3451
3453
|
requestFormat: "json",
|
|
3452
3454
|
parameters: [
|
|
3453
3455
|
{
|
|
@@ -3690,6 +3692,7 @@ const endpoints = makeApi([
|
|
|
3690
3692
|
method: "patch",
|
|
3691
3693
|
path: "/drives/:driveId/items/:driveItemId/workbook/worksheets/:workbookWorksheetId/range()/format",
|
|
3692
3694
|
alias: "format-excel-range",
|
|
3695
|
+
description: `Update the navigation property format in drives`,
|
|
3693
3696
|
requestFormat: "json",
|
|
3694
3697
|
parameters: [
|
|
3695
3698
|
{
|
|
@@ -3722,6 +3725,7 @@ const endpoints = makeApi([
|
|
|
3722
3725
|
method: "patch",
|
|
3723
3726
|
path: "/drives/:driveId/items/:driveItemId/workbook/worksheets/:workbookWorksheetId/range()/sort",
|
|
3724
3727
|
alias: "sort-excel-range",
|
|
3728
|
+
description: `Update the navigation property sort in drives`,
|
|
3725
3729
|
requestFormat: "json",
|
|
3726
3730
|
parameters: [
|
|
3727
3731
|
{
|
|
@@ -3758,6 +3762,7 @@ const endpoints = makeApi([
|
|
|
3758
3762
|
method: "get",
|
|
3759
3763
|
path: "/drives/:driveId/items/:driveItemId/workbook/worksheets/:workbookWorksheetId/range(address=':address')",
|
|
3760
3764
|
alias: "get-excel-range",
|
|
3765
|
+
description: `Invoke function range`,
|
|
3761
3766
|
requestFormat: "json",
|
|
3762
3767
|
response: z.void(),
|
|
3763
3768
|
errors: [
|
|
@@ -4076,6 +4081,7 @@ or from some other calendar of the user.`,
|
|
|
4076
4081
|
method: "get",
|
|
4077
4082
|
path: "/me/chats",
|
|
4078
4083
|
alias: "list-chats",
|
|
4084
|
+
description: `Get chats from me`,
|
|
4079
4085
|
requestFormat: "json",
|
|
4080
4086
|
parameters: [
|
|
4081
4087
|
{
|
|
@@ -6573,6 +6579,7 @@ A site resource represents a team site in SharePoint.`,
|
|
|
6573
6579
|
method: "get",
|
|
6574
6580
|
path: "/sites/:siteId/getByPath(path=':path')",
|
|
6575
6581
|
alias: "get-sharepoint-site-by-path",
|
|
6582
|
+
description: `Invoke function getByPath`,
|
|
6576
6583
|
requestFormat: "json",
|
|
6577
6584
|
response: z.void(),
|
|
6578
6585
|
errors: [
|
package/dist/graph-client.js
CHANGED
|
@@ -110,7 +110,15 @@ class GraphClient {
|
|
|
110
110
|
if (!response.ok) {
|
|
111
111
|
throw new Error(`Microsoft Graph API error: ${response.status} ${response.statusText}`);
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
const text = await response.text();
|
|
114
|
+
if (text === "") {
|
|
115
|
+
return { message: "OK!" };
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
return JSON.parse(text);
|
|
119
|
+
} catch (jsonError) {
|
|
120
|
+
return { message: "OK!", rawResponse: text };
|
|
121
|
+
}
|
|
114
122
|
} catch (error) {
|
|
115
123
|
logger.error("Microsoft Graph API request failed:", error);
|
|
116
124
|
throw error;
|
package/dist/graph-tools.js
CHANGED
|
@@ -35,7 +35,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
|
|
|
35
35
|
}
|
|
36
36
|
server.tool(
|
|
37
37
|
tool.alias,
|
|
38
|
-
tool.description
|
|
38
|
+
tool.description || `Execute ${tool.method.toUpperCase()} request to ${tool.path}`,
|
|
39
39
|
paramSchema,
|
|
40
40
|
{
|
|
41
41
|
title: tool.alias,
|