@softeria/ms-365-mcp-server 0.191.0 → 0.191.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/graph-tools.js +9 -2
- package/package.json +1 -1
package/dist/graph-tools.js
CHANGED
|
@@ -2083,6 +2083,13 @@ function rawValueAddsSegments(template, names, value) {
|
|
|
2083
2083
|
const isTail = names.some((n) => template.endsWith(`/{${n}}`) || template.endsWith(`/:${n}`));
|
|
2084
2084
|
return isTail ? value.includes(":") : value.includes("/");
|
|
2085
2085
|
}
|
|
2086
|
+
function fillPathParam(path2, names, value) {
|
|
2087
|
+
for (const name of new Set(names)) {
|
|
2088
|
+
const colonForm = new RegExp(`:${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![A-Za-z0-9])`);
|
|
2089
|
+
path2 = path2.replace(`{${name}}`, () => value).replace(colonForm, () => value);
|
|
2090
|
+
}
|
|
2091
|
+
return path2;
|
|
2092
|
+
}
|
|
2086
2093
|
function invalidPathParameter(message) {
|
|
2087
2094
|
return {
|
|
2088
2095
|
content: [
|
|
@@ -2243,7 +2250,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
2243
2250
|
/%3D/g,
|
|
2244
2251
|
"="
|
|
2245
2252
|
);
|
|
2246
|
-
path2 = path2
|
|
2253
|
+
path2 = fillPathParam(path2, names, encodedValue);
|
|
2247
2254
|
break;
|
|
2248
2255
|
}
|
|
2249
2256
|
case "Query":
|
|
@@ -2284,7 +2291,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
2284
2291
|
const encodedValue = encodeURIComponent(
|
|
2285
2292
|
escapeIfStringLiteral(tool.path, [paramName, camelCaseParamName], paramValue)
|
|
2286
2293
|
).replace(/%3D/g, "=");
|
|
2287
|
-
path2 = path2
|
|
2294
|
+
path2 = fillPathParam(path2, [paramName, camelCaseParamName], encodedValue);
|
|
2288
2295
|
logger.info(`Path param fallback: replaced :${camelCaseParamName} with encoded value`);
|
|
2289
2296
|
} else if (paramName.toLowerCase() === "accept" && config?.acceptType) {
|
|
2290
2297
|
if (paramValue !== "" && paramValue != null) {
|
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.191.
|
|
4
|
+
"version": "0.191.1",
|
|
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",
|