outlook-cli 1.2.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/CLI.md +89 -0
- package/LICENSE +21 -0
- package/QUICKSTART.md +104 -0
- package/README.md +994 -0
- package/auth/index.js +36 -0
- package/auth/oauth-server.js +139 -0
- package/auth/token-manager.js +199 -0
- package/auth/token-storage.js +282 -0
- package/auth/tools.js +127 -0
- package/calendar/accept.js +64 -0
- package/calendar/cancel.js +64 -0
- package/calendar/create.js +69 -0
- package/calendar/decline.js +64 -0
- package/calendar/delete.js +59 -0
- package/calendar/index.js +123 -0
- package/calendar/list.js +77 -0
- package/cli.js +1349 -0
- package/config.js +84 -0
- package/docs/PROJECT-STRUCTURE.md +52 -0
- package/docs/PUBLISHING.md +86 -0
- package/docs/REFERENCE.md +679 -0
- package/email/folder-utils.js +171 -0
- package/email/index.js +157 -0
- package/email/list.js +89 -0
- package/email/mark-as-read.js +101 -0
- package/email/read.js +128 -0
- package/email/search.js +282 -0
- package/email/send.js +120 -0
- package/folder/create.js +124 -0
- package/folder/index.js +78 -0
- package/folder/list.js +264 -0
- package/folder/move.js +163 -0
- package/index.js +136 -0
- package/outlook-auth-server.js +305 -0
- package/package.json +76 -0
- package/rules/create.js +248 -0
- package/rules/index.js +177 -0
- package/rules/list.js +202 -0
- package/tool-registry.js +54 -0
- package/utils/graph-api.js +120 -0
- package/utils/mock-data.js +145 -0
- package/utils/odata-helpers.js +40 -0
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
# CLI and MCP Tool Reference
|
|
2
|
+
|
|
3
|
+
This document is the complete, publish-ready reference for:
|
|
4
|
+
|
|
5
|
+
- every CLI command and subcommand
|
|
6
|
+
- every parameter, required field, default, and behavior
|
|
7
|
+
- every MCP tool input schema exposed through the tool registry
|
|
8
|
+
|
|
9
|
+
## Conventions
|
|
10
|
+
|
|
11
|
+
- CLI binary: `outlook-cli`
|
|
12
|
+
- Output mode:
|
|
13
|
+
- `text` (default)
|
|
14
|
+
- `json` (with `--json` or `--output json`)
|
|
15
|
+
- Option key normalization:
|
|
16
|
+
- `--event-id` and `--eventId` map to the same internal key.
|
|
17
|
+
- `--start-server` and `--startServer` are equivalent.
|
|
18
|
+
- Boolean parsing accepts:
|
|
19
|
+
- true values: `true`, `1`, `yes`, `y`, `on`
|
|
20
|
+
- false values: `false`, `0`, `no`, `n`, `off`
|
|
21
|
+
|
|
22
|
+
## Global CLI options
|
|
23
|
+
|
|
24
|
+
| Option | Type | Required | Default | Description |
|
|
25
|
+
|---|---|---:|---|---|
|
|
26
|
+
| `--json` | boolean | No | `false` | Forces JSON output for automation and agents. |
|
|
27
|
+
| `--output` | `text` \| `json` | No | `text` | Explicit output mode override. |
|
|
28
|
+
| `--plain` | boolean | No | `false` | Disables rich color and animation UI output. |
|
|
29
|
+
| `--no-color` | boolean | No | `false` | Disables terminal colors. |
|
|
30
|
+
| `--no-animate` | boolean | No | `false` | Disables loading/waiting spinner animation. |
|
|
31
|
+
| `--help`, `-h` | boolean | No | `false` | Prints usage information. |
|
|
32
|
+
| `--version`, `-v` | boolean | No | `false` | Prints package version. |
|
|
33
|
+
|
|
34
|
+
## Top-level commands
|
|
35
|
+
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `commands` | Prints command groups and all registered MCP tools. |
|
|
39
|
+
| `-commands` / `--commands` | Alias to `commands`. |
|
|
40
|
+
| `tools list` | Lists all tools with descriptions and schemas. |
|
|
41
|
+
| `tools schema <tool-name>` | Prints schema for one tool. |
|
|
42
|
+
| `call <tool-name>` | Calls any registered MCP tool directly. |
|
|
43
|
+
| `auth ...` | Authentication command group. |
|
|
44
|
+
| `email ...` | Email command group. |
|
|
45
|
+
| `calendar ...` | Calendar command group. |
|
|
46
|
+
| `folder ...` | Folder command group. |
|
|
47
|
+
| `rule ...` | Rules command group. |
|
|
48
|
+
| `doctor` | Environment and auth diagnostics. |
|
|
49
|
+
| `update` | Prints or runs global npm update command. |
|
|
50
|
+
| `help` | Same as `--help`. |
|
|
51
|
+
| `version` | Same as `--version`. |
|
|
52
|
+
|
|
53
|
+
## Command details
|
|
54
|
+
|
|
55
|
+
### commands
|
|
56
|
+
|
|
57
|
+
Prints:
|
|
58
|
+
|
|
59
|
+
- command groups
|
|
60
|
+
- registered tool count
|
|
61
|
+
- tool names, descriptions, and input schemas (in JSON mode)
|
|
62
|
+
|
|
63
|
+
Examples:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
outlook-cli commands
|
|
67
|
+
outlook-cli commands --json
|
|
68
|
+
outlook-cli -commands --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### tools list
|
|
72
|
+
|
|
73
|
+
Lists all registered tools.
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
outlook-cli tools list
|
|
79
|
+
outlook-cli tools list --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### tools schema
|
|
83
|
+
|
|
84
|
+
Usage:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
outlook-cli tools schema <tool-name>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Parameters:
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Description |
|
|
93
|
+
|---|---|---:|---|
|
|
94
|
+
| `<tool-name>` | string | Yes | Exact MCP tool name, for example `send-email`. |
|
|
95
|
+
|
|
96
|
+
### call
|
|
97
|
+
|
|
98
|
+
Usage:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
outlook-cli call <tool-name> [--args-json '{...}'] [--arg key=value]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Parameters:
|
|
105
|
+
|
|
106
|
+
| Parameter | Type | Required | Default | Description |
|
|
107
|
+
|---|---|---:|---|---|
|
|
108
|
+
| `<tool-name>` | string | Yes | - | Exact MCP tool name. |
|
|
109
|
+
| `--args-json` | object JSON | No | `{}` | Base arguments object. Must be valid JSON object. |
|
|
110
|
+
| `--arg` | repeated `key=value` | No | none | Additional args. Repeated flags are merged. |
|
|
111
|
+
|
|
112
|
+
Merge behavior:
|
|
113
|
+
|
|
114
|
+
- `--arg` keys overwrite the same key from `--args-json`.
|
|
115
|
+
|
|
116
|
+
Examples:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
outlook-cli call list-emails --args-json '{"count":5}'
|
|
120
|
+
outlook-cli call search-emails --arg query=invoice --arg unreadOnly=true --json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### auth status
|
|
124
|
+
|
|
125
|
+
Shows current auth state and token file path.
|
|
126
|
+
|
|
127
|
+
Usage:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
outlook-cli auth status
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### auth url
|
|
134
|
+
|
|
135
|
+
Prints the Microsoft OAuth URL generated from current config.
|
|
136
|
+
|
|
137
|
+
Usage:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
outlook-cli auth url
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### auth login
|
|
144
|
+
|
|
145
|
+
Starts and/or opens auth flow and optionally waits for token.
|
|
146
|
+
|
|
147
|
+
Usage:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
outlook-cli auth login [options]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Options:
|
|
154
|
+
|
|
155
|
+
| Option | Type | Required | Default | Description |
|
|
156
|
+
|---|---|---:|---|---|
|
|
157
|
+
| `--force` | boolean | No | `false` | Clears cached token and forces re-authentication. |
|
|
158
|
+
| `--open` | boolean | No | `true` | Opens auth URL in default browser. |
|
|
159
|
+
| `--start-server` | boolean | No | `true` | Starts local auth server if not already running. |
|
|
160
|
+
| `--wait` | boolean | No | `true` | Waits for token completion before returning. |
|
|
161
|
+
| `--timeout` | number (seconds) | No | `180` | Max wait time when `--wait` is true. Min effective timeout is 5s. |
|
|
162
|
+
|
|
163
|
+
### auth logout
|
|
164
|
+
|
|
165
|
+
Clears token cache from token store path.
|
|
166
|
+
|
|
167
|
+
Usage:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
outlook-cli auth logout
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### email list
|
|
174
|
+
|
|
175
|
+
Maps to tool: `list-emails`
|
|
176
|
+
|
|
177
|
+
Usage:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
outlook-cli email list [options]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Options:
|
|
184
|
+
|
|
185
|
+
| Option | Type | Required | Default | Description |
|
|
186
|
+
|---|---|---:|---|---|
|
|
187
|
+
| `--folder` | string | No | `inbox` | Folder name. |
|
|
188
|
+
| `--count` | number | No | `10` | Max number of messages to return. |
|
|
189
|
+
|
|
190
|
+
### email search
|
|
191
|
+
|
|
192
|
+
Maps to tool: `search-emails`
|
|
193
|
+
|
|
194
|
+
Usage:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
outlook-cli email search [options]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Options:
|
|
201
|
+
|
|
202
|
+
| Option | Type | Required | Default | Description |
|
|
203
|
+
|---|---|---:|---|---|
|
|
204
|
+
| `--query` | string | No | empty | Full-text search text. |
|
|
205
|
+
| `--folder` | string | No | `inbox` | Folder to search. |
|
|
206
|
+
| `--from` | string | No | empty | Sender filter. |
|
|
207
|
+
| `--to` | string | No | empty | Recipient filter. |
|
|
208
|
+
| `--subject` | string | No | empty | Subject filter. |
|
|
209
|
+
| `--has-attachments` | boolean | No | unset | If true, only emails with attachments. |
|
|
210
|
+
| `--unread-only` | boolean | No | unset | If true, only unread emails. |
|
|
211
|
+
| `--count` | number | No | `10` | Max results. |
|
|
212
|
+
|
|
213
|
+
### email read
|
|
214
|
+
|
|
215
|
+
Maps to tool: `read-email`
|
|
216
|
+
|
|
217
|
+
Usage:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
outlook-cli email read --id <email-id>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Options:
|
|
224
|
+
|
|
225
|
+
| Option | Type | Required | Description |
|
|
226
|
+
|---|---|---:|---|
|
|
227
|
+
| `--id` | string | Yes | Message ID. |
|
|
228
|
+
|
|
229
|
+
### email send
|
|
230
|
+
|
|
231
|
+
Maps to tool: `send-email`
|
|
232
|
+
|
|
233
|
+
Usage:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
outlook-cli email send --to <emails> --subject <subject> --body <body> [options]
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Options:
|
|
240
|
+
|
|
241
|
+
| Option | Type | Required | Default | Description |
|
|
242
|
+
|---|---|---:|---|---|
|
|
243
|
+
| `--to` | CSV string | Yes | - | Recipient addresses. |
|
|
244
|
+
| `--subject` | string | Yes | - | Email subject. |
|
|
245
|
+
| `--body` | string | Yes | - | Email body. |
|
|
246
|
+
| `--cc` | CSV string | No | empty | CC recipients. |
|
|
247
|
+
| `--bcc` | CSV string | No | empty | BCC recipients. |
|
|
248
|
+
| `--importance` | `normal` \| `high` \| `low` | No | `normal` | Message importance. |
|
|
249
|
+
| `--save-to-sent-items` | boolean | No | `true` | Save sent mail in Sent Items. |
|
|
250
|
+
|
|
251
|
+
### email mark-read
|
|
252
|
+
|
|
253
|
+
Maps to tool: `mark-as-read`
|
|
254
|
+
|
|
255
|
+
Usage:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
outlook-cli email mark-read --id <email-id> [--is-read true|false]
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Options:
|
|
262
|
+
|
|
263
|
+
| Option | Type | Required | Default | Description |
|
|
264
|
+
|---|---|---:|---|---|
|
|
265
|
+
| `--id` | string | Yes | - | Message ID. |
|
|
266
|
+
| `--is-read` | boolean | No | `true` | True = mark read, false = mark unread. |
|
|
267
|
+
|
|
268
|
+
### calendar list
|
|
269
|
+
|
|
270
|
+
Maps to tool: `list-events`
|
|
271
|
+
|
|
272
|
+
Usage:
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
outlook-cli calendar list [--count <n>]
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Options:
|
|
279
|
+
|
|
280
|
+
| Option | Type | Required | Default | Description |
|
|
281
|
+
|---|---|---:|---|---|
|
|
282
|
+
| `--count` | number | No | `10` | Max events returned. |
|
|
283
|
+
|
|
284
|
+
### calendar create
|
|
285
|
+
|
|
286
|
+
Maps to tool: `create-event`
|
|
287
|
+
|
|
288
|
+
Usage:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
outlook-cli calendar create --subject <subject> --start <iso> --end <iso> [options]
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Options:
|
|
295
|
+
|
|
296
|
+
| Option | Type | Required | Default | Description |
|
|
297
|
+
|---|---|---:|---|---|
|
|
298
|
+
| `--subject` | string | Yes | - | Event title. |
|
|
299
|
+
| `--start` | ISO datetime string | Yes | - | Start datetime. |
|
|
300
|
+
| `--end` | ISO datetime string | Yes | - | End datetime. |
|
|
301
|
+
| `--timezone` | string | No | server default timezone | Timezone applied to start/end wrapper. |
|
|
302
|
+
| `--attendees` | CSV string | No | empty | Recipient emails invited to event. |
|
|
303
|
+
| `--body` | string | No | empty | Event body/notes. |
|
|
304
|
+
|
|
305
|
+
### calendar decline
|
|
306
|
+
|
|
307
|
+
Maps to tool: `decline-event`
|
|
308
|
+
|
|
309
|
+
Usage:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
outlook-cli calendar decline --event-id <id> [--comment <text>]
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Options:
|
|
316
|
+
|
|
317
|
+
| Option | Type | Required | Description |
|
|
318
|
+
|---|---|---:|---|
|
|
319
|
+
| `--event-id` | string | Yes | Event ID. |
|
|
320
|
+
| `--comment` | string | No | Optional decline comment. |
|
|
321
|
+
|
|
322
|
+
### calendar cancel
|
|
323
|
+
|
|
324
|
+
Maps to tool: `cancel-event`
|
|
325
|
+
|
|
326
|
+
Usage:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
outlook-cli calendar cancel --event-id <id> [--comment <text>]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Options:
|
|
333
|
+
|
|
334
|
+
| Option | Type | Required | Description |
|
|
335
|
+
|---|---|---:|---|
|
|
336
|
+
| `--event-id` | string | Yes | Event ID. |
|
|
337
|
+
| `--comment` | string | No | Optional cancel comment. |
|
|
338
|
+
|
|
339
|
+
### calendar delete
|
|
340
|
+
|
|
341
|
+
Maps to tool: `delete-event`
|
|
342
|
+
|
|
343
|
+
Usage:
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
outlook-cli calendar delete --event-id <id>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Options:
|
|
350
|
+
|
|
351
|
+
| Option | Type | Required | Description |
|
|
352
|
+
|---|---|---:|---|
|
|
353
|
+
| `--event-id` | string | Yes | Event ID. |
|
|
354
|
+
|
|
355
|
+
### folder list
|
|
356
|
+
|
|
357
|
+
Maps to tool: `list-folders`
|
|
358
|
+
|
|
359
|
+
Usage:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
outlook-cli folder list [options]
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Options:
|
|
366
|
+
|
|
367
|
+
| Option | Type | Required | Default | Description |
|
|
368
|
+
|---|---|---:|---|---|
|
|
369
|
+
| `--include-item-counts` | boolean | No | `false` | Include total and unread counts. |
|
|
370
|
+
| `--include-children` | boolean | No | `false` | Include child folders. |
|
|
371
|
+
|
|
372
|
+
### folder create
|
|
373
|
+
|
|
374
|
+
Maps to tool: `create-folder`
|
|
375
|
+
|
|
376
|
+
Usage:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
outlook-cli folder create --name <folder-name> [--parent-folder <name>]
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Options:
|
|
383
|
+
|
|
384
|
+
| Option | Type | Required | Default | Description |
|
|
385
|
+
|---|---|---:|---|---|
|
|
386
|
+
| `--name` | string | Yes | - | New folder name. |
|
|
387
|
+
| `--parent-folder` | string | No | root | Parent folder name. |
|
|
388
|
+
|
|
389
|
+
### folder move
|
|
390
|
+
|
|
391
|
+
Maps to tool: `move-emails`
|
|
392
|
+
|
|
393
|
+
Usage:
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
outlook-cli folder move --email-ids <id1,id2> --target-folder <name> [--source-folder <name>]
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Options:
|
|
400
|
+
|
|
401
|
+
| Option | Type | Required | Default | Description |
|
|
402
|
+
|---|---|---:|---|---|
|
|
403
|
+
| `--email-ids` | CSV string | Yes | - | Message IDs to move. |
|
|
404
|
+
| `--target-folder` | string | Yes | - | Destination folder name. |
|
|
405
|
+
| `--source-folder` | string | No | inbox | Optional source folder hint. |
|
|
406
|
+
|
|
407
|
+
### rule list
|
|
408
|
+
|
|
409
|
+
Maps to tool: `list-rules`
|
|
410
|
+
|
|
411
|
+
Usage:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
outlook-cli rule list [--include-details true|false]
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Options:
|
|
418
|
+
|
|
419
|
+
| Option | Type | Required | Default | Description |
|
|
420
|
+
|---|---|---:|---|---|
|
|
421
|
+
| `--include-details` | boolean | No | `false` | Include full conditions/actions. |
|
|
422
|
+
|
|
423
|
+
### rule create
|
|
424
|
+
|
|
425
|
+
Maps to tool: `create-rule`
|
|
426
|
+
|
|
427
|
+
Usage:
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
outlook-cli rule create --name <name> [options]
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Options:
|
|
434
|
+
|
|
435
|
+
| Option | Type | Required | Default | Description |
|
|
436
|
+
|---|---|---:|---|---|
|
|
437
|
+
| `--name` | string | Yes | - | Rule display name. |
|
|
438
|
+
| `--from-addresses` | CSV string | No | empty | Match sender addresses. |
|
|
439
|
+
| `--contains-subject` | string | No | empty | Match subject text. |
|
|
440
|
+
| `--has-attachments` | boolean | No | unset | Match emails with attachments. |
|
|
441
|
+
| `--move-to-folder` | string | No | unset | Move matching email to folder. |
|
|
442
|
+
| `--mark-as-read` | boolean | No | unset | Mark matching email as read. |
|
|
443
|
+
| `--is-enabled` | boolean | No | `true` | Enable rule after creation. |
|
|
444
|
+
| `--sequence` | number | No | auto-generated | Execution order (lower runs first). |
|
|
445
|
+
|
|
446
|
+
Validation rules:
|
|
447
|
+
|
|
448
|
+
- at least one condition is required: `from-addresses`, `contains-subject`, or `has-attachments=true`
|
|
449
|
+
- at least one action is required: `move-to-folder` or `mark-as-read=true`
|
|
450
|
+
- sequence must be a positive integer
|
|
451
|
+
|
|
452
|
+
### rule sequence
|
|
453
|
+
|
|
454
|
+
Maps to tool: `edit-rule-sequence`
|
|
455
|
+
|
|
456
|
+
Usage:
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
outlook-cli rule sequence --rule-name <name> --sequence <number>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Options:
|
|
463
|
+
|
|
464
|
+
| Option | Type | Required | Description |
|
|
465
|
+
|---|---|---:|---|
|
|
466
|
+
| `--rule-name` | string | Yes | Existing rule display name. |
|
|
467
|
+
| `--sequence` | number | Yes | New rule order (positive integer). |
|
|
468
|
+
|
|
469
|
+
### doctor
|
|
470
|
+
|
|
471
|
+
Usage:
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
outlook-cli doctor
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
Reports:
|
|
478
|
+
|
|
479
|
+
- runtime details (`node`, platform, cwd)
|
|
480
|
+
- auth configuration presence
|
|
481
|
+
- token file path and existence
|
|
482
|
+
- auth server reachability
|
|
483
|
+
- warnings list
|
|
484
|
+
|
|
485
|
+
### update
|
|
486
|
+
|
|
487
|
+
Usage:
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
outlook-cli update [--to latest|x.y.z] [--run]
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Options:
|
|
494
|
+
|
|
495
|
+
| Option | Type | Required | Default | Description |
|
|
496
|
+
|---|---|---:|---|---|
|
|
497
|
+
| `--to` | string | No | `latest` | Version target for global npm install. |
|
|
498
|
+
| `--run` | boolean | No | `false` | Executes global update immediately. |
|
|
499
|
+
|
|
500
|
+
When `--run` is not provided, command prints the exact update command only.
|
|
501
|
+
|
|
502
|
+
## MCP tool reference
|
|
503
|
+
|
|
504
|
+
This section documents all tools returned by `outlook-cli tools list`.
|
|
505
|
+
|
|
506
|
+
### about
|
|
507
|
+
|
|
508
|
+
Description: Returns package/server summary.
|
|
509
|
+
|
|
510
|
+
| Field | Type | Required | Description |
|
|
511
|
+
|---|---|---:|---|
|
|
512
|
+
| none | - | - | No input fields. |
|
|
513
|
+
|
|
514
|
+
### authenticate
|
|
515
|
+
|
|
516
|
+
Description: Returns auth URL guidance or creates test token in test mode.
|
|
517
|
+
|
|
518
|
+
| Field | Type | Required | Description |
|
|
519
|
+
|---|---|---:|---|
|
|
520
|
+
| `force` | boolean | No | Force re-authentication. |
|
|
521
|
+
|
|
522
|
+
### check-auth-status
|
|
523
|
+
|
|
524
|
+
Description: Checks if a valid access token is available.
|
|
525
|
+
|
|
526
|
+
| Field | Type | Required | Description |
|
|
527
|
+
|---|---|---:|---|
|
|
528
|
+
| none | - | - | No input fields. |
|
|
529
|
+
|
|
530
|
+
### list-events
|
|
531
|
+
|
|
532
|
+
| Field | Type | Required | Description |
|
|
533
|
+
|---|---|---:|---|
|
|
534
|
+
| `count` | number | No | Number of events to fetch (default 10, max 50). |
|
|
535
|
+
|
|
536
|
+
### decline-event
|
|
537
|
+
|
|
538
|
+
| Field | Type | Required | Description |
|
|
539
|
+
|---|---|---:|---|
|
|
540
|
+
| `eventId` | string | Yes | Event ID to decline. |
|
|
541
|
+
| `comment` | string | No | Optional decline comment. |
|
|
542
|
+
|
|
543
|
+
### create-event
|
|
544
|
+
|
|
545
|
+
| Field | Type | Required | Description |
|
|
546
|
+
|---|---|---:|---|
|
|
547
|
+
| `subject` | string | Yes | Event subject/title. |
|
|
548
|
+
| `start` | string or object | Yes | Start datetime ISO string, or `{ dateTime, timeZone }`. |
|
|
549
|
+
| `end` | string or object | Yes | End datetime ISO string, or `{ dateTime, timeZone }`. |
|
|
550
|
+
| `attendees` | string[] | No | Attendee email addresses. |
|
|
551
|
+
| `body` | string | No | Event body content. |
|
|
552
|
+
|
|
553
|
+
### cancel-event
|
|
554
|
+
|
|
555
|
+
| Field | Type | Required | Description |
|
|
556
|
+
|---|---|---:|---|
|
|
557
|
+
| `eventId` | string | Yes | Event ID to cancel. |
|
|
558
|
+
| `comment` | string | No | Optional cancellation comment. |
|
|
559
|
+
|
|
560
|
+
### delete-event
|
|
561
|
+
|
|
562
|
+
| Field | Type | Required | Description |
|
|
563
|
+
|---|---|---:|---|
|
|
564
|
+
| `eventId` | string | Yes | Event ID to delete. |
|
|
565
|
+
|
|
566
|
+
### list-emails
|
|
567
|
+
|
|
568
|
+
| Field | Type | Required | Description |
|
|
569
|
+
|---|---|---:|---|
|
|
570
|
+
| `folder` | string | No | Folder name, default inbox. |
|
|
571
|
+
| `count` | number | No | Number of emails to fetch (default 10, max 50). |
|
|
572
|
+
|
|
573
|
+
### search-emails
|
|
574
|
+
|
|
575
|
+
| Field | Type | Required | Description |
|
|
576
|
+
|---|---|---:|---|
|
|
577
|
+
| `query` | string | No | Full-text query. |
|
|
578
|
+
| `folder` | string | No | Folder to search in. |
|
|
579
|
+
| `from` | string | No | Sender filter. |
|
|
580
|
+
| `to` | string | No | Recipient filter. |
|
|
581
|
+
| `subject` | string | No | Subject filter. |
|
|
582
|
+
| `hasAttachments` | boolean | No | Restrict to messages with attachments. |
|
|
583
|
+
| `unreadOnly` | boolean | No | Restrict to unread messages. |
|
|
584
|
+
| `count` | number | No | Result count limit. |
|
|
585
|
+
|
|
586
|
+
### read-email
|
|
587
|
+
|
|
588
|
+
| Field | Type | Required | Description |
|
|
589
|
+
|---|---|---:|---|
|
|
590
|
+
| `id` | string | Yes | Message ID. |
|
|
591
|
+
|
|
592
|
+
### send-email
|
|
593
|
+
|
|
594
|
+
| Field | Type | Required | Description |
|
|
595
|
+
|---|---|---:|---|
|
|
596
|
+
| `to` | string | Yes | Comma-separated recipient list. |
|
|
597
|
+
| `cc` | string | No | Comma-separated CC recipients. |
|
|
598
|
+
| `bcc` | string | No | Comma-separated BCC recipients. |
|
|
599
|
+
| `subject` | string | Yes | Email subject. |
|
|
600
|
+
| `body` | string | Yes | Email body, text or HTML. |
|
|
601
|
+
| `importance` | string | No | `normal`, `high`, or `low`. |
|
|
602
|
+
| `saveToSentItems` | boolean | No | Save message in sent folder. |
|
|
603
|
+
|
|
604
|
+
### mark-as-read
|
|
605
|
+
|
|
606
|
+
| Field | Type | Required | Description |
|
|
607
|
+
|---|---|---:|---|
|
|
608
|
+
| `id` | string | Yes | Message ID. |
|
|
609
|
+
| `isRead` | boolean | No | Read state. Default true. |
|
|
610
|
+
|
|
611
|
+
### list-folders
|
|
612
|
+
|
|
613
|
+
| Field | Type | Required | Description |
|
|
614
|
+
|---|---|---:|---|
|
|
615
|
+
| `includeItemCounts` | boolean | No | Include item counts. |
|
|
616
|
+
| `includeChildren` | boolean | No | Include child folders. |
|
|
617
|
+
|
|
618
|
+
### create-folder
|
|
619
|
+
|
|
620
|
+
| Field | Type | Required | Description |
|
|
621
|
+
|---|---|---:|---|
|
|
622
|
+
| `name` | string | Yes | Folder name to create. |
|
|
623
|
+
| `parentFolder` | string | No | Parent folder name. |
|
|
624
|
+
|
|
625
|
+
### move-emails
|
|
626
|
+
|
|
627
|
+
| Field | Type | Required | Description |
|
|
628
|
+
|---|---|---:|---|
|
|
629
|
+
| `emailIds` | string | Yes | Comma-separated message IDs. |
|
|
630
|
+
| `targetFolder` | string | Yes | Destination folder name. |
|
|
631
|
+
| `sourceFolder` | string | No | Source folder name (hint). |
|
|
632
|
+
|
|
633
|
+
### list-rules
|
|
634
|
+
|
|
635
|
+
| Field | Type | Required | Description |
|
|
636
|
+
|---|---|---:|---|
|
|
637
|
+
| `includeDetails` | boolean | No | Include full conditions/actions. |
|
|
638
|
+
|
|
639
|
+
### create-rule
|
|
640
|
+
|
|
641
|
+
| Field | Type | Required | Description |
|
|
642
|
+
|---|---|---:|---|
|
|
643
|
+
| `name` | string | Yes | Rule name. |
|
|
644
|
+
| `fromAddresses` | string | No | Comma-separated sender addresses. |
|
|
645
|
+
| `containsSubject` | string | No | Subject text condition. |
|
|
646
|
+
| `hasAttachments` | boolean | No | Attachment condition. |
|
|
647
|
+
| `moveToFolder` | string | No | Action: move to folder. |
|
|
648
|
+
| `markAsRead` | boolean | No | Action: mark as read. |
|
|
649
|
+
| `isEnabled` | boolean | No | Enabled state (default true). |
|
|
650
|
+
| `sequence` | number | No | Execution order. Lower runs first. |
|
|
651
|
+
|
|
652
|
+
### edit-rule-sequence
|
|
653
|
+
|
|
654
|
+
| Field | Type | Required | Description |
|
|
655
|
+
|---|---|---:|---|
|
|
656
|
+
| `ruleName` | string | Yes | Existing rule name. |
|
|
657
|
+
| `sequence` | number | Yes | New execution order. |
|
|
658
|
+
|
|
659
|
+
## Environment variables
|
|
660
|
+
|
|
661
|
+
### Required for real Microsoft Graph auth
|
|
662
|
+
|
|
663
|
+
- `OUTLOOK_CLIENT_ID`
|
|
664
|
+
- `OUTLOOK_CLIENT_SECRET`
|
|
665
|
+
|
|
666
|
+
Backward-compatible aliases:
|
|
667
|
+
|
|
668
|
+
- `MS_CLIENT_ID`
|
|
669
|
+
- `MS_CLIENT_SECRET`
|
|
670
|
+
|
|
671
|
+
### Optional
|
|
672
|
+
|
|
673
|
+
- `OUTLOOK_SCOPES` or `MS_SCOPES`
|
|
674
|
+
- `OUTLOOK_AUTH_SERVER_URL` or `MS_AUTH_SERVER_URL`
|
|
675
|
+
- `OUTLOOK_REDIRECT_URI` or `MS_REDIRECT_URI`
|
|
676
|
+
- `OUTLOOK_TOKEN_STORE_PATH` or `MS_TOKEN_STORE_PATH`
|
|
677
|
+
- `OUTLOOK_TOKEN_ENDPOINT` or `MS_TOKEN_ENDPOINT`
|
|
678
|
+
- `USE_TEST_MODE=true`
|
|
679
|
+
- `OUTLOOK_DEBUG=true` or `MCP_DEBUG=true`
|