@awolve/myoffice 1.6.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/README.md +271 -0
- package/dist/auth/cache-plugin.d.ts +20 -0
- package/dist/auth/cache-plugin.d.ts.map +1 -0
- package/dist/auth/cache-plugin.js +49 -0
- package/dist/auth/cache-plugin.js.map +1 -0
- package/dist/auth/config.d.ts +40 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +135 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/device-code.d.ts +2 -0
- package/dist/auth/device-code.d.ts.map +1 -0
- package/dist/auth/device-code.js +40 -0
- package/dist/auth/device-code.js.map +1 -0
- package/dist/auth/index.d.ts +4 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +4 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/login.d.ts +7 -0
- package/dist/auth/login.d.ts.map +1 -0
- package/dist/auth/login.js +22 -0
- package/dist/auth/login.js.map +1 -0
- package/dist/auth/token-manager.d.ts +4 -0
- package/dist/auth/token-manager.d.ts.map +1 -0
- package/dist/auth/token-manager.js +85 -0
- package/dist/auth/token-manager.js.map +1 -0
- package/dist/cli/formatter.d.ts +5 -0
- package/dist/cli/formatter.d.ts.map +1 -0
- package/dist/cli/formatter.js +317 -0
- package/dist/cli/formatter.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +973 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/handler.d.ts +8 -0
- package/dist/core/handler.d.ts.map +1 -0
- package/dist/core/handler.js +327 -0
- package/dist/core/handler.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +924 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/calendar.d.ts +124 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +129 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/chats.d.ts +66 -0
- package/dist/tools/chats.d.ts.map +1 -0
- package/dist/tools/chats.js +102 -0
- package/dist/tools/chats.js.map +1 -0
- package/dist/tools/contacts.d.ts +138 -0
- package/dist/tools/contacts.d.ts.map +1 -0
- package/dist/tools/contacts.js +189 -0
- package/dist/tools/contacts.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +10 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/mail.d.ts +138 -0
- package/dist/tools/mail.d.ts.map +1 -0
- package/dist/tools/mail.js +187 -0
- package/dist/tools/mail.js.map +1 -0
- package/dist/tools/onedrive.d.ts +125 -0
- package/dist/tools/onedrive.d.ts.map +1 -0
- package/dist/tools/onedrive.js +203 -0
- package/dist/tools/onedrive.js.map +1 -0
- package/dist/tools/planner.d.ts +390 -0
- package/dist/tools/planner.d.ts.map +1 -0
- package/dist/tools/planner.js +693 -0
- package/dist/tools/planner.js.map +1 -0
- package/dist/tools/sharepoint.d.ts +138 -0
- package/dist/tools/sharepoint.d.ts.map +1 -0
- package/dist/tools/sharepoint.js +156 -0
- package/dist/tools/sharepoint.js.map +1 -0
- package/dist/tools/tasks.d.ts +107 -0
- package/dist/tools/tasks.d.ts.map +1 -0
- package/dist/tools/tasks.js +131 -0
- package/dist/tools/tasks.js.map +1 -0
- package/dist/tools/teams.d.ts +66 -0
- package/dist/tools/teams.d.ts.map +1 -0
- package/dist/tools/teams.js +69 -0
- package/dist/tools/teams.js.map +1 -0
- package/dist/utils/graph-client.d.ts +15 -0
- package/dist/utils/graph-client.d.ts.map +1 -0
- package/dist/utils/graph-client.js +126 -0
- package/dist/utils/graph-client.js.map +1 -0
- package/dist/utils/signature.d.ts +2 -0
- package/dist/utils/signature.d.ts.map +1 -0
- package/dist/utils/signature.js +17 -0
- package/dist/utils/signature.js.map +1 -0
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +20 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +55 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
import { getVersion } from './utils/version.js';
|
|
6
|
+
import { executeCommand } from './core/handler.js';
|
|
7
|
+
const VERSION = getVersion();
|
|
8
|
+
const SERVER_START_TIME = new Date();
|
|
9
|
+
// Debug: Log environment on startup
|
|
10
|
+
console.error('=== MCP Server Starting ===');
|
|
11
|
+
console.error('Version:', VERSION);
|
|
12
|
+
console.error('Started at:', SERVER_START_TIME.toISOString());
|
|
13
|
+
const clientId = process.env.M365_CLIENT_ID;
|
|
14
|
+
if (!clientId) {
|
|
15
|
+
console.error('M365_CLIENT_ID: NOT SET');
|
|
16
|
+
}
|
|
17
|
+
else if (clientId.startsWith('${') || clientId.includes('$M365')) {
|
|
18
|
+
console.error('M365_CLIENT_ID: UNRESOLVED PLACEHOLDER:', clientId);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
console.error('M365_CLIENT_ID: SET (' + clientId.substring(0, 8) + '...)');
|
|
22
|
+
}
|
|
23
|
+
console.error('M365_TENANT_ID:', process.env.M365_TENANT_ID || 'NOT SET (will use "common")');
|
|
24
|
+
console.error('===========================');
|
|
25
|
+
const server = new Server({
|
|
26
|
+
name: 'myoffice-mcp',
|
|
27
|
+
version: VERSION,
|
|
28
|
+
}, {
|
|
29
|
+
capabilities: {
|
|
30
|
+
tools: {},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
// Tool definitions
|
|
34
|
+
const TOOLS = [
|
|
35
|
+
// Mail
|
|
36
|
+
{
|
|
37
|
+
name: 'mail_list',
|
|
38
|
+
description: 'List emails from a folder (inbox, sentitems, drafts, etc.)',
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
folder: { type: 'string', description: 'Folder name. Default: inbox' },
|
|
43
|
+
maxItems: { type: 'number', description: 'Max emails to return. Default: 25' },
|
|
44
|
+
unreadOnly: { type: 'boolean', description: 'Only return unread emails' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'mail_read',
|
|
50
|
+
description: 'Read a specific email by ID',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
messageId: { type: 'string', description: 'The message ID' },
|
|
55
|
+
},
|
|
56
|
+
required: ['messageId'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'mail_search',
|
|
61
|
+
description: 'Search emails by query',
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
query: { type: 'string', description: 'Search query' },
|
|
66
|
+
maxItems: { type: 'number', description: 'Max results. Default: 25' },
|
|
67
|
+
},
|
|
68
|
+
required: ['query'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'mail_send',
|
|
73
|
+
description: 'Send an email. IMPORTANT: Requires user confirmation before sending. Automatically appends signature if configured.',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {
|
|
77
|
+
to: { type: 'array', items: { type: 'string' }, description: 'Recipient emails' },
|
|
78
|
+
subject: { type: 'string', description: 'Email subject' },
|
|
79
|
+
body: { type: 'string', description: 'Email body (HTML by default)' },
|
|
80
|
+
isHtml: { type: 'boolean', description: 'Is body HTML? Default: true' },
|
|
81
|
+
cc: { type: 'array', items: { type: 'string' }, description: 'CC recipients' },
|
|
82
|
+
bcc: { type: 'array', items: { type: 'string' }, description: 'BCC recipients' },
|
|
83
|
+
useSignature: { type: 'boolean', description: 'Append email signature if configured. Default: true' },
|
|
84
|
+
},
|
|
85
|
+
required: ['to', 'subject', 'body'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'mail_reply',
|
|
90
|
+
description: 'Reply to an email. IMPORTANT: Requires user confirmation before sending.',
|
|
91
|
+
inputSchema: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
messageId: { type: 'string', description: 'The message ID to reply to' },
|
|
95
|
+
body: { type: 'string', description: 'Reply body (HTML by default)' },
|
|
96
|
+
isHtml: { type: 'boolean', description: 'Is body HTML? Default: true' },
|
|
97
|
+
replyAll: { type: 'boolean', description: 'Reply to all recipients. Default: false' },
|
|
98
|
+
useSignature: { type: 'boolean', description: 'Append email signature. Default: false' },
|
|
99
|
+
},
|
|
100
|
+
required: ['messageId', 'body'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'mail_delete',
|
|
105
|
+
description: 'Delete an email. IMPORTANT: Requires user confirmation.',
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
messageId: { type: 'string', description: 'The message ID to delete' },
|
|
110
|
+
},
|
|
111
|
+
required: ['messageId'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'mail_mark_read',
|
|
116
|
+
description: 'Mark an email as read or unread',
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
properties: {
|
|
120
|
+
messageId: { type: 'string', description: 'The message ID' },
|
|
121
|
+
isRead: { type: 'boolean', description: 'Set to false to mark as unread. Default: true' },
|
|
122
|
+
},
|
|
123
|
+
required: ['messageId'],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
// Calendar
|
|
127
|
+
{
|
|
128
|
+
name: 'calendar_list',
|
|
129
|
+
description: 'List calendar events within a date range',
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
startDate: { type: 'string', description: 'Start date (ISO). Default: today' },
|
|
134
|
+
endDate: { type: 'string', description: 'End date (ISO). Default: +7 days' },
|
|
135
|
+
maxItems: { type: 'number', description: 'Max events. Default: 50' },
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'calendar_get',
|
|
141
|
+
description: 'Get details of a specific calendar event',
|
|
142
|
+
inputSchema: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
properties: {
|
|
145
|
+
eventId: { type: 'string', description: 'The event ID' },
|
|
146
|
+
},
|
|
147
|
+
required: ['eventId'],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'calendar_create',
|
|
152
|
+
description: 'Create a calendar event. IMPORTANT: Requires user confirmation if inviting attendees.',
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {
|
|
156
|
+
subject: { type: 'string', description: 'Event title' },
|
|
157
|
+
start: { type: 'string', description: 'Start datetime (ISO)' },
|
|
158
|
+
end: { type: 'string', description: 'End datetime (ISO)' },
|
|
159
|
+
timeZone: { type: 'string', description: 'Timezone. Default: UTC' },
|
|
160
|
+
location: { type: 'string', description: 'Event location' },
|
|
161
|
+
body: { type: 'string', description: 'Event description' },
|
|
162
|
+
attendees: { type: 'array', items: { type: 'string' }, description: 'Attendee emails' },
|
|
163
|
+
isOnlineMeeting: { type: 'boolean', description: 'Create Teams meeting' },
|
|
164
|
+
},
|
|
165
|
+
required: ['subject', 'start', 'end'],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'calendar_update',
|
|
170
|
+
description: 'Update a calendar event',
|
|
171
|
+
inputSchema: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
properties: {
|
|
174
|
+
eventId: { type: 'string', description: 'The event ID' },
|
|
175
|
+
subject: { type: 'string', description: 'New title' },
|
|
176
|
+
start: { type: 'string', description: 'New start datetime' },
|
|
177
|
+
end: { type: 'string', description: 'New end datetime' },
|
|
178
|
+
location: { type: 'string', description: 'New location' },
|
|
179
|
+
body: { type: 'string', description: 'New description' },
|
|
180
|
+
},
|
|
181
|
+
required: ['eventId'],
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'calendar_delete',
|
|
186
|
+
description: 'Delete a calendar event. IMPORTANT: Requires user confirmation.',
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
properties: {
|
|
190
|
+
eventId: { type: 'string', description: 'The event ID to delete' },
|
|
191
|
+
},
|
|
192
|
+
required: ['eventId'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
// Tasks
|
|
196
|
+
{
|
|
197
|
+
name: 'tasks_list_lists',
|
|
198
|
+
description: 'List all task lists (To Do lists)',
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
properties: {},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'tasks_list',
|
|
206
|
+
description: 'List tasks from a task list',
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: 'object',
|
|
209
|
+
properties: {
|
|
210
|
+
listId: { type: 'string', description: 'Task list ID. Default: default list' },
|
|
211
|
+
includeCompleted: { type: 'boolean', description: 'Include completed tasks' },
|
|
212
|
+
maxItems: { type: 'number', description: 'Max tasks. Default: 50' },
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'tasks_create',
|
|
218
|
+
description: 'Create a new task',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
properties: {
|
|
222
|
+
title: { type: 'string', description: 'Task title' },
|
|
223
|
+
listId: { type: 'string', description: 'Task list ID' },
|
|
224
|
+
dueDate: { type: 'string', description: 'Due date (ISO)' },
|
|
225
|
+
importance: { type: 'string', enum: ['low', 'normal', 'high'], description: 'Importance' },
|
|
226
|
+
body: { type: 'string', description: 'Task notes' },
|
|
227
|
+
},
|
|
228
|
+
required: ['title'],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'tasks_update',
|
|
233
|
+
description: 'Update a task',
|
|
234
|
+
inputSchema: {
|
|
235
|
+
type: 'object',
|
|
236
|
+
properties: {
|
|
237
|
+
taskId: { type: 'string', description: 'Task ID' },
|
|
238
|
+
listId: { type: 'string', description: 'Task list ID' },
|
|
239
|
+
title: { type: 'string', description: 'New title' },
|
|
240
|
+
dueDate: { type: 'string', description: 'New due date' },
|
|
241
|
+
importance: { type: 'string', enum: ['low', 'normal', 'high'], description: 'New importance' },
|
|
242
|
+
body: { type: 'string', description: 'New notes' },
|
|
243
|
+
},
|
|
244
|
+
required: ['taskId'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: 'tasks_complete',
|
|
249
|
+
description: 'Mark a task as completed',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
taskId: { type: 'string', description: 'Task ID' },
|
|
254
|
+
listId: { type: 'string', description: 'Task list ID' },
|
|
255
|
+
},
|
|
256
|
+
required: ['taskId'],
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'tasks_delete',
|
|
261
|
+
description: 'Delete a task. IMPORTANT: Requires user confirmation.',
|
|
262
|
+
inputSchema: {
|
|
263
|
+
type: 'object',
|
|
264
|
+
properties: {
|
|
265
|
+
taskId: { type: 'string', description: 'Task ID' },
|
|
266
|
+
listId: { type: 'string', description: 'Task list ID' },
|
|
267
|
+
},
|
|
268
|
+
required: ['taskId'],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
// OneDrive
|
|
272
|
+
{
|
|
273
|
+
name: 'onedrive_list',
|
|
274
|
+
description: 'List files and folders in OneDrive',
|
|
275
|
+
inputSchema: {
|
|
276
|
+
type: 'object',
|
|
277
|
+
properties: {
|
|
278
|
+
path: { type: 'string', description: 'Folder path. Default: root' },
|
|
279
|
+
maxItems: { type: 'number', description: 'Max items. Default: 50' },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'onedrive_get',
|
|
285
|
+
description: 'Get metadata for a file or folder',
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: 'object',
|
|
288
|
+
properties: {
|
|
289
|
+
path: { type: 'string', description: 'File/folder path' },
|
|
290
|
+
},
|
|
291
|
+
required: ['path'],
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'onedrive_search',
|
|
296
|
+
description: 'Search for files in OneDrive',
|
|
297
|
+
inputSchema: {
|
|
298
|
+
type: 'object',
|
|
299
|
+
properties: {
|
|
300
|
+
query: { type: 'string', description: 'Search query' },
|
|
301
|
+
maxItems: { type: 'number', description: 'Max results. Default: 25' },
|
|
302
|
+
},
|
|
303
|
+
required: ['query'],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'onedrive_read',
|
|
308
|
+
description: 'Read content of a text file (max 1MB)',
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: 'object',
|
|
311
|
+
properties: {
|
|
312
|
+
path: { type: 'string', description: 'File path' },
|
|
313
|
+
},
|
|
314
|
+
required: ['path'],
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: 'onedrive_create_folder',
|
|
319
|
+
description: 'Create a new folder',
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: 'object',
|
|
322
|
+
properties: {
|
|
323
|
+
name: { type: 'string', description: 'Folder name' },
|
|
324
|
+
parentPath: { type: 'string', description: 'Parent path. Default: root' },
|
|
325
|
+
},
|
|
326
|
+
required: ['name'],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
name: 'onedrive_shared_with_me',
|
|
331
|
+
description: 'List files and folders shared with you by others',
|
|
332
|
+
inputSchema: {
|
|
333
|
+
type: 'object',
|
|
334
|
+
properties: {
|
|
335
|
+
maxItems: { type: 'number', description: 'Max items. Default: 50' },
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'onedrive_upload',
|
|
341
|
+
description: 'Upload a local file to OneDrive',
|
|
342
|
+
inputSchema: {
|
|
343
|
+
type: 'object',
|
|
344
|
+
properties: {
|
|
345
|
+
localPath: { type: 'string', description: 'Local file path to upload' },
|
|
346
|
+
remotePath: {
|
|
347
|
+
type: 'string',
|
|
348
|
+
description: 'Destination path in OneDrive (e.g., "Documents/file.pdf"). If omitted, uploads to root with original filename',
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
required: ['localPath'],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
// SharePoint
|
|
355
|
+
{
|
|
356
|
+
name: 'sharepoint_list_sites',
|
|
357
|
+
description: 'List SharePoint sites you follow or search for sites',
|
|
358
|
+
inputSchema: {
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
maxItems: { type: 'number', description: 'Max sites. Default: 50' },
|
|
362
|
+
search: { type: 'string', description: 'Search query to find sites' },
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: 'sharepoint_get_site',
|
|
368
|
+
description: 'Get details of a specific SharePoint site',
|
|
369
|
+
inputSchema: {
|
|
370
|
+
type: 'object',
|
|
371
|
+
properties: {
|
|
372
|
+
siteId: { type: 'string', description: 'Site ID or hostname:path (e.g., "contoso.sharepoint.com:/sites/team")' },
|
|
373
|
+
},
|
|
374
|
+
required: ['siteId'],
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'sharepoint_list_drives',
|
|
379
|
+
description: 'List document libraries in a SharePoint site',
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: 'object',
|
|
382
|
+
properties: {
|
|
383
|
+
siteId: { type: 'string', description: 'Site ID' },
|
|
384
|
+
maxItems: { type: 'number', description: 'Max drives. Default: 50' },
|
|
385
|
+
},
|
|
386
|
+
required: ['siteId'],
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: 'sharepoint_list_files',
|
|
391
|
+
description: 'List files in a SharePoint document library (drive)',
|
|
392
|
+
inputSchema: {
|
|
393
|
+
type: 'object',
|
|
394
|
+
properties: {
|
|
395
|
+
driveId: { type: 'string', description: 'Drive ID from sharepoint_list_drives' },
|
|
396
|
+
path: { type: 'string', description: 'Folder path. Default: root' },
|
|
397
|
+
maxItems: { type: 'number', description: 'Max items. Default: 50' },
|
|
398
|
+
},
|
|
399
|
+
required: ['driveId'],
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: 'sharepoint_get_file',
|
|
404
|
+
description: 'Get metadata for a file in SharePoint',
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: 'object',
|
|
407
|
+
properties: {
|
|
408
|
+
driveId: { type: 'string', description: 'Drive ID' },
|
|
409
|
+
path: { type: 'string', description: 'File path' },
|
|
410
|
+
},
|
|
411
|
+
required: ['driveId', 'path'],
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: 'sharepoint_read_file',
|
|
416
|
+
description: 'Read content of a text file from SharePoint (max 1MB)',
|
|
417
|
+
inputSchema: {
|
|
418
|
+
type: 'object',
|
|
419
|
+
properties: {
|
|
420
|
+
driveId: { type: 'string', description: 'Drive ID' },
|
|
421
|
+
path: { type: 'string', description: 'File path' },
|
|
422
|
+
},
|
|
423
|
+
required: ['driveId', 'path'],
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
name: 'sharepoint_search_files',
|
|
428
|
+
description: 'Search for files in a SharePoint document library',
|
|
429
|
+
inputSchema: {
|
|
430
|
+
type: 'object',
|
|
431
|
+
properties: {
|
|
432
|
+
driveId: { type: 'string', description: 'Drive ID' },
|
|
433
|
+
query: { type: 'string', description: 'Search query' },
|
|
434
|
+
maxItems: { type: 'number', description: 'Max results. Default: 25' },
|
|
435
|
+
},
|
|
436
|
+
required: ['driveId', 'query'],
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
// Contacts
|
|
440
|
+
{
|
|
441
|
+
name: 'contacts_list',
|
|
442
|
+
description: 'List contacts',
|
|
443
|
+
inputSchema: {
|
|
444
|
+
type: 'object',
|
|
445
|
+
properties: {
|
|
446
|
+
maxItems: { type: 'number', description: 'Max contacts. Default: 50' },
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: 'contacts_search',
|
|
452
|
+
description: 'Search contacts by name, email, or company',
|
|
453
|
+
inputSchema: {
|
|
454
|
+
type: 'object',
|
|
455
|
+
properties: {
|
|
456
|
+
query: { type: 'string', description: 'Search query' },
|
|
457
|
+
maxItems: { type: 'number', description: 'Max results. Default: 25' },
|
|
458
|
+
},
|
|
459
|
+
required: ['query'],
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
name: 'contacts_get',
|
|
464
|
+
description: 'Get details of a specific contact',
|
|
465
|
+
inputSchema: {
|
|
466
|
+
type: 'object',
|
|
467
|
+
properties: {
|
|
468
|
+
contactId: { type: 'string', description: 'Contact ID' },
|
|
469
|
+
},
|
|
470
|
+
required: ['contactId'],
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: 'contacts_create',
|
|
475
|
+
description: 'Create a new contact',
|
|
476
|
+
inputSchema: {
|
|
477
|
+
type: 'object',
|
|
478
|
+
properties: {
|
|
479
|
+
givenName: { type: 'string', description: 'First name' },
|
|
480
|
+
surname: { type: 'string', description: 'Last name' },
|
|
481
|
+
email: { type: 'string', description: 'Email address' },
|
|
482
|
+
mobilePhone: { type: 'string', description: 'Mobile phone' },
|
|
483
|
+
businessPhone: { type: 'string', description: 'Business phone' },
|
|
484
|
+
companyName: { type: 'string', description: 'Company name' },
|
|
485
|
+
jobTitle: { type: 'string', description: 'Job title' },
|
|
486
|
+
notes: { type: 'string', description: 'Personal notes about the contact' },
|
|
487
|
+
birthday: { type: 'string', description: 'Birthday (ISO date, e.g., 1990-05-15)' },
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
name: 'contacts_update',
|
|
493
|
+
description: 'Update an existing contact',
|
|
494
|
+
inputSchema: {
|
|
495
|
+
type: 'object',
|
|
496
|
+
properties: {
|
|
497
|
+
contactId: { type: 'string', description: 'Contact ID' },
|
|
498
|
+
givenName: { type: 'string', description: 'First name' },
|
|
499
|
+
surname: { type: 'string', description: 'Last name' },
|
|
500
|
+
email: { type: 'string', description: 'Email address' },
|
|
501
|
+
mobilePhone: { type: 'string', description: 'Mobile phone' },
|
|
502
|
+
businessPhone: { type: 'string', description: 'Business phone' },
|
|
503
|
+
companyName: { type: 'string', description: 'Company name' },
|
|
504
|
+
jobTitle: { type: 'string', description: 'Job title' },
|
|
505
|
+
notes: { type: 'string', description: 'Personal notes about the contact' },
|
|
506
|
+
birthday: { type: 'string', description: 'Birthday (ISO date, e.g., 1990-05-15)' },
|
|
507
|
+
},
|
|
508
|
+
required: ['contactId'],
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
// Teams
|
|
512
|
+
{
|
|
513
|
+
name: 'teams_list',
|
|
514
|
+
description: 'List Teams the user is a member of',
|
|
515
|
+
inputSchema: {
|
|
516
|
+
type: 'object',
|
|
517
|
+
properties: {
|
|
518
|
+
maxItems: { type: 'number', description: 'Max teams to return. Default: 50' },
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: 'teams_channels',
|
|
524
|
+
description: 'List channels in a Team',
|
|
525
|
+
inputSchema: {
|
|
526
|
+
type: 'object',
|
|
527
|
+
properties: {
|
|
528
|
+
teamId: { type: 'string', description: 'Team ID' },
|
|
529
|
+
},
|
|
530
|
+
required: ['teamId'],
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
name: 'teams_channel_messages',
|
|
535
|
+
description: 'Read recent messages from a Teams channel',
|
|
536
|
+
inputSchema: {
|
|
537
|
+
type: 'object',
|
|
538
|
+
properties: {
|
|
539
|
+
teamId: { type: 'string', description: 'Team ID' },
|
|
540
|
+
channelId: { type: 'string', description: 'Channel ID' },
|
|
541
|
+
maxItems: { type: 'number', description: 'Max messages. Default: 25' },
|
|
542
|
+
},
|
|
543
|
+
required: ['teamId', 'channelId'],
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: 'teams_channel_post',
|
|
548
|
+
description: 'Post a message to a Teams channel. IMPORTANT: Requires user confirmation.',
|
|
549
|
+
inputSchema: {
|
|
550
|
+
type: 'object',
|
|
551
|
+
properties: {
|
|
552
|
+
teamId: { type: 'string', description: 'Team ID' },
|
|
553
|
+
channelId: { type: 'string', description: 'Channel ID' },
|
|
554
|
+
content: { type: 'string', description: 'Message content (supports HTML)' },
|
|
555
|
+
},
|
|
556
|
+
required: ['teamId', 'channelId', 'content'],
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
// Chats
|
|
560
|
+
{
|
|
561
|
+
name: 'chats_list',
|
|
562
|
+
description: 'List 1:1 and group chats',
|
|
563
|
+
inputSchema: {
|
|
564
|
+
type: 'object',
|
|
565
|
+
properties: {
|
|
566
|
+
maxItems: { type: 'number', description: 'Max chats to return. Default: 25' },
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
name: 'chats_messages',
|
|
572
|
+
description: 'Read messages from a chat',
|
|
573
|
+
inputSchema: {
|
|
574
|
+
type: 'object',
|
|
575
|
+
properties: {
|
|
576
|
+
chatId: { type: 'string', description: 'Chat ID' },
|
|
577
|
+
maxItems: { type: 'number', description: 'Max messages. Default: 25' },
|
|
578
|
+
},
|
|
579
|
+
required: ['chatId'],
|
|
580
|
+
},
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: 'chats_send',
|
|
584
|
+
description: 'Send a message in a chat. IMPORTANT: Requires user confirmation.',
|
|
585
|
+
inputSchema: {
|
|
586
|
+
type: 'object',
|
|
587
|
+
properties: {
|
|
588
|
+
chatId: { type: 'string', description: 'Chat ID' },
|
|
589
|
+
content: { type: 'string', description: 'Message content (supports HTML)' },
|
|
590
|
+
},
|
|
591
|
+
required: ['chatId', 'content'],
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: 'chats_create',
|
|
596
|
+
description: 'Create a new 1:1 or group chat. IMPORTANT: Requires user confirmation.',
|
|
597
|
+
inputSchema: {
|
|
598
|
+
type: 'object',
|
|
599
|
+
properties: {
|
|
600
|
+
members: { type: 'array', items: { type: 'string' }, description: 'Email addresses of chat members' },
|
|
601
|
+
topic: { type: 'string', description: 'Chat topic/title (for group chats)' },
|
|
602
|
+
},
|
|
603
|
+
required: ['members'],
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
// Planner
|
|
607
|
+
{
|
|
608
|
+
name: 'planner_list_plans',
|
|
609
|
+
description: 'List all Planner plans the user has access to',
|
|
610
|
+
inputSchema: {
|
|
611
|
+
type: 'object',
|
|
612
|
+
properties: {
|
|
613
|
+
maxItems: { type: 'number', description: 'Max plans to return. Default: 50' },
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'planner_get_plan',
|
|
619
|
+
description: 'Get details of a specific Planner plan',
|
|
620
|
+
inputSchema: {
|
|
621
|
+
type: 'object',
|
|
622
|
+
properties: {
|
|
623
|
+
planId: { type: 'string', description: 'The plan ID' },
|
|
624
|
+
},
|
|
625
|
+
required: ['planId'],
|
|
626
|
+
},
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
name: 'planner_list_buckets',
|
|
630
|
+
description: 'List buckets (columns) in a Planner plan',
|
|
631
|
+
inputSchema: {
|
|
632
|
+
type: 'object',
|
|
633
|
+
properties: {
|
|
634
|
+
planId: { type: 'string', description: 'The plan ID' },
|
|
635
|
+
},
|
|
636
|
+
required: ['planId'],
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
name: 'planner_create_bucket',
|
|
641
|
+
description: 'Create a new bucket in a Planner plan',
|
|
642
|
+
inputSchema: {
|
|
643
|
+
type: 'object',
|
|
644
|
+
properties: {
|
|
645
|
+
planId: { type: 'string', description: 'The plan ID' },
|
|
646
|
+
name: { type: 'string', description: 'Bucket name' },
|
|
647
|
+
},
|
|
648
|
+
required: ['planId', 'name'],
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
name: 'planner_update_bucket',
|
|
653
|
+
description: 'Update a bucket name',
|
|
654
|
+
inputSchema: {
|
|
655
|
+
type: 'object',
|
|
656
|
+
properties: {
|
|
657
|
+
bucketId: { type: 'string', description: 'The bucket ID' },
|
|
658
|
+
name: { type: 'string', description: 'New bucket name' },
|
|
659
|
+
},
|
|
660
|
+
required: ['bucketId', 'name'],
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
name: 'planner_delete_bucket',
|
|
665
|
+
description: 'Delete a bucket and its tasks. IMPORTANT: Requires user confirmation.',
|
|
666
|
+
inputSchema: {
|
|
667
|
+
type: 'object',
|
|
668
|
+
properties: {
|
|
669
|
+
bucketId: { type: 'string', description: 'The bucket ID' },
|
|
670
|
+
},
|
|
671
|
+
required: ['bucketId'],
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
name: 'planner_list_tasks',
|
|
676
|
+
description: 'List tasks in a Planner plan',
|
|
677
|
+
inputSchema: {
|
|
678
|
+
type: 'object',
|
|
679
|
+
properties: {
|
|
680
|
+
planId: { type: 'string', description: 'The plan ID' },
|
|
681
|
+
bucketId: { type: 'string', description: 'Filter by bucket ID' },
|
|
682
|
+
maxItems: { type: 'number', description: 'Max tasks to return. Default: 100' },
|
|
683
|
+
},
|
|
684
|
+
required: ['planId'],
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: 'planner_get_task',
|
|
689
|
+
description: 'Get details of a specific Planner task',
|
|
690
|
+
inputSchema: {
|
|
691
|
+
type: 'object',
|
|
692
|
+
properties: {
|
|
693
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
694
|
+
},
|
|
695
|
+
required: ['taskId'],
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
name: 'planner_create_task',
|
|
700
|
+
description: 'Create a new task in a Planner plan',
|
|
701
|
+
inputSchema: {
|
|
702
|
+
type: 'object',
|
|
703
|
+
properties: {
|
|
704
|
+
planId: { type: 'string', description: 'The plan ID' },
|
|
705
|
+
title: { type: 'string', description: 'Task title' },
|
|
706
|
+
bucketId: { type: 'string', description: 'Bucket ID to place the task in' },
|
|
707
|
+
assignments: { type: 'array', items: { type: 'string' }, description: 'Email addresses of users to assign' },
|
|
708
|
+
dueDateTime: { type: 'string', description: 'Due date (ISO format)' },
|
|
709
|
+
startDateTime: { type: 'string', description: 'Start date (ISO format)' },
|
|
710
|
+
priority: { type: 'string', enum: ['urgent', 'important', 'medium', 'low'], description: 'Task priority' },
|
|
711
|
+
progress: { type: 'string', enum: ['notStarted', 'inProgress', 'completed'], description: 'Task progress' },
|
|
712
|
+
},
|
|
713
|
+
required: ['planId', 'title'],
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'planner_update_task',
|
|
718
|
+
description: 'Update a Planner task',
|
|
719
|
+
inputSchema: {
|
|
720
|
+
type: 'object',
|
|
721
|
+
properties: {
|
|
722
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
723
|
+
title: { type: 'string', description: 'New task title' },
|
|
724
|
+
bucketId: { type: 'string', description: 'Move to different bucket' },
|
|
725
|
+
assignments: { type: 'array', items: { type: 'string' }, description: 'Email addresses of users to assign (replaces existing)' },
|
|
726
|
+
clearAssignments: { type: 'boolean', description: 'Remove all assignments' },
|
|
727
|
+
dueDateTime: { type: 'string', description: 'New due date (ISO format)' },
|
|
728
|
+
clearDue: { type: 'boolean', description: 'Clear the due date' },
|
|
729
|
+
startDateTime: { type: 'string', description: 'New start date (ISO format)' },
|
|
730
|
+
priority: { type: 'string', enum: ['urgent', 'important', 'medium', 'low'], description: 'New priority' },
|
|
731
|
+
progress: { type: 'string', enum: ['notStarted', 'inProgress', 'completed'], description: 'New progress' },
|
|
732
|
+
},
|
|
733
|
+
required: ['taskId'],
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'planner_delete_task',
|
|
738
|
+
description: 'Delete a Planner task. IMPORTANT: Requires user confirmation.',
|
|
739
|
+
inputSchema: {
|
|
740
|
+
type: 'object',
|
|
741
|
+
properties: {
|
|
742
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
743
|
+
},
|
|
744
|
+
required: ['taskId'],
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
name: 'planner_get_task_details',
|
|
749
|
+
description: 'Get task details including description and checklist',
|
|
750
|
+
inputSchema: {
|
|
751
|
+
type: 'object',
|
|
752
|
+
properties: {
|
|
753
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
754
|
+
},
|
|
755
|
+
required: ['taskId'],
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
name: 'planner_update_task_details',
|
|
760
|
+
description: 'Update task description and checklist',
|
|
761
|
+
inputSchema: {
|
|
762
|
+
type: 'object',
|
|
763
|
+
properties: {
|
|
764
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
765
|
+
description: { type: 'string', description: 'Task description' },
|
|
766
|
+
checklist: {
|
|
767
|
+
type: 'array',
|
|
768
|
+
items: {
|
|
769
|
+
type: 'object',
|
|
770
|
+
properties: {
|
|
771
|
+
title: { type: 'string', description: 'Checklist item title' },
|
|
772
|
+
isChecked: { type: 'boolean', description: 'Whether item is checked' },
|
|
773
|
+
},
|
|
774
|
+
required: ['title'],
|
|
775
|
+
},
|
|
776
|
+
description: 'Checklist items (replaces existing checklist)',
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
required: ['taskId'],
|
|
780
|
+
},
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: 'planner_add_reference',
|
|
784
|
+
description: 'Add a link/attachment to a Planner task. Files must be uploaded to OneDrive/SharePoint first, then the URL can be attached.',
|
|
785
|
+
inputSchema: {
|
|
786
|
+
type: 'object',
|
|
787
|
+
properties: {
|
|
788
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
789
|
+
url: { type: 'string', description: 'URL of the file or link to attach' },
|
|
790
|
+
alias: { type: 'string', description: 'Display name for the attachment' },
|
|
791
|
+
type: {
|
|
792
|
+
type: 'string',
|
|
793
|
+
enum: ['Word', 'Excel', 'PowerPoint', 'OneNote', 'SharePoint', 'OneDrive', 'Other', 'Pdf'],
|
|
794
|
+
description: 'File type (auto-detected if not provided)',
|
|
795
|
+
},
|
|
796
|
+
},
|
|
797
|
+
required: ['taskId', 'url'],
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: 'planner_remove_reference',
|
|
802
|
+
description: 'Remove an attachment/link from a Planner task',
|
|
803
|
+
inputSchema: {
|
|
804
|
+
type: 'object',
|
|
805
|
+
properties: {
|
|
806
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
807
|
+
url: { type: 'string', description: 'URL of the reference to remove' },
|
|
808
|
+
},
|
|
809
|
+
required: ['taskId', 'url'],
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
name: 'planner_upload_attach',
|
|
814
|
+
description: 'Upload a local file to OneDrive and attach it to a Planner task in one step',
|
|
815
|
+
inputSchema: {
|
|
816
|
+
type: 'object',
|
|
817
|
+
properties: {
|
|
818
|
+
taskId: { type: 'string', description: 'The Planner task ID' },
|
|
819
|
+
localPath: { type: 'string', description: 'Local file path to upload' },
|
|
820
|
+
remotePath: {
|
|
821
|
+
type: 'string',
|
|
822
|
+
description: 'Destination path in OneDrive. If omitted, uploads to "Planner Attachments/<filename>"',
|
|
823
|
+
},
|
|
824
|
+
alias: { type: 'string', description: 'Display name for the attachment' },
|
|
825
|
+
},
|
|
826
|
+
required: ['taskId', 'localPath'],
|
|
827
|
+
},
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
name: 'planner_checklist_add',
|
|
831
|
+
description: 'Add a checklist item to a Planner task',
|
|
832
|
+
inputSchema: {
|
|
833
|
+
type: 'object',
|
|
834
|
+
properties: {
|
|
835
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
836
|
+
title: { type: 'string', description: 'Checklist item title' },
|
|
837
|
+
isChecked: { type: 'boolean', description: 'Whether item is checked. Default: false' },
|
|
838
|
+
},
|
|
839
|
+
required: ['taskId', 'title'],
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
name: 'planner_checklist_remove',
|
|
844
|
+
description: 'Remove a checklist item from a Planner task',
|
|
845
|
+
inputSchema: {
|
|
846
|
+
type: 'object',
|
|
847
|
+
properties: {
|
|
848
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
849
|
+
itemId: { type: 'string', description: 'The checklist item ID' },
|
|
850
|
+
},
|
|
851
|
+
required: ['taskId', 'itemId'],
|
|
852
|
+
},
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
name: 'planner_checklist_toggle',
|
|
856
|
+
description: 'Toggle the checked state of a checklist item',
|
|
857
|
+
inputSchema: {
|
|
858
|
+
type: 'object',
|
|
859
|
+
properties: {
|
|
860
|
+
taskId: { type: 'string', description: 'The task ID' },
|
|
861
|
+
itemId: { type: 'string', description: 'The checklist item ID' },
|
|
862
|
+
},
|
|
863
|
+
required: ['taskId', 'itemId'],
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
// Auth
|
|
867
|
+
{
|
|
868
|
+
name: 'auth_status',
|
|
869
|
+
description: 'Check authentication status and current user',
|
|
870
|
+
inputSchema: {
|
|
871
|
+
type: 'object',
|
|
872
|
+
properties: {},
|
|
873
|
+
},
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
name: 'debug_info',
|
|
877
|
+
description: 'Get debug information about the MCP server configuration',
|
|
878
|
+
inputSchema: {
|
|
879
|
+
type: 'object',
|
|
880
|
+
properties: {},
|
|
881
|
+
},
|
|
882
|
+
},
|
|
883
|
+
];
|
|
884
|
+
// Handler for listing tools
|
|
885
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
886
|
+
return { tools: TOOLS };
|
|
887
|
+
});
|
|
888
|
+
// Handler for calling tools
|
|
889
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
890
|
+
const { name, arguments: args } = request.params;
|
|
891
|
+
const result = await executeCommand(name, args);
|
|
892
|
+
if (result.success) {
|
|
893
|
+
return {
|
|
894
|
+
content: [
|
|
895
|
+
{
|
|
896
|
+
type: 'text',
|
|
897
|
+
text: JSON.stringify(result.data, null, 2),
|
|
898
|
+
},
|
|
899
|
+
],
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
return {
|
|
904
|
+
content: [
|
|
905
|
+
{
|
|
906
|
+
type: 'text',
|
|
907
|
+
text: `Error: ${result.error}`,
|
|
908
|
+
},
|
|
909
|
+
],
|
|
910
|
+
isError: true,
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
// Start server
|
|
915
|
+
async function main() {
|
|
916
|
+
const transport = new StdioServerTransport();
|
|
917
|
+
await server.connect(transport);
|
|
918
|
+
console.error('Personal M365 MCP server started');
|
|
919
|
+
}
|
|
920
|
+
main().catch((error) => {
|
|
921
|
+
console.error('Fatal error:', error);
|
|
922
|
+
process.exit(1);
|
|
923
|
+
});
|
|
924
|
+
//# sourceMappingURL=index.js.map
|