@softeria/ms-365-mcp-server 0.128.0 → 0.128.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.
@@ -359,6 +359,7 @@
359
359
  "toolName": "create-calendar-event",
360
360
  "presets": ["calendar", "outlook", "personal"],
361
361
  "scopes": ["Calendars.ReadWrite"],
362
+ "descriptionOverride": "Create (schedule) a new calendar event — a meeting or appointment — on the user's calendar. Set subject, start/end times, time zone, location, body, and attendees; supports online meetings and recurrence.",
362
363
  "llmTip": "CRITICAL: Do not try to guess the email address of the recipients. Use the list-users tool to find the email address of the recipients."
363
364
  },
364
365
  {
@@ -75,6 +75,8 @@ class GraphClient {
75
75
  const text = await response.text();
76
76
  if (text === "") {
77
77
  result = { message: "OK!" };
78
+ } else if (options.rawResponse) {
79
+ result = { message: "OK!", rawResponse: text };
78
80
  } else {
79
81
  try {
80
82
  result = JSON.parse(text);
@@ -170,7 +170,10 @@ const UTILITY_TOOLS = [
170
170
  if (authManager && !authManager.isOAuthModeEnabled() && !getRequestTokens()) {
171
171
  accountAccessToken = await authManager.getTokenForAccount(accountParam);
172
172
  }
173
- return await graphClient.graphRequest(target, { accessToken: accountAccessToken });
173
+ return await graphClient.graphRequest(target, {
174
+ accessToken: accountAccessToken,
175
+ rawResponse: true
176
+ });
174
177
  } catch (error) {
175
178
  return {
176
179
  content: [{ type: "text", text: JSON.stringify({ error: error.message }) }],
@@ -823,7 +826,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
823
826
  ).optional();
824
827
  }
825
828
  let toolDescription = withApiVersionPrefix(
826
- tool.description || `Execute ${tool.method.toUpperCase()} request to ${tool.path}`,
829
+ (endpointConfig?.descriptionOverride ?? tool.description) || `Execute ${tool.method.toUpperCase()} request to ${tool.path}`,
827
830
  endpointConfig
828
831
  );
829
832
  if (endpointConfig?.llmTip) {
@@ -920,7 +923,10 @@ function buildDiscoverySearchIndex(toolsRegistry, utilityTools = []) {
920
923
  const nt = tokenize(name);
921
924
  nameTokens.set(name, new Set(nt));
922
925
  const pathTokens = tokenize(tool.path);
923
- const descTokens = tokenize(tool.description).slice(0, DESC_CAP_TOKENS);
926
+ const descTokens = tokenize(config?.descriptionOverride ?? tool.description).slice(
927
+ 0,
928
+ DESC_CAP_TOKENS
929
+ );
924
930
  const tipTokens = tokenize(config?.llmTip).slice(0, TIP_EXCERPT_TOKENS);
925
931
  const tokens = [
926
932
  ...nt,
@@ -1032,7 +1038,7 @@ function registerDiscoveryTools(server, graphClient, readOnly = false, orgMode =
1032
1038
  method: tool.method.toUpperCase(),
1033
1039
  path: tool.path,
1034
1040
  description: withApiVersionPrefix(
1035
- tool.description || `${tool.method.toUpperCase()} ${tool.path}`,
1041
+ (config?.descriptionOverride ?? tool.description) || `${tool.method.toUpperCase()} ${tool.path}`,
1036
1042
  config
1037
1043
  ),
1038
1044
  ...config?.llmTip ? { llmTip: config.llmTip } : {}
@@ -1111,7 +1117,11 @@ function registerDiscoveryTools(server, graphClient, readOnly = false, orgMode =
1111
1117
  async ({ tool_name }) => {
1112
1118
  const entry = toolsRegistry.get(tool_name);
1113
1119
  if (entry) {
1114
- const schema = describeToolSchema(entry.tool, entry.config?.llmTip);
1120
+ const schema = describeToolSchema(
1121
+ entry.tool,
1122
+ entry.config?.llmTip,
1123
+ entry.config?.descriptionOverride
1124
+ );
1115
1125
  return {
1116
1126
  content: [{ type: "text", text: JSON.stringify(schema, null, 2) }]
1117
1127
  };
@@ -7,7 +7,7 @@ function unwrapOptional(schema) {
7
7
  }
8
8
  return { inner: schema, optional: false };
9
9
  }
10
- function describeToolSchema(tool, llmTip) {
10
+ function describeToolSchema(tool, llmTip, descriptionOverride) {
11
11
  const params = (tool.parameters ?? []).map((p) => {
12
12
  const { inner, optional } = unwrapOptional(p.schema);
13
13
  const isPath = p.type === "Path";
@@ -25,7 +25,7 @@ function describeToolSchema(tool, llmTip) {
25
25
  name: tool.alias,
26
26
  method: tool.method.toUpperCase(),
27
27
  path: tool.path,
28
- description: tool.description ?? "",
28
+ description: descriptionOverride ?? tool.description ?? "",
29
29
  ...llmTip ? { llmTip } : {},
30
30
  parameters: params
31
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softeria/ms-365-mcp-server",
3
- "version": "0.128.0",
3
+ "version": "0.128.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",
@@ -359,6 +359,7 @@
359
359
  "toolName": "create-calendar-event",
360
360
  "presets": ["calendar", "outlook", "personal"],
361
361
  "scopes": ["Calendars.ReadWrite"],
362
+ "descriptionOverride": "Create (schedule) a new calendar event — a meeting or appointment — on the user's calendar. Set subject, start/end times, time zone, location, body, and attendees; supports online meetings and recurrence.",
362
363
  "llmTip": "CRITICAL: Do not try to guess the email address of the recipients. Use the list-users tool to find the email address of the recipients."
363
364
  },
364
365
  {