@softeria/ms-365-mcp-server 0.191.1 → 0.191.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.
@@ -2083,13 +2083,18 @@ 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 colonPlaceholder(name) {
2087
+ return new RegExp(`:${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![A-Za-z0-9])`);
2088
+ }
2086
2089
  function fillPathParam(path2, names, value) {
2087
2090
  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);
2091
+ path2 = path2.replace(`{${name}}`, () => value).replace(colonPlaceholder(name), () => value);
2090
2092
  }
2091
2093
  return path2;
2092
2094
  }
2095
+ function hasPathPlaceholder(path2, names) {
2096
+ return names.some((name) => path2.includes(`{${name}}`) || colonPlaceholder(name).test(path2));
2097
+ }
2093
2098
  function invalidPathParameter(message) {
2094
2099
  return {
2095
2100
  content: [
@@ -2287,7 +2292,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
2287
2292
  } else if (paramName === "body") {
2288
2293
  body = paramValue;
2289
2294
  logger.info(`Set body param: ${describeShape(body)} (${serializedSize(body)} bytes)`);
2290
- } else if (path2.includes(`:${paramName}`) || path2.includes(`{${paramName}}`) || path2.includes(`:${camelCaseParamName}`) || path2.includes(`{${camelCaseParamName}}`)) {
2295
+ } else if (hasPathPlaceholder(path2, [paramName, camelCaseParamName])) {
2291
2296
  const encodedValue = encodeURIComponent(
2292
2297
  escapeIfStringLiteral(tool.path, [paramName, camelCaseParamName], paramValue)
2293
2298
  ).replace(/%3D/g, "=");
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.1",
4
+ "version": "0.191.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",