@softeria/ms-365-mcp-server 0.161.2 → 0.161.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.
@@ -1036,6 +1036,19 @@ const UTILITY_TOOLS = [
1036
1036
  }
1037
1037
  const pathPart = target.replace(/\/+$/, "");
1038
1038
  if (/^(\/me|\/users\/[^/]+)\/messages\/[^/]+\/attachments\//.test(pathPart) || /^(\/me|\/users\/[^/]+)\/events\/[^/]+\/attachments\//.test(pathPart) || /^\/groups\/[^/]+\/messages\/[^/]+\/attachments\//.test(pathPart) || /^\/groups\/[^/]+\/events\/[^/]+\/attachments\//.test(pathPart)) {
1039
+ if (getAttachmentMinting() && !pathPart.endsWith("/$value")) {
1040
+ return {
1041
+ content: [
1042
+ {
1043
+ type: "text",
1044
+ text: JSON.stringify({
1045
+ error: "Only the /$value byte endpoint can be minted a download URL: end target with /$value, e.g. /me/messages/{message-id}/attachments/{attachment-id}/$value. The attachment resource itself returns JSON with base64 contentBytes."
1046
+ })
1047
+ }
1048
+ ],
1049
+ isError: true
1050
+ };
1051
+ }
1039
1052
  const minted = await mintDownloadUrl(pathPart, accountParam, authManager);
1040
1053
  if (minted) return minted;
1041
1054
  return {
@@ -1053,6 +1066,19 @@ const UTILITY_TOOLS = [
1053
1066
  if (/^(\/me|\/users\/[^/]+)\/onlineMeetings\/[^/]+\/recordings\/[^/]+(?:\/content)?$/.test(
1054
1067
  pathPart
1055
1068
  ) || /^\/communications\/calls\/[^/]+\/recordings\/[^/]+(?:\/content)?$/.test(pathPart)) {
1069
+ if (getAttachmentMinting() && !pathPart.endsWith("/content")) {
1070
+ return {
1071
+ content: [
1072
+ {
1073
+ type: "text",
1074
+ text: JSON.stringify({
1075
+ error: "Only the /content byte endpoint can be minted a download URL: end target with /content, e.g. /me/onlineMeetings/{meeting-id}/recordings/{recording-id}/content."
1076
+ })
1077
+ }
1078
+ ],
1079
+ isError: true
1080
+ };
1081
+ }
1056
1082
  const minted = await mintDownloadUrl(pathPart, accountParam, authManager);
1057
1083
  if (minted) return minted;
1058
1084
  return {
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.161.2",
4
+ "version": "0.161.3",
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",