@softeria/ms-365-mcp-server 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/endpoints.json +4 -2
- package/dist/graph-tools.js +6 -1
- package/package.json +1 -1
- package/src/endpoints.json +4 -2
package/dist/endpoints.json
CHANGED
|
@@ -207,7 +207,8 @@
|
|
|
207
207
|
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}/content",
|
|
208
208
|
"method": "get",
|
|
209
209
|
"toolName": "download-onedrive-file-content",
|
|
210
|
-
"scopes": ["Files.Read"]
|
|
210
|
+
"scopes": ["Files.Read"],
|
|
211
|
+
"returnDownloadUrl": true
|
|
211
212
|
},
|
|
212
213
|
{
|
|
213
214
|
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}",
|
|
@@ -278,7 +279,8 @@
|
|
|
278
279
|
"pathPattern": "/me/onenote/pages/{onenotePage-id}/content",
|
|
279
280
|
"method": "get",
|
|
280
281
|
"toolName": "get-onenote-page-content",
|
|
281
|
-
"scopes": ["Notes.Read"]
|
|
282
|
+
"scopes": ["Notes.Read"],
|
|
283
|
+
"returnDownloadUrl": true
|
|
282
284
|
},
|
|
283
285
|
{
|
|
284
286
|
"pathPattern": "/me/onenote/pages",
|
package/dist/graph-tools.js
CHANGED
|
@@ -134,7 +134,12 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
|
|
|
134
134
|
options.body = typeof body === "string" ? body : JSON.stringify(body);
|
|
135
135
|
}
|
|
136
136
|
const isProbablyMediaContent = tool.errors?.some((error) => error.description === "Retrieved media content") || path2.endsWith("/content");
|
|
137
|
-
if (
|
|
137
|
+
if (endpointConfig?.returnDownloadUrl && path2.endsWith("/content")) {
|
|
138
|
+
path2 = path2.replace(/\/content$/, "");
|
|
139
|
+
logger.info(
|
|
140
|
+
`Auto-returning download URL for ${tool.alias} (returnDownloadUrl=true in endpoints.json)`
|
|
141
|
+
);
|
|
142
|
+
} else if (isProbablyMediaContent) {
|
|
138
143
|
options.rawResponse = true;
|
|
139
144
|
}
|
|
140
145
|
if (params.includeHeaders === true) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1",
|
|
4
4
|
"description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/endpoints.json
CHANGED
|
@@ -207,7 +207,8 @@
|
|
|
207
207
|
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}/content",
|
|
208
208
|
"method": "get",
|
|
209
209
|
"toolName": "download-onedrive-file-content",
|
|
210
|
-
"scopes": ["Files.Read"]
|
|
210
|
+
"scopes": ["Files.Read"],
|
|
211
|
+
"returnDownloadUrl": true
|
|
211
212
|
},
|
|
212
213
|
{
|
|
213
214
|
"pathPattern": "/drives/{drive-id}/items/{driveItem-id}",
|
|
@@ -278,7 +279,8 @@
|
|
|
278
279
|
"pathPattern": "/me/onenote/pages/{onenotePage-id}/content",
|
|
279
280
|
"method": "get",
|
|
280
281
|
"toolName": "get-onenote-page-content",
|
|
281
|
-
"scopes": ["Notes.Read"]
|
|
282
|
+
"scopes": ["Notes.Read"],
|
|
283
|
+
"returnDownloadUrl": true
|
|
282
284
|
},
|
|
283
285
|
{
|
|
284
286
|
"pathPattern": "/me/onenote/pages",
|