@softeria/ms-365-mcp-server 0.174.1 → 0.175.0
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/PRESETS.md +26 -20
- package/README.md +6 -3
- package/bin/generate-presets-md.ts +3 -1
- package/dist/cli.js +1 -1
- package/dist/endpoints.json +27 -0
- package/dist/generated/client.js +151 -0
- package/dist/graph-tools.js +13 -8
- package/dist/server.js +13 -1
- package/package.json +1 -2
- package/src/endpoints.json +27 -0
package/PRESETS.md
CHANGED
|
@@ -4,30 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
## Summary
|
|
6
6
|
|
|
7
|
-
| Preset
|
|
8
|
-
|
|
|
9
|
-
| `all`
|
|
10
|
-
| `calendar`
|
|
11
|
-
| `contacts`
|
|
12
|
-
| `excel`
|
|
13
|
-
| `files`
|
|
14
|
-
| `mail`
|
|
15
|
-
| `onedrive`
|
|
16
|
-
| `onenote`
|
|
17
|
-
| `outlook`
|
|
18
|
-
| `personal`
|
|
19
|
-
| `search`
|
|
20
|
-
| `tasks`
|
|
21
|
-
| `teams`
|
|
22
|
-
| `teams-write` | 11 | required | Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading |
|
|
23
|
-
| `users`
|
|
24
|
-
| `work`
|
|
7
|
+
| Preset | Tools | Org mode | Description |
|
|
8
|
+
| ----------------------------- | ----: | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| [`all`](#all) | 364 | | All available tools |
|
|
10
|
+
| [`calendar`](#calendar) | 47 | | Calendar and event management |
|
|
11
|
+
| [`contacts`](#contacts) | 15 | | Outlook contacts management |
|
|
12
|
+
| [`excel`](#excel) | 25 | | Excel spreadsheet operations |
|
|
13
|
+
| [`files`](#files) | 25 | | OneDrive file and folder operations |
|
|
14
|
+
| [`mail`](#mail) | 49 | | Email operations (read, send, manage folders, attachments) |
|
|
15
|
+
| [`onedrive`](#onedrive) | 23 | | OneDrive app only: drive and file operations, excluding Excel |
|
|
16
|
+
| [`onenote`](#onenote) | 28 | | OneNote notebook operations |
|
|
17
|
+
| [`outlook`](#outlook) | 96 | | Outlook app only: mail, calendar and contacts |
|
|
18
|
+
| [`personal`](#personal) | 175 | | Personal productivity tools (mail, calendar, files, contacts, tasks, notes, search) |
|
|
19
|
+
| [`search`](#search) | 7 | | Microsoft Search capabilities |
|
|
20
|
+
| [`tasks`](#tasks) | 34 | | Task and planning tools (To Do, Planner) |
|
|
21
|
+
| [`teams`](#teams) | 73 | required | Teams app only: chats, channels, meetings and presence |
|
|
22
|
+
| [`teams-write`](#teams-write) | 11 | required | Teams send-only: send/reply in chats and channels, list chats/teams/channels by name, activity notifications - no message reading |
|
|
23
|
+
| [`users`](#users) | 11 | required | User directory access |
|
|
24
|
+
| [`work`](#work) | 187 | required | Organization/work tools (Teams, SharePoint, shared mailboxes, search) |
|
|
25
25
|
|
|
26
26
|
## `all`
|
|
27
27
|
|
|
28
28
|
All available tools
|
|
29
29
|
|
|
30
|
-
Tools (
|
|
30
|
+
Tools (364):
|
|
31
31
|
|
|
32
32
|
- `accept-calendar-event`
|
|
33
33
|
- `add-calendar-event-attachment`
|
|
@@ -80,6 +80,7 @@ Tools (361):
|
|
|
80
80
|
- `create-planner-task-message`
|
|
81
81
|
- `create-reply-all-draft`
|
|
82
82
|
- `create-reply-draft`
|
|
83
|
+
- `create-shared-calendar-event`
|
|
83
84
|
- `create-shared-mailbox-child-folder`
|
|
84
85
|
- `create-shared-mailbox-draft`
|
|
85
86
|
- `create-shared-mailbox-folder`
|
|
@@ -121,6 +122,7 @@ Tools (361):
|
|
|
121
122
|
- `delete-outlook-contact`
|
|
122
123
|
- `delete-planner-bucket`
|
|
123
124
|
- `delete-planner-task-message`
|
|
125
|
+
- `delete-shared-calendar-event`
|
|
124
126
|
- `delete-shared-mailbox-attachment`
|
|
125
127
|
- `delete-sharepoint-list-column`
|
|
126
128
|
- `delete-sharepoint-list-item`
|
|
@@ -377,6 +379,7 @@ Tools (361):
|
|
|
377
379
|
- `update-planner-plan`
|
|
378
380
|
- `update-planner-task`
|
|
379
381
|
- `update-planner-task-details`
|
|
382
|
+
- `update-shared-calendar-event`
|
|
380
383
|
- `update-shared-mailbox-message`
|
|
381
384
|
- `update-sharepoint-list-column`
|
|
382
385
|
- `update-sharepoint-list-item`
|
|
@@ -1120,7 +1123,7 @@ Organization/work tools (Teams, SharePoint, shared mailboxes, search)
|
|
|
1120
1123
|
|
|
1121
1124
|
Requires `--org-mode`.
|
|
1122
1125
|
|
|
1123
|
-
Tools (
|
|
1126
|
+
Tools (187):
|
|
1124
1127
|
|
|
1125
1128
|
- `add-group-member`
|
|
1126
1129
|
- `add-group-owner`
|
|
@@ -1137,6 +1140,7 @@ Tools (184):
|
|
|
1137
1140
|
- `create-planner-bucket`
|
|
1138
1141
|
- `create-planner-plan`
|
|
1139
1142
|
- `create-planner-task`
|
|
1143
|
+
- `create-shared-calendar-event`
|
|
1140
1144
|
- `create-shared-mailbox-child-folder`
|
|
1141
1145
|
- `create-shared-mailbox-draft`
|
|
1142
1146
|
- `create-shared-mailbox-folder`
|
|
@@ -1154,6 +1158,7 @@ Tools (184):
|
|
|
1154
1158
|
- `delete-group`
|
|
1155
1159
|
- `delete-online-meeting`
|
|
1156
1160
|
- `delete-planner-bucket`
|
|
1161
|
+
- `delete-shared-calendar-event`
|
|
1157
1162
|
- `delete-shared-mailbox-attachment`
|
|
1158
1163
|
- `delete-sharepoint-list-column`
|
|
1159
1164
|
- `delete-sharepoint-list-item`
|
|
@@ -1300,6 +1305,7 @@ Tools (184):
|
|
|
1300
1305
|
- `update-planner-plan`
|
|
1301
1306
|
- `update-planner-task`
|
|
1302
1307
|
- `update-planner-task-details`
|
|
1308
|
+
- `update-shared-calendar-event`
|
|
1303
1309
|
- `update-shared-mailbox-message`
|
|
1304
1310
|
- `update-sharepoint-list-column`
|
|
1305
1311
|
- `update-sharepoint-list-item`
|
package/README.md
CHANGED
|
@@ -690,15 +690,18 @@ npx @softeria/ms-365-mcp-server --org-mode --discovery \
|
|
|
690
690
|
|
|
691
691
|
`--eager-tools` accepts comma-separated **exact** Graph or utility tool names,
|
|
692
692
|
not a regular expression or preset. `MS365_MCP_EAGER_TOOLS` is the environment
|
|
693
|
-
fallback; the CLI wins.
|
|
694
|
-
|
|
693
|
+
fallback; the CLI wins. An empty or whitespace-only environment value is treated
|
|
694
|
+
as unset, including without discovery; an explicitly empty CLI option is still
|
|
695
|
+
invalid. The option requires `--discovery`. Empty entries and
|
|
696
|
+
unknown names fail startup, including in HTTP mode. Duplicate names are registered once.
|
|
695
697
|
|
|
696
698
|
Direct tools use the same schemas, annotations and execution handlers as normal
|
|
697
699
|
mode. They also remain searchable and executable through discovery. Existing
|
|
698
700
|
`--preset`, `--enabled-tools`, `--allowed-scopes`, `--read-only`, organization-mode
|
|
699
701
|
and transport restrictions apply first: an eager selection cannot enable a
|
|
700
702
|
filtered-out tool or add permissions. Recognized but unavailable tools are
|
|
701
|
-
omitted with a
|
|
703
|
+
omitted with a diagnostic logged once per server instance. HTTP still excludes
|
|
704
|
+
server-local file tools.
|
|
702
705
|
|
|
703
706
|
Select a small set: exposing many generated Graph schemas can consume substantial
|
|
704
707
|
model context. This option does not shrink individual schemas. Without
|
|
@@ -33,7 +33,9 @@ export async function renderPresetsMarkdown(): Promise<string> {
|
|
|
33
33
|
for (const entry of catalog) {
|
|
34
34
|
const org = entry.requiresOrgMode ? 'required' : '';
|
|
35
35
|
const desc = entry.description.replace(/\|/g, '\\|');
|
|
36
|
-
lines.push(
|
|
36
|
+
lines.push(
|
|
37
|
+
`| [\`${entry.name}\`](#${entry.name}) | ${entry.tools.length} | ${org} | ${desc} |`
|
|
38
|
+
);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
lines.push('');
|
package/dist/cli.js
CHANGED
|
@@ -130,7 +130,7 @@ function parseArgs() {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
delete options.enabledToolsFile;
|
|
133
|
-
const eagerValue = options.eagerTools ?? process.env.MS365_MCP_EAGER_TOOLS;
|
|
133
|
+
const eagerValue = options.eagerTools ?? (process.env.MS365_MCP_EAGER_TOOLS?.trim() || void 0);
|
|
134
134
|
if (eagerValue !== void 0) {
|
|
135
135
|
if (!options.discovery) throw new Error("--eager-tools requires --discovery");
|
|
136
136
|
const names = String(eagerValue).split(",").map((name) => name.trim());
|
package/dist/endpoints.json
CHANGED
|
@@ -612,6 +612,33 @@
|
|
|
612
612
|
"workScopes": ["Calendars.Read.Shared"],
|
|
613
613
|
"supportsTimezone": true
|
|
614
614
|
},
|
|
615
|
+
{
|
|
616
|
+
"pathPattern": "/users/{user-id}/calendar/events",
|
|
617
|
+
"method": "post",
|
|
618
|
+
"toolName": "create-shared-calendar-event",
|
|
619
|
+
"descriptionOverride": "Create an event in another user's default calendar. The user-id is the calendar owner's ID or email address, and delegated write access to that calendar is required. Times use nested objects, not flat fields: start: {dateTime, timeZone}, end: {dateTime, timeZone}. Do NOT use startDateTime/startTimeZone. For recurring events use the calendar owner's own time zone name rather than UTC, since Graph resolves DST against the zone in start.timeZone.",
|
|
620
|
+
"presets": ["work"],
|
|
621
|
+
"workScopes": ["Calendars.ReadWrite.Shared"],
|
|
622
|
+
"supportsTimezone": true
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"pathPattern": "/users/{user-id}/events/{event-id}",
|
|
626
|
+
"method": "patch",
|
|
627
|
+
"toolName": "update-shared-calendar-event",
|
|
628
|
+
"descriptionOverride": "Update an event in another user's default calendar. Requires the calendar owner's user-id and the event's eventId from list-shared-calendar-events or get-shared-calendar-view. Times use nested {dateTime, timeZone} objects.",
|
|
629
|
+
"presets": ["work"],
|
|
630
|
+
"workScopes": ["Calendars.ReadWrite.Shared"],
|
|
631
|
+
"supportsTimezone": true
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"pathPattern": "/users/{user-id}/events/{event-id}",
|
|
635
|
+
"method": "delete",
|
|
636
|
+
"toolName": "delete-shared-calendar-event",
|
|
637
|
+
"descriptionOverride": "Delete an event from another user's default calendar. Requires the calendar owner's user-id and the event's eventId from list-shared-calendar-events or get-shared-calendar-view.",
|
|
638
|
+
"llmTip": "Deleting a seriesMaster deletes ALL occurrences of the recurring event. If the owner organizes the meeting, deleting it sends a cancellation to the attendees.",
|
|
639
|
+
"presets": ["work"],
|
|
640
|
+
"workScopes": ["Calendars.ReadWrite.Shared"]
|
|
641
|
+
},
|
|
615
642
|
{
|
|
616
643
|
"pathPattern": "/me/calendars/{calendar-id}/events/{event-id}/instances",
|
|
617
644
|
"method": "get",
|
package/dist/generated/client.js
CHANGED
|
@@ -15151,6 +15151,74 @@ Only the policyViolation property of a chatMessage can be updated in application
|
|
|
15151
15151
|
],
|
|
15152
15152
|
response: z.void()
|
|
15153
15153
|
},
|
|
15154
|
+
{
|
|
15155
|
+
method: "post",
|
|
15156
|
+
path: "/users/:userId/calendar/events",
|
|
15157
|
+
alias: "create-shared-calendar-event",
|
|
15158
|
+
description: `Create a shared calendar event.`,
|
|
15159
|
+
requestFormat: "json",
|
|
15160
|
+
parameters: [
|
|
15161
|
+
{
|
|
15162
|
+
name: "body",
|
|
15163
|
+
description: `New navigation property`,
|
|
15164
|
+
type: "Body",
|
|
15165
|
+
schema: z.object({
|
|
15166
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
15167
|
+
createdDateTime: z.string().regex(
|
|
15168
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
15169
|
+
).datetime({ offset: true }).describe(
|
|
15170
|
+
"The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
|
|
15171
|
+
).nullish(),
|
|
15172
|
+
lastModifiedDateTime: z.string().regex(
|
|
15173
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
15174
|
+
).datetime({ offset: true }).describe(
|
|
15175
|
+
"The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
|
|
15176
|
+
).nullish(),
|
|
15177
|
+
type: microsoft_graph_eventType.optional(),
|
|
15178
|
+
body: microsoft_graph_itemBody.optional(),
|
|
15179
|
+
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
15180
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
15181
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
15182
|
+
).optional(),
|
|
15183
|
+
singleValueExtendedProperties: z.array(microsoft_graph_singleValueLegacyExtendedProperty).describe(
|
|
15184
|
+
"The collection of single-value extended properties defined for the event. Read-only. Nullable."
|
|
15185
|
+
).optional(),
|
|
15186
|
+
multiValueExtendedProperties: z.array(microsoft_graph_multiValueLegacyExtendedProperty).describe(
|
|
15187
|
+
"The collection of multi-value extended properties defined for the event. Read-only. Nullable."
|
|
15188
|
+
).optional(),
|
|
15189
|
+
start: microsoft_graph_dateTimeTimeZone.optional(),
|
|
15190
|
+
end: microsoft_graph_dateTimeTimeZone.optional(),
|
|
15191
|
+
location: microsoft_graph_location.optional(),
|
|
15192
|
+
showAs: microsoft_graph_freeBusyStatus.optional(),
|
|
15193
|
+
sensitivity: microsoft_graph_sensitivity.optional(),
|
|
15194
|
+
isAllDay: z.boolean().describe(
|
|
15195
|
+
"Set to true if the event lasts all day. If true, regardless of whether it's a single-day or multi-day event, start, and endtime must be set to midnight and be in the same time zone."
|
|
15196
|
+
).nullish(),
|
|
15197
|
+
importance: microsoft_graph_importance.optional(),
|
|
15198
|
+
isOnlineMeeting: z.boolean().describe(
|
|
15199
|
+
"True if this event has online meeting information (that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise. Default is false (onlineMeeting is null). Optional. After you set isOnlineMeeting to true, Microsoft Graph initializes onlineMeeting. Subsequently, Outlook ignores any further changes to isOnlineMeeting, and the meeting remains available online."
|
|
15200
|
+
).nullish(),
|
|
15201
|
+
isReminderOn: z.boolean().describe("Set to true if an alert is set to remind the user of the event.").nullish(),
|
|
15202
|
+
attendees: z.array(microsoft_graph_attendee).describe("The collection of attendees for the event.").optional(),
|
|
15203
|
+
recurrence: microsoft_graph_patternedRecurrence.optional(),
|
|
15204
|
+
reminderMinutesBeforeStart: z.number().gte(-2147483648).lte(2147483647).describe(
|
|
15205
|
+
"The number of minutes before the event start time that the reminder alert occurs."
|
|
15206
|
+
).nullish(),
|
|
15207
|
+
allowNewTimeProposals: z.boolean().describe(
|
|
15208
|
+
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
15209
|
+
).nullish(),
|
|
15210
|
+
responseRequested: z.boolean().describe(
|
|
15211
|
+
"Default is true, which represents the organizer would like an invitee to send a response to the event."
|
|
15212
|
+
).nullish(),
|
|
15213
|
+
categories: z.array(z.string().nullable()).describe("The categories associated with the item").optional(),
|
|
15214
|
+
changeKey: z.string().describe(
|
|
15215
|
+
"Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only."
|
|
15216
|
+
).nullish()
|
|
15217
|
+
}).passthrough().passthrough()
|
|
15218
|
+
}
|
|
15219
|
+
],
|
|
15220
|
+
response: z.void()
|
|
15221
|
+
},
|
|
15154
15222
|
{
|
|
15155
15223
|
method: "get",
|
|
15156
15224
|
path: "/users/:userId/calendarView",
|
|
@@ -15272,6 +15340,89 @@ Only the policyViolation property of a chatMessage can be updated in application
|
|
|
15272
15340
|
],
|
|
15273
15341
|
response: z.void()
|
|
15274
15342
|
},
|
|
15343
|
+
{
|
|
15344
|
+
method: "patch",
|
|
15345
|
+
path: "/users/:userId/events/:eventId",
|
|
15346
|
+
alias: "update-shared-calendar-event",
|
|
15347
|
+
description: `Update a shared calendar event.`,
|
|
15348
|
+
requestFormat: "json",
|
|
15349
|
+
parameters: [
|
|
15350
|
+
{
|
|
15351
|
+
name: "body",
|
|
15352
|
+
description: `New navigation property values`,
|
|
15353
|
+
type: "Body",
|
|
15354
|
+
schema: z.object({
|
|
15355
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
15356
|
+
createdDateTime: z.string().regex(
|
|
15357
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
15358
|
+
).datetime({ offset: true }).describe(
|
|
15359
|
+
"The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
|
|
15360
|
+
).nullish(),
|
|
15361
|
+
lastModifiedDateTime: z.string().regex(
|
|
15362
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
15363
|
+
).datetime({ offset: true }).describe(
|
|
15364
|
+
"The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z"
|
|
15365
|
+
).nullish(),
|
|
15366
|
+
type: microsoft_graph_eventType.optional(),
|
|
15367
|
+
body: microsoft_graph_itemBody.optional(),
|
|
15368
|
+
subject: z.string().describe("The text of the event's subject line.").nullish(),
|
|
15369
|
+
attachments: z.array(microsoft_graph_attachment).describe(
|
|
15370
|
+
"The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable."
|
|
15371
|
+
).optional(),
|
|
15372
|
+
singleValueExtendedProperties: z.array(microsoft_graph_singleValueLegacyExtendedProperty).describe(
|
|
15373
|
+
"The collection of single-value extended properties defined for the event. Read-only. Nullable."
|
|
15374
|
+
).optional(),
|
|
15375
|
+
multiValueExtendedProperties: z.array(microsoft_graph_multiValueLegacyExtendedProperty).describe(
|
|
15376
|
+
"The collection of multi-value extended properties defined for the event. Read-only. Nullable."
|
|
15377
|
+
).optional(),
|
|
15378
|
+
start: microsoft_graph_dateTimeTimeZone.optional(),
|
|
15379
|
+
end: microsoft_graph_dateTimeTimeZone.optional(),
|
|
15380
|
+
location: microsoft_graph_location.optional(),
|
|
15381
|
+
showAs: microsoft_graph_freeBusyStatus.optional(),
|
|
15382
|
+
sensitivity: microsoft_graph_sensitivity.optional(),
|
|
15383
|
+
isAllDay: z.boolean().describe(
|
|
15384
|
+
"Set to true if the event lasts all day. If true, regardless of whether it's a single-day or multi-day event, start, and endtime must be set to midnight and be in the same time zone."
|
|
15385
|
+
).nullish(),
|
|
15386
|
+
importance: microsoft_graph_importance.optional(),
|
|
15387
|
+
isOnlineMeeting: z.boolean().describe(
|
|
15388
|
+
"True if this event has online meeting information (that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise. Default is false (onlineMeeting is null). Optional. After you set isOnlineMeeting to true, Microsoft Graph initializes onlineMeeting. Subsequently, Outlook ignores any further changes to isOnlineMeeting, and the meeting remains available online."
|
|
15389
|
+
).nullish(),
|
|
15390
|
+
isReminderOn: z.boolean().describe("Set to true if an alert is set to remind the user of the event.").nullish(),
|
|
15391
|
+
attendees: z.array(microsoft_graph_attendee).describe("The collection of attendees for the event.").optional(),
|
|
15392
|
+
recurrence: microsoft_graph_patternedRecurrence.optional(),
|
|
15393
|
+
reminderMinutesBeforeStart: z.number().gte(-2147483648).lte(2147483647).describe(
|
|
15394
|
+
"The number of minutes before the event start time that the reminder alert occurs."
|
|
15395
|
+
).nullish(),
|
|
15396
|
+
allowNewTimeProposals: z.boolean().describe(
|
|
15397
|
+
"true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. The default is true."
|
|
15398
|
+
).nullish(),
|
|
15399
|
+
responseRequested: z.boolean().describe(
|
|
15400
|
+
"Default is true, which represents the organizer would like an invitee to send a response to the event."
|
|
15401
|
+
).nullish(),
|
|
15402
|
+
categories: z.array(z.string().nullable()).describe("The categories associated with the item").optional(),
|
|
15403
|
+
changeKey: z.string().describe(
|
|
15404
|
+
"Identifies the version of the item. Every time the item is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only."
|
|
15405
|
+
).nullish()
|
|
15406
|
+
}).passthrough().passthrough()
|
|
15407
|
+
}
|
|
15408
|
+
],
|
|
15409
|
+
response: z.void()
|
|
15410
|
+
},
|
|
15411
|
+
{
|
|
15412
|
+
method: "delete",
|
|
15413
|
+
path: "/users/:userId/events/:eventId",
|
|
15414
|
+
alias: "delete-shared-calendar-event",
|
|
15415
|
+
description: `Delete a shared calendar event.`,
|
|
15416
|
+
requestFormat: "json",
|
|
15417
|
+
parameters: [
|
|
15418
|
+
{
|
|
15419
|
+
name: "If-Match",
|
|
15420
|
+
type: "Header",
|
|
15421
|
+
schema: z.string().describe("ETag").optional()
|
|
15422
|
+
}
|
|
15423
|
+
],
|
|
15424
|
+
response: z.void()
|
|
15425
|
+
},
|
|
15275
15426
|
{
|
|
15276
15427
|
method: "get",
|
|
15277
15428
|
path: "/users/:userId/mailFolders",
|
package/dist/graph-tools.js
CHANGED
|
@@ -2597,6 +2597,14 @@ function scoreDiscoveryQuery(query, index) {
|
|
|
2597
2597
|
ranked.sort((a, b) => b.score - a.score);
|
|
2598
2598
|
return ranked;
|
|
2599
2599
|
}
|
|
2600
|
+
function validateEagerToolNames(names) {
|
|
2601
|
+
const knownNames = /* @__PURE__ */ new Set([
|
|
2602
|
+
...allEndpoints.map((t) => t.alias),
|
|
2603
|
+
...UTILITY_TOOLS.map((t) => t.name)
|
|
2604
|
+
]);
|
|
2605
|
+
const unknown = names.filter((name) => !knownNames.has(name));
|
|
2606
|
+
if (unknown.length > 0) throw new Error(`Unknown eager tool names: ${unknown.join(", ")}`);
|
|
2607
|
+
}
|
|
2600
2608
|
function registerDiscoveryTools(server, graphClient, options = {}) {
|
|
2601
2609
|
const {
|
|
2602
2610
|
readOnly = false,
|
|
@@ -2610,12 +2618,7 @@ function registerDiscoveryTools(server, graphClient, options = {}) {
|
|
|
2610
2618
|
userFields: userFieldsValue
|
|
2611
2619
|
} = options;
|
|
2612
2620
|
const eagerNames = new Set(options.eagerTools ?? []);
|
|
2613
|
-
|
|
2614
|
-
...allEndpoints.map((t) => t.alias),
|
|
2615
|
-
...UTILITY_TOOLS.map((t) => t.name)
|
|
2616
|
-
]);
|
|
2617
|
-
const unknown = [...eagerNames].filter((name) => !knownNames.has(name));
|
|
2618
|
-
if (unknown.length > 0) throw new Error(`Unknown eager tool names: ${unknown.join(", ")}`);
|
|
2621
|
+
validateEagerToolNames([...eagerNames]);
|
|
2619
2622
|
const userFields = parseUserFields(userFieldsValue);
|
|
2620
2623
|
let enabledToolsRegex;
|
|
2621
2624
|
if (enabledTools) {
|
|
@@ -2673,7 +2676,8 @@ function registerDiscoveryTools(server, graphClient, options = {}) {
|
|
|
2673
2676
|
});
|
|
2674
2677
|
continue;
|
|
2675
2678
|
}
|
|
2676
|
-
|
|
2679
|
+
if (options.onUnavailableEagerTool) options.onUnavailableEagerTool(name);
|
|
2680
|
+
else logger.info(`Eager tool ${name} is unavailable under the current filters or transport`);
|
|
2677
2681
|
} catch (error) {
|
|
2678
2682
|
logger.error(`Failed to register eager tool ${name}: ${error.message}`);
|
|
2679
2683
|
}
|
|
@@ -2866,5 +2870,6 @@ export {
|
|
|
2866
2870
|
registerDiscoveryTools,
|
|
2867
2871
|
registerGraphTools,
|
|
2868
2872
|
rewriteMentionShorthand,
|
|
2869
|
-
scoreDiscoveryQuery
|
|
2873
|
+
scoreDiscoveryQuery,
|
|
2874
|
+
validateEagerToolNames
|
|
2870
2875
|
};
|
package/dist/server.js
CHANGED
|
@@ -18,7 +18,11 @@ import {
|
|
|
18
18
|
import { getCloudEndpoints } from "./cloud-config.js";
|
|
19
19
|
import { dumpError } from "./crash-logging.js";
|
|
20
20
|
import GraphClient from "./graph-client.js";
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
registerDiscoveryTools,
|
|
23
|
+
registerGraphTools,
|
|
24
|
+
validateEagerToolNames
|
|
25
|
+
} from "./graph-tools.js";
|
|
22
26
|
import { configureAttachmentMinting } from "./lib/attachment-minting.js";
|
|
23
27
|
import { AttachmentTicketStore } from "./lib/attachment-tickets.js";
|
|
24
28
|
import { ATTACHMENT_ROUTE, loadAttachmentUrlConfig } from "./lib/attachment-url-config.js";
|
|
@@ -155,6 +159,13 @@ class MicrosoftGraphServer {
|
|
|
155
159
|
this.httpServers = [];
|
|
156
160
|
// Two-leg PKCE: stores client's code_challenge and server's code_verifier, keyed by OAuth state
|
|
157
161
|
this.pkceStore = /* @__PURE__ */ new Map();
|
|
162
|
+
this.reportedUnavailableEagerTools = /* @__PURE__ */ new Set();
|
|
163
|
+
this.reportUnavailableEagerTool = (name) => {
|
|
164
|
+
if (this.reportedUnavailableEagerTools.has(name)) return;
|
|
165
|
+
this.reportedUnavailableEagerTools.add(name);
|
|
166
|
+
logger.info(`Eager tool ${name} is unavailable under the current filters or transport`);
|
|
167
|
+
};
|
|
168
|
+
if (options.eagerTools?.length) validateEagerToolNames(options.eagerTools);
|
|
158
169
|
this.authManager = authManager;
|
|
159
170
|
this.options = options;
|
|
160
171
|
this.graphClient = null;
|
|
@@ -193,6 +204,7 @@ class MicrosoftGraphServer {
|
|
|
193
204
|
const registrationOptions = {
|
|
194
205
|
readOnly: this.options.readOnly,
|
|
195
206
|
eagerTools: this.options.eagerTools,
|
|
207
|
+
onUnavailableEagerTool: this.reportUnavailableEagerTool,
|
|
196
208
|
enabledTools: this.options.enabledTools,
|
|
197
209
|
orgMode: this.options.orgMode,
|
|
198
210
|
authManager: this.authManager,
|
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.
|
|
4
|
+
"version": "0.175.0",
|
|
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",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"@vitest/coverage-v8": "^4.1.8",
|
|
69
69
|
"eslint": "^9.31.0",
|
|
70
70
|
"globals": "^16.3.0",
|
|
71
|
-
"patch-package": "^8.0.1",
|
|
72
71
|
"prettier": "^3.5.3",
|
|
73
72
|
"semantic-release": "^25.0.2",
|
|
74
73
|
"tsup": "^8.5.0",
|
package/src/endpoints.json
CHANGED
|
@@ -612,6 +612,33 @@
|
|
|
612
612
|
"workScopes": ["Calendars.Read.Shared"],
|
|
613
613
|
"supportsTimezone": true
|
|
614
614
|
},
|
|
615
|
+
{
|
|
616
|
+
"pathPattern": "/users/{user-id}/calendar/events",
|
|
617
|
+
"method": "post",
|
|
618
|
+
"toolName": "create-shared-calendar-event",
|
|
619
|
+
"descriptionOverride": "Create an event in another user's default calendar. The user-id is the calendar owner's ID or email address, and delegated write access to that calendar is required. Times use nested objects, not flat fields: start: {dateTime, timeZone}, end: {dateTime, timeZone}. Do NOT use startDateTime/startTimeZone. For recurring events use the calendar owner's own time zone name rather than UTC, since Graph resolves DST against the zone in start.timeZone.",
|
|
620
|
+
"presets": ["work"],
|
|
621
|
+
"workScopes": ["Calendars.ReadWrite.Shared"],
|
|
622
|
+
"supportsTimezone": true
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"pathPattern": "/users/{user-id}/events/{event-id}",
|
|
626
|
+
"method": "patch",
|
|
627
|
+
"toolName": "update-shared-calendar-event",
|
|
628
|
+
"descriptionOverride": "Update an event in another user's default calendar. Requires the calendar owner's user-id and the event's eventId from list-shared-calendar-events or get-shared-calendar-view. Times use nested {dateTime, timeZone} objects.",
|
|
629
|
+
"presets": ["work"],
|
|
630
|
+
"workScopes": ["Calendars.ReadWrite.Shared"],
|
|
631
|
+
"supportsTimezone": true
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"pathPattern": "/users/{user-id}/events/{event-id}",
|
|
635
|
+
"method": "delete",
|
|
636
|
+
"toolName": "delete-shared-calendar-event",
|
|
637
|
+
"descriptionOverride": "Delete an event from another user's default calendar. Requires the calendar owner's user-id and the event's eventId from list-shared-calendar-events or get-shared-calendar-view.",
|
|
638
|
+
"llmTip": "Deleting a seriesMaster deletes ALL occurrences of the recurring event. If the owner organizes the meeting, deleting it sends a cancellation to the attendees.",
|
|
639
|
+
"presets": ["work"],
|
|
640
|
+
"workScopes": ["Calendars.ReadWrite.Shared"]
|
|
641
|
+
},
|
|
615
642
|
{
|
|
616
643
|
"pathPattern": "/me/calendars/{calendar-id}/events/{event-id}/instances",
|
|
617
644
|
"method": "get",
|