@softeria/ms-365-mcp-server 0.179.0 → 0.179.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 +8 -1
- package/package.json +1 -1
package/dist/graph-tools.js
CHANGED
|
@@ -1812,6 +1812,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
1812
1812
|
parameterDefinitions.find((p) => p.type === "Body")?.schema
|
|
1813
1813
|
);
|
|
1814
1814
|
const strayBodyFields = {};
|
|
1815
|
+
let bodyRepaired = false;
|
|
1815
1816
|
const memberNameFilter = config?.nameFilter && typeof params.name === "string" ? params.name : void 0;
|
|
1816
1817
|
for (const [paramName, paramValue] of Object.entries(params)) {
|
|
1817
1818
|
if (paramName === "fileName" && config?.blobOutput) continue;
|
|
@@ -1903,6 +1904,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
1903
1904
|
`Auto-corrected parameter '${paramName}': AI passed nested field directly, wrapped it as {${paramName}: ...}`
|
|
1904
1905
|
);
|
|
1905
1906
|
body = wrapped;
|
|
1907
|
+
bodyRepaired = true;
|
|
1906
1908
|
} else {
|
|
1907
1909
|
body = paramValue;
|
|
1908
1910
|
}
|
|
@@ -1970,6 +1972,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
1970
1972
|
}
|
|
1971
1973
|
if (Object.keys(nested).length > 0) {
|
|
1972
1974
|
body = { ...kept, body: { ...nested, ...annotations } };
|
|
1975
|
+
bodyRepaired = true;
|
|
1973
1976
|
logger.info(
|
|
1974
1977
|
`Moved misplaced fields into nested 'body' for ${tool.alias}: ${Object.keys(nested).join(", ")}`
|
|
1975
1978
|
);
|
|
@@ -1977,7 +1980,11 @@ async function executeGraphTool(tool, config, graphClient, params, authManager,
|
|
|
1977
1980
|
}
|
|
1978
1981
|
}
|
|
1979
1982
|
if (Object.keys(strayBodyFields).length > 0) {
|
|
1980
|
-
if (isPlainObject(body)) {
|
|
1983
|
+
if (httpMethod === "PATCH" && !bodyRepaired && isPlainObject(body) && Object.keys(body).length > 0) {
|
|
1984
|
+
logger.warn(
|
|
1985
|
+
`Ignoring flattened body fields (${Object.keys(strayBodyFields).join(", ")}) for ${tool.alias}: PATCH uses the explicit body as-is; put every property to change inside body`
|
|
1986
|
+
);
|
|
1987
|
+
} else if (isPlainObject(body)) {
|
|
1981
1988
|
body = { ...strayBodyFields, ...body };
|
|
1982
1989
|
logger.info(`Merged flattened body fields: ${Object.keys(strayBodyFields).join(", ")}`);
|
|
1983
1990
|
} else if (body == 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.179.
|
|
4
|
+
"version": "0.179.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",
|