carlyemail-toolkit 0.1.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/tools.js ADDED
@@ -0,0 +1,1259 @@
1
+ // Written by tools/gen_toolkit_tools.py in the API repository. Do not edit.
2
+ export default {
3
+ "source": "app/mcp/tools.py, written by tools/gen_toolkit_tools.py",
4
+ "first_inbox": "Ask the person what they want their email address to be \u2014 the part before the @ \u2014 then call create_inbox with it as `username`. Do not guess a name on their behalf.",
5
+ "tools": [
6
+ {
7
+ "name": "auth_me",
8
+ "title": "Check my access",
9
+ "description": "Show which organization and inbox this key is scoped to.",
10
+ "input_schema": {
11
+ "type": "object",
12
+ "properties": {},
13
+ "required": [],
14
+ "additionalProperties": false
15
+ },
16
+ "read_only": true,
17
+ "destructive": false,
18
+ "idempotent": false,
19
+ "open_world": false
20
+ },
21
+ {
22
+ "name": "create_draft",
23
+ "title": "Write a draft",
24
+ "description": "Compose a draft without sending it.",
25
+ "input_schema": {
26
+ "type": "object",
27
+ "properties": {
28
+ "inbox_id": {
29
+ "type": "string",
30
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
31
+ },
32
+ "to": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "description": "Recipient email addresses."
38
+ },
39
+ "cc": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ },
44
+ "description": "Addresses to copy, visible to every recipient."
45
+ },
46
+ "bcc": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string"
50
+ },
51
+ "description": "Addresses to copy without revealing them to other recipients."
52
+ },
53
+ "subject": {
54
+ "type": "string",
55
+ "description": "Subject line."
56
+ },
57
+ "text": {
58
+ "type": "string",
59
+ "description": "Plain-text body. Send this, or html, or both."
60
+ },
61
+ "html": {
62
+ "type": "string",
63
+ "description": "HTML body. Send this, or text, or both."
64
+ },
65
+ "in_reply_to": {
66
+ "type": "string",
67
+ "description": "Message this draft replies to, which keeps it on that thread."
68
+ },
69
+ "forward_of": {
70
+ "type": "string",
71
+ "description": "Message this draft forwards."
72
+ },
73
+ "reply_all": {
74
+ "type": "boolean",
75
+ "description": "Include everyone on the original, not just its sender."
76
+ },
77
+ "send_at": {
78
+ "type": "string",
79
+ "description": "When to send it, as an ISO 8601 timestamp in the future. Omit to keep it an ordinary draft; set it to null to call a scheduled send back."
80
+ },
81
+ "reply_to": {
82
+ "type": "array",
83
+ "items": {
84
+ "type": "string"
85
+ },
86
+ "description": "Where replies should go, if not back to this inbox."
87
+ },
88
+ "labels": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string"
92
+ },
93
+ "description": "Labels to apply to the message being sent."
94
+ },
95
+ "attachments": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "filename": {
101
+ "type": "string",
102
+ "description": "Name the recipient sees."
103
+ },
104
+ "content": {
105
+ "type": "string",
106
+ "description": "The file, base64 encoded."
107
+ },
108
+ "content_type": {
109
+ "type": "string",
110
+ "description": "MIME type, like application/pdf."
111
+ },
112
+ "content_id": {
113
+ "type": "string",
114
+ "description": "For an inline image referenced by cid: in the HTML body."
115
+ },
116
+ "inline": {
117
+ "type": "boolean",
118
+ "description": "Render inside the message rather than listing it as a file."
119
+ }
120
+ },
121
+ "required": [
122
+ "filename",
123
+ "content"
124
+ ],
125
+ "additionalProperties": false
126
+ },
127
+ "description": "Files to attach."
128
+ },
129
+ "client_id": {
130
+ "type": "string",
131
+ "description": "Your own identifier. Reusing one returns the same draft."
132
+ }
133
+ },
134
+ "required": [],
135
+ "additionalProperties": false
136
+ },
137
+ "read_only": false,
138
+ "destructive": false,
139
+ "idempotent": false,
140
+ "open_world": false
141
+ },
142
+ {
143
+ "name": "create_inbox",
144
+ "title": "Create an inbox",
145
+ "description": "Create a new inbox. Ask the person what they want the address to be before calling this; only omit `username` if they genuinely have no preference.",
146
+ "input_schema": {
147
+ "type": "object",
148
+ "properties": {
149
+ "username": {
150
+ "type": "string",
151
+ "description": "Part before the @, as the person wants it read aloud. Ask them rather than choosing for them \u2014 this becomes the address they hand out. A name is only generated if you omit this, which is a last resort, not the default."
152
+ },
153
+ "domain": {
154
+ "type": "string",
155
+ "description": "Domain to create the address under. Defaults to a domain we host, so this is only needed for a domain you have added and verified yourself."
156
+ },
157
+ "display_name": {
158
+ "type": "string",
159
+ "description": "Name shown to recipients alongside the address."
160
+ },
161
+ "client_id": {
162
+ "type": "string",
163
+ "description": "Your own identifier for this inbox. Reusing one returns the same inbox."
164
+ },
165
+ "metadata": {
166
+ "type": "object",
167
+ "description": "Arbitrary key-value pairs stored with the inbox."
168
+ }
169
+ },
170
+ "required": [],
171
+ "additionalProperties": false
172
+ },
173
+ "read_only": false,
174
+ "destructive": false,
175
+ "idempotent": false,
176
+ "open_world": true
177
+ },
178
+ {
179
+ "name": "delete_draft",
180
+ "title": "Delete a draft",
181
+ "description": "Delete a draft.",
182
+ "input_schema": {
183
+ "type": "object",
184
+ "properties": {
185
+ "draft_id": {
186
+ "type": "string",
187
+ "description": "Identifier of the draft, as returned by list_drafts."
188
+ },
189
+ "inbox_id": {
190
+ "type": "string",
191
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
192
+ }
193
+ },
194
+ "required": [
195
+ "draft_id"
196
+ ],
197
+ "additionalProperties": false
198
+ },
199
+ "read_only": false,
200
+ "destructive": true,
201
+ "idempotent": true,
202
+ "open_world": false
203
+ },
204
+ {
205
+ "name": "delete_inbox",
206
+ "title": "Delete an inbox and its mail",
207
+ "description": "Delete an inbox. Its messages go with it.",
208
+ "input_schema": {
209
+ "type": "object",
210
+ "properties": {
211
+ "inbox_id": {
212
+ "type": "string",
213
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
214
+ }
215
+ },
216
+ "required": [
217
+ "inbox_id"
218
+ ],
219
+ "additionalProperties": false
220
+ },
221
+ "read_only": false,
222
+ "destructive": true,
223
+ "idempotent": true,
224
+ "open_world": false
225
+ },
226
+ {
227
+ "name": "delete_thread",
228
+ "title": "Delete a conversation",
229
+ "description": "Delete a thread.",
230
+ "input_schema": {
231
+ "type": "object",
232
+ "properties": {
233
+ "thread_id": {
234
+ "type": "string",
235
+ "description": "Identifier of the conversation, as returned by list_threads."
236
+ },
237
+ "inbox_id": {
238
+ "type": "string",
239
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
240
+ }
241
+ },
242
+ "required": [
243
+ "thread_id"
244
+ ],
245
+ "additionalProperties": false
246
+ },
247
+ "read_only": false,
248
+ "destructive": true,
249
+ "idempotent": true,
250
+ "open_world": false
251
+ },
252
+ {
253
+ "name": "forward_message",
254
+ "title": "Forward an email",
255
+ "description": "Forward a message to new recipients.",
256
+ "input_schema": {
257
+ "type": "object",
258
+ "properties": {
259
+ "message_id": {
260
+ "type": "string",
261
+ "description": "Identifier of the message, as returned by list_messages."
262
+ },
263
+ "inbox_id": {
264
+ "type": "string",
265
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
266
+ },
267
+ "to": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "string"
271
+ },
272
+ "description": "Recipient email addresses."
273
+ },
274
+ "cc": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string"
278
+ },
279
+ "description": "Addresses to copy, visible to every recipient."
280
+ },
281
+ "bcc": {
282
+ "type": "array",
283
+ "items": {
284
+ "type": "string"
285
+ },
286
+ "description": "Addresses to copy without revealing them to other recipients."
287
+ },
288
+ "subject": {
289
+ "type": "string",
290
+ "description": "Subject line."
291
+ },
292
+ "text": {
293
+ "type": "string",
294
+ "description": "Optional note to add above the forwarded message."
295
+ },
296
+ "html": {
297
+ "type": "string",
298
+ "description": "HTML body. Send this, or text, or both."
299
+ },
300
+ "reply_to": {
301
+ "type": "array",
302
+ "items": {
303
+ "type": "string"
304
+ },
305
+ "description": "Where replies should go, if not back to this inbox."
306
+ },
307
+ "labels": {
308
+ "type": "array",
309
+ "items": {
310
+ "type": "string"
311
+ },
312
+ "description": "Labels to apply to the message being sent."
313
+ },
314
+ "headers": {
315
+ "type": "object",
316
+ "additionalProperties": {
317
+ "type": "string"
318
+ },
319
+ "description": "Extra headers to set on the message. From, To, Cc, Bcc, Subject, Date, Message-ID, In-Reply-To and References are ignored \u2014 they are set from the message itself."
320
+ },
321
+ "attachments": {
322
+ "type": "array",
323
+ "items": {
324
+ "type": "object",
325
+ "properties": {
326
+ "filename": {
327
+ "type": "string",
328
+ "description": "Name the recipient sees."
329
+ },
330
+ "content": {
331
+ "type": "string",
332
+ "description": "The file, base64 encoded."
333
+ },
334
+ "content_type": {
335
+ "type": "string",
336
+ "description": "MIME type, like application/pdf."
337
+ },
338
+ "content_id": {
339
+ "type": "string",
340
+ "description": "For an inline image referenced by cid: in the HTML body."
341
+ },
342
+ "inline": {
343
+ "type": "boolean",
344
+ "description": "Render inside the message rather than listing it as a file."
345
+ }
346
+ },
347
+ "required": [
348
+ "filename",
349
+ "content"
350
+ ],
351
+ "additionalProperties": false
352
+ },
353
+ "description": "Files to attach."
354
+ }
355
+ },
356
+ "required": [
357
+ "message_id",
358
+ "to"
359
+ ],
360
+ "additionalProperties": false
361
+ },
362
+ "read_only": false,
363
+ "destructive": false,
364
+ "idempotent": false,
365
+ "open_world": true
366
+ },
367
+ {
368
+ "name": "get_attachment",
369
+ "title": "Download an attachment",
370
+ "description": "Get a download URL for an attachment.",
371
+ "input_schema": {
372
+ "type": "object",
373
+ "properties": {
374
+ "message_id": {
375
+ "type": "string",
376
+ "description": "Identifier of the message, as returned by list_messages."
377
+ },
378
+ "attachment_id": {
379
+ "type": "string",
380
+ "description": "Identifier of the attachment, as listed on the message."
381
+ },
382
+ "inbox_id": {
383
+ "type": "string",
384
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
385
+ }
386
+ },
387
+ "required": [
388
+ "message_id",
389
+ "attachment_id"
390
+ ],
391
+ "additionalProperties": false
392
+ },
393
+ "read_only": true,
394
+ "destructive": false,
395
+ "idempotent": false,
396
+ "open_world": false
397
+ },
398
+ {
399
+ "name": "get_draft",
400
+ "title": "Read a draft",
401
+ "description": "Get one draft.",
402
+ "input_schema": {
403
+ "type": "object",
404
+ "properties": {
405
+ "draft_id": {
406
+ "type": "string",
407
+ "description": "Identifier of the draft, as returned by list_drafts."
408
+ },
409
+ "inbox_id": {
410
+ "type": "string",
411
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
412
+ }
413
+ },
414
+ "required": [
415
+ "draft_id"
416
+ ],
417
+ "additionalProperties": false
418
+ },
419
+ "read_only": true,
420
+ "destructive": false,
421
+ "idempotent": false,
422
+ "open_world": false
423
+ },
424
+ {
425
+ "name": "get_inbox",
426
+ "title": "Get an inbox",
427
+ "description": "Get one inbox by its address.",
428
+ "input_schema": {
429
+ "type": "object",
430
+ "properties": {
431
+ "inbox_id": {
432
+ "type": "string",
433
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
434
+ }
435
+ },
436
+ "required": [],
437
+ "additionalProperties": false
438
+ },
439
+ "read_only": true,
440
+ "destructive": false,
441
+ "idempotent": false,
442
+ "open_world": false
443
+ },
444
+ {
445
+ "name": "get_thread",
446
+ "title": "Read a conversation",
447
+ "description": "Get one thread with every message in it.",
448
+ "input_schema": {
449
+ "type": "object",
450
+ "properties": {
451
+ "thread_id": {
452
+ "type": "string",
453
+ "description": "Identifier of the conversation, as returned by list_threads."
454
+ },
455
+ "inbox_id": {
456
+ "type": "string",
457
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
458
+ }
459
+ },
460
+ "required": [
461
+ "thread_id"
462
+ ],
463
+ "additionalProperties": false
464
+ },
465
+ "read_only": true,
466
+ "destructive": false,
467
+ "idempotent": false,
468
+ "open_world": false
469
+ },
470
+ {
471
+ "name": "list_drafts",
472
+ "title": "List drafts",
473
+ "description": "List drafts.",
474
+ "input_schema": {
475
+ "type": "object",
476
+ "properties": {
477
+ "inbox_id": {
478
+ "type": "string",
479
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
480
+ },
481
+ "limit": {
482
+ "type": "integer",
483
+ "description": "Maximum number of items to return."
484
+ },
485
+ "labels": {
486
+ "type": "array",
487
+ "items": {
488
+ "type": "string"
489
+ },
490
+ "description": "Labels to filter by. A thread matches when it carries all of them."
491
+ },
492
+ "before": {
493
+ "type": "string",
494
+ "description": "Only items older than this ISO 8601 timestamp."
495
+ },
496
+ "after": {
497
+ "type": "string",
498
+ "description": "Only items newer than this ISO 8601 timestamp."
499
+ },
500
+ "ascending": {
501
+ "type": "boolean",
502
+ "description": "Oldest first. The default is newest first."
503
+ },
504
+ "page_token": {
505
+ "type": "string",
506
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
507
+ }
508
+ },
509
+ "required": [],
510
+ "additionalProperties": false
511
+ },
512
+ "read_only": true,
513
+ "destructive": false,
514
+ "idempotent": false,
515
+ "open_world": false
516
+ },
517
+ {
518
+ "name": "list_inboxes",
519
+ "title": "List inboxes",
520
+ "description": "List the inboxes this key can reach.",
521
+ "input_schema": {
522
+ "type": "object",
523
+ "properties": {
524
+ "limit": {
525
+ "type": "integer",
526
+ "description": "Maximum number of items to return."
527
+ },
528
+ "page_token": {
529
+ "type": "string",
530
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
531
+ }
532
+ },
533
+ "required": [],
534
+ "additionalProperties": false
535
+ },
536
+ "read_only": true,
537
+ "destructive": false,
538
+ "idempotent": false,
539
+ "open_world": false
540
+ },
541
+ {
542
+ "name": "list_messages",
543
+ "title": "List messages",
544
+ "description": "List messages, newest first. An index only: no body is returned, just a short `preview`. Call `get_thread` for the text of anything you need to read, and prefer its `extracted_text` over `text`.",
545
+ "input_schema": {
546
+ "type": "object",
547
+ "properties": {
548
+ "inbox_id": {
549
+ "type": "string",
550
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
551
+ },
552
+ "limit": {
553
+ "type": "integer",
554
+ "description": "Maximum number of items to return."
555
+ },
556
+ "labels": {
557
+ "type": "array",
558
+ "items": {
559
+ "type": "string"
560
+ },
561
+ "description": "Labels to filter by. A thread matches when it carries all of them."
562
+ },
563
+ "include_spam": {
564
+ "type": "boolean",
565
+ "description": "Include messages filed as spam. They are left out by default."
566
+ },
567
+ "from": {
568
+ "type": "string",
569
+ "description": "Only messages from this sender."
570
+ },
571
+ "to": {
572
+ "type": "string",
573
+ "description": "Only messages to this recipient."
574
+ },
575
+ "subject": {
576
+ "type": "string",
577
+ "description": "Only messages whose subject contains this text."
578
+ },
579
+ "before": {
580
+ "type": "string",
581
+ "description": "Only items older than this ISO 8601 timestamp."
582
+ },
583
+ "after": {
584
+ "type": "string",
585
+ "description": "Only items newer than this ISO 8601 timestamp."
586
+ },
587
+ "ascending": {
588
+ "type": "boolean",
589
+ "description": "Oldest first. The default is newest first."
590
+ },
591
+ "page_token": {
592
+ "type": "string",
593
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
594
+ }
595
+ },
596
+ "required": [],
597
+ "additionalProperties": false
598
+ },
599
+ "read_only": true,
600
+ "destructive": false,
601
+ "idempotent": false,
602
+ "open_world": false
603
+ },
604
+ {
605
+ "name": "list_threads",
606
+ "title": "List conversations",
607
+ "description": "List conversation threads, newest first.",
608
+ "input_schema": {
609
+ "type": "object",
610
+ "properties": {
611
+ "inbox_id": {
612
+ "type": "string",
613
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
614
+ },
615
+ "limit": {
616
+ "type": "integer",
617
+ "description": "Maximum number of items to return."
618
+ },
619
+ "labels": {
620
+ "type": "array",
621
+ "items": {
622
+ "type": "string"
623
+ },
624
+ "description": "Labels to filter by. A thread matches when it carries all of them."
625
+ },
626
+ "senders": {
627
+ "type": "array",
628
+ "items": {
629
+ "type": "string"
630
+ },
631
+ "description": "Only conversations involving these senders."
632
+ },
633
+ "recipients": {
634
+ "type": "array",
635
+ "items": {
636
+ "type": "string"
637
+ },
638
+ "description": "Only conversations involving these recipients."
639
+ },
640
+ "subject": {
641
+ "type": "string",
642
+ "description": "Only messages whose subject contains this text."
643
+ },
644
+ "before": {
645
+ "type": "string",
646
+ "description": "Only items older than this ISO 8601 timestamp."
647
+ },
648
+ "after": {
649
+ "type": "string",
650
+ "description": "Only items newer than this ISO 8601 timestamp."
651
+ },
652
+ "ascending": {
653
+ "type": "boolean",
654
+ "description": "Oldest first. The default is newest first."
655
+ },
656
+ "page_token": {
657
+ "type": "string",
658
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
659
+ }
660
+ },
661
+ "required": [],
662
+ "additionalProperties": false
663
+ },
664
+ "read_only": true,
665
+ "destructive": false,
666
+ "idempotent": false,
667
+ "open_world": false
668
+ },
669
+ {
670
+ "name": "reply_to_message",
671
+ "title": "Reply to an email",
672
+ "description": "Reply to a message, staying on its thread.",
673
+ "input_schema": {
674
+ "type": "object",
675
+ "properties": {
676
+ "message_id": {
677
+ "type": "string",
678
+ "description": "Identifier of the message, as returned by list_messages."
679
+ },
680
+ "inbox_id": {
681
+ "type": "string",
682
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
683
+ },
684
+ "text": {
685
+ "type": "string",
686
+ "description": "Plain-text body. Send this, or html, or both."
687
+ },
688
+ "html": {
689
+ "type": "string",
690
+ "description": "HTML body. Send this, or text, or both."
691
+ },
692
+ "reply_all": {
693
+ "type": "boolean",
694
+ "description": "Include everyone on the original, not just its sender."
695
+ },
696
+ "to": {
697
+ "type": "array",
698
+ "items": {
699
+ "type": "string"
700
+ },
701
+ "description": "Recipient email addresses."
702
+ },
703
+ "cc": {
704
+ "type": "array",
705
+ "items": {
706
+ "type": "string"
707
+ },
708
+ "description": "Addresses to copy, visible to every recipient."
709
+ },
710
+ "bcc": {
711
+ "type": "array",
712
+ "items": {
713
+ "type": "string"
714
+ },
715
+ "description": "Addresses to copy without revealing them to other recipients."
716
+ },
717
+ "reply_to": {
718
+ "type": "array",
719
+ "items": {
720
+ "type": "string"
721
+ },
722
+ "description": "Where replies should go, if not back to this inbox."
723
+ },
724
+ "labels": {
725
+ "type": "array",
726
+ "items": {
727
+ "type": "string"
728
+ },
729
+ "description": "Labels to apply to the message being sent."
730
+ },
731
+ "headers": {
732
+ "type": "object",
733
+ "additionalProperties": {
734
+ "type": "string"
735
+ },
736
+ "description": "Extra headers to set on the message. From, To, Cc, Bcc, Subject, Date, Message-ID, In-Reply-To and References are ignored \u2014 they are set from the message itself."
737
+ },
738
+ "attachments": {
739
+ "type": "array",
740
+ "items": {
741
+ "type": "object",
742
+ "properties": {
743
+ "filename": {
744
+ "type": "string",
745
+ "description": "Name the recipient sees."
746
+ },
747
+ "content": {
748
+ "type": "string",
749
+ "description": "The file, base64 encoded."
750
+ },
751
+ "content_type": {
752
+ "type": "string",
753
+ "description": "MIME type, like application/pdf."
754
+ },
755
+ "content_id": {
756
+ "type": "string",
757
+ "description": "For an inline image referenced by cid: in the HTML body."
758
+ },
759
+ "inline": {
760
+ "type": "boolean",
761
+ "description": "Render inside the message rather than listing it as a file."
762
+ }
763
+ },
764
+ "required": [
765
+ "filename",
766
+ "content"
767
+ ],
768
+ "additionalProperties": false
769
+ },
770
+ "description": "Files to attach."
771
+ }
772
+ },
773
+ "required": [
774
+ "message_id"
775
+ ],
776
+ "additionalProperties": false
777
+ },
778
+ "read_only": false,
779
+ "destructive": false,
780
+ "idempotent": false,
781
+ "open_world": true
782
+ },
783
+ {
784
+ "name": "search_messages",
785
+ "title": "Search messages",
786
+ "description": "Search messages by subject, body, or sender.",
787
+ "input_schema": {
788
+ "type": "object",
789
+ "properties": {
790
+ "query": {
791
+ "type": "string",
792
+ "description": "Free-text search over sender, recipients, subject and body."
793
+ },
794
+ "inbox_id": {
795
+ "type": "string",
796
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
797
+ },
798
+ "limit": {
799
+ "type": "integer",
800
+ "description": "Maximum number of items to return."
801
+ },
802
+ "before": {
803
+ "type": "string",
804
+ "description": "Only items older than this ISO 8601 timestamp."
805
+ },
806
+ "after": {
807
+ "type": "string",
808
+ "description": "Only items newer than this ISO 8601 timestamp."
809
+ },
810
+ "page_token": {
811
+ "type": "string",
812
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
813
+ }
814
+ },
815
+ "required": [
816
+ "query"
817
+ ],
818
+ "additionalProperties": false
819
+ },
820
+ "read_only": true,
821
+ "destructive": false,
822
+ "idempotent": false,
823
+ "open_world": false
824
+ },
825
+ {
826
+ "name": "search_threads",
827
+ "title": "Search conversations",
828
+ "description": "Search threads by subject or participant.",
829
+ "input_schema": {
830
+ "type": "object",
831
+ "properties": {
832
+ "query": {
833
+ "type": "string",
834
+ "description": "Free-text search over sender, recipients, subject and body."
835
+ },
836
+ "inbox_id": {
837
+ "type": "string",
838
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
839
+ },
840
+ "limit": {
841
+ "type": "integer",
842
+ "description": "Maximum number of items to return."
843
+ },
844
+ "before": {
845
+ "type": "string",
846
+ "description": "Only items older than this ISO 8601 timestamp."
847
+ },
848
+ "after": {
849
+ "type": "string",
850
+ "description": "Only items newer than this ISO 8601 timestamp."
851
+ },
852
+ "page_token": {
853
+ "type": "string",
854
+ "description": "Pass back `next_page_token` from the previous response, unmodified, for the next page."
855
+ }
856
+ },
857
+ "required": [
858
+ "query"
859
+ ],
860
+ "additionalProperties": false
861
+ },
862
+ "read_only": true,
863
+ "destructive": false,
864
+ "idempotent": false,
865
+ "open_world": false
866
+ },
867
+ {
868
+ "name": "send_draft",
869
+ "title": "Send a draft",
870
+ "description": "Send an existing draft.",
871
+ "input_schema": {
872
+ "type": "object",
873
+ "properties": {
874
+ "draft_id": {
875
+ "type": "string",
876
+ "description": "Identifier of the draft, as returned by list_drafts."
877
+ },
878
+ "inbox_id": {
879
+ "type": "string",
880
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
881
+ }
882
+ },
883
+ "required": [
884
+ "draft_id"
885
+ ],
886
+ "additionalProperties": false
887
+ },
888
+ "read_only": false,
889
+ "destructive": false,
890
+ "idempotent": false,
891
+ "open_world": true
892
+ },
893
+ {
894
+ "name": "send_message",
895
+ "title": "Send an email",
896
+ "description": "Send a new email from an inbox.",
897
+ "input_schema": {
898
+ "type": "object",
899
+ "properties": {
900
+ "inbox_id": {
901
+ "type": "string",
902
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
903
+ },
904
+ "to": {
905
+ "type": "array",
906
+ "items": {
907
+ "type": "string"
908
+ },
909
+ "description": "Recipient email addresses."
910
+ },
911
+ "cc": {
912
+ "type": "array",
913
+ "items": {
914
+ "type": "string"
915
+ },
916
+ "description": "Addresses to copy, visible to every recipient."
917
+ },
918
+ "bcc": {
919
+ "type": "array",
920
+ "items": {
921
+ "type": "string"
922
+ },
923
+ "description": "Addresses to copy without revealing them to other recipients."
924
+ },
925
+ "subject": {
926
+ "type": "string",
927
+ "description": "Subject line."
928
+ },
929
+ "text": {
930
+ "type": "string",
931
+ "description": "Plain-text body. Send this, or html, or both."
932
+ },
933
+ "html": {
934
+ "type": "string",
935
+ "description": "HTML body. Send this, or text, or both."
936
+ },
937
+ "labels": {
938
+ "type": "array",
939
+ "items": {
940
+ "type": "string"
941
+ },
942
+ "description": "Labels to apply to the message being sent."
943
+ },
944
+ "reply_to": {
945
+ "type": "array",
946
+ "items": {
947
+ "type": "string"
948
+ },
949
+ "description": "Where replies should go, if not back to this inbox."
950
+ },
951
+ "headers": {
952
+ "type": "object",
953
+ "additionalProperties": {
954
+ "type": "string"
955
+ },
956
+ "description": "Extra headers to set on the message. From, To, Cc, Bcc, Subject, Date, Message-ID, In-Reply-To and References are ignored \u2014 they are set from the message itself."
957
+ },
958
+ "attachments": {
959
+ "type": "array",
960
+ "items": {
961
+ "type": "object",
962
+ "properties": {
963
+ "filename": {
964
+ "type": "string",
965
+ "description": "Name the recipient sees."
966
+ },
967
+ "content": {
968
+ "type": "string",
969
+ "description": "The file, base64 encoded."
970
+ },
971
+ "content_type": {
972
+ "type": "string",
973
+ "description": "MIME type, like application/pdf."
974
+ },
975
+ "content_id": {
976
+ "type": "string",
977
+ "description": "For an inline image referenced by cid: in the HTML body."
978
+ },
979
+ "inline": {
980
+ "type": "boolean",
981
+ "description": "Render inside the message rather than listing it as a file."
982
+ }
983
+ },
984
+ "required": [
985
+ "filename",
986
+ "content"
987
+ ],
988
+ "additionalProperties": false
989
+ },
990
+ "description": "Files to attach."
991
+ }
992
+ },
993
+ "required": [
994
+ "to"
995
+ ],
996
+ "additionalProperties": false
997
+ },
998
+ "read_only": false,
999
+ "destructive": false,
1000
+ "idempotent": false,
1001
+ "open_world": true
1002
+ },
1003
+ {
1004
+ "name": "update_draft",
1005
+ "title": "Edit a draft",
1006
+ "description": "Edit a draft's recipients, subject, or body.",
1007
+ "input_schema": {
1008
+ "type": "object",
1009
+ "properties": {
1010
+ "draft_id": {
1011
+ "type": "string",
1012
+ "description": "Identifier of the draft, as returned by list_drafts."
1013
+ },
1014
+ "inbox_id": {
1015
+ "type": "string",
1016
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
1017
+ },
1018
+ "to": {
1019
+ "type": "array",
1020
+ "items": {
1021
+ "type": "string"
1022
+ },
1023
+ "description": "Recipient email addresses."
1024
+ },
1025
+ "cc": {
1026
+ "type": "array",
1027
+ "items": {
1028
+ "type": "string"
1029
+ },
1030
+ "description": "Addresses to copy, visible to every recipient."
1031
+ },
1032
+ "bcc": {
1033
+ "type": "array",
1034
+ "items": {
1035
+ "type": "string"
1036
+ },
1037
+ "description": "Addresses to copy without revealing them to other recipients."
1038
+ },
1039
+ "subject": {
1040
+ "type": "string",
1041
+ "description": "Subject line."
1042
+ },
1043
+ "text": {
1044
+ "type": "string",
1045
+ "description": "Plain-text body. Send this, or html, or both."
1046
+ },
1047
+ "html": {
1048
+ "type": "string",
1049
+ "description": "HTML body. Send this, or text, or both."
1050
+ },
1051
+ "send_at": {
1052
+ "type": "string",
1053
+ "description": "When to send it, as an ISO 8601 timestamp in the future. Omit to keep it an ordinary draft; set it to null to call a scheduled send back."
1054
+ },
1055
+ "reply_to": {
1056
+ "type": "array",
1057
+ "items": {
1058
+ "type": "string"
1059
+ },
1060
+ "description": "Where replies should go, if not back to this inbox."
1061
+ },
1062
+ "add_labels": {
1063
+ "type": "array",
1064
+ "items": {
1065
+ "type": "string"
1066
+ },
1067
+ "description": "Labels to add. Ones already present are left alone."
1068
+ },
1069
+ "remove_labels": {
1070
+ "type": "array",
1071
+ "items": {
1072
+ "type": "string"
1073
+ },
1074
+ "description": "Labels to remove. Ones not present are ignored."
1075
+ },
1076
+ "add_attachments": {
1077
+ "type": "array",
1078
+ "items": {
1079
+ "type": "object",
1080
+ "properties": {
1081
+ "filename": {
1082
+ "type": "string",
1083
+ "description": "Name the recipient sees."
1084
+ },
1085
+ "content": {
1086
+ "type": "string",
1087
+ "description": "The file, base64 encoded."
1088
+ },
1089
+ "content_type": {
1090
+ "type": "string",
1091
+ "description": "MIME type, like application/pdf."
1092
+ },
1093
+ "content_id": {
1094
+ "type": "string",
1095
+ "description": "For an inline image referenced by cid: in the HTML body."
1096
+ },
1097
+ "inline": {
1098
+ "type": "boolean",
1099
+ "description": "Render inside the message rather than listing it as a file."
1100
+ }
1101
+ },
1102
+ "required": [
1103
+ "filename",
1104
+ "content"
1105
+ ],
1106
+ "additionalProperties": false
1107
+ },
1108
+ "description": "Files to add to the draft."
1109
+ },
1110
+ "remove_attachments": {
1111
+ "type": "array",
1112
+ "items": {
1113
+ "type": "string"
1114
+ },
1115
+ "description": "Identifiers of attachments to take off the draft."
1116
+ }
1117
+ },
1118
+ "required": [
1119
+ "draft_id"
1120
+ ],
1121
+ "additionalProperties": false
1122
+ },
1123
+ "read_only": false,
1124
+ "destructive": false,
1125
+ "idempotent": true,
1126
+ "open_world": false
1127
+ },
1128
+ {
1129
+ "name": "update_inbox",
1130
+ "title": "Rename an inbox",
1131
+ "description": "Update an inbox's display name or metadata.",
1132
+ "input_schema": {
1133
+ "type": "object",
1134
+ "properties": {
1135
+ "inbox_id": {
1136
+ "type": "string",
1137
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
1138
+ },
1139
+ "display_name": {
1140
+ "type": "string",
1141
+ "description": "Name shown to recipients alongside the address."
1142
+ },
1143
+ "metadata": {
1144
+ "type": "object",
1145
+ "description": "Arbitrary key-value pairs stored with the inbox."
1146
+ }
1147
+ },
1148
+ "required": [],
1149
+ "additionalProperties": false
1150
+ },
1151
+ "read_only": false,
1152
+ "destructive": false,
1153
+ "idempotent": true,
1154
+ "open_world": false
1155
+ },
1156
+ {
1157
+ "name": "update_message",
1158
+ "title": "Label a message",
1159
+ "description": "Add or remove labels on a message.",
1160
+ "input_schema": {
1161
+ "type": "object",
1162
+ "properties": {
1163
+ "message_id": {
1164
+ "type": "string",
1165
+ "description": "Identifier of the message, as returned by list_messages."
1166
+ },
1167
+ "inbox_id": {
1168
+ "type": "string",
1169
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
1170
+ },
1171
+ "add_labels": {
1172
+ "type": "array",
1173
+ "items": {
1174
+ "type": "string"
1175
+ },
1176
+ "description": "Labels to add. Ones already present are left alone."
1177
+ },
1178
+ "remove_labels": {
1179
+ "type": "array",
1180
+ "items": {
1181
+ "type": "string"
1182
+ },
1183
+ "description": "Labels to remove. Ones not present are ignored."
1184
+ }
1185
+ },
1186
+ "required": [
1187
+ "message_id"
1188
+ ],
1189
+ "additionalProperties": false
1190
+ },
1191
+ "read_only": false,
1192
+ "destructive": false,
1193
+ "idempotent": true,
1194
+ "open_world": false
1195
+ },
1196
+ {
1197
+ "name": "update_thread",
1198
+ "title": "Label a conversation",
1199
+ "description": "Add or remove labels on a thread.",
1200
+ "input_schema": {
1201
+ "type": "object",
1202
+ "properties": {
1203
+ "thread_id": {
1204
+ "type": "string",
1205
+ "description": "Identifier of the conversation, as returned by list_threads."
1206
+ },
1207
+ "inbox_id": {
1208
+ "type": "string",
1209
+ "description": "Address of the inbox to act on, like agent@carlyemail.com. Optional: omit it to look across every inbox in the organization, and each result names the inbox it came from."
1210
+ },
1211
+ "add_labels": {
1212
+ "type": "array",
1213
+ "items": {
1214
+ "type": "string"
1215
+ },
1216
+ "description": "Labels to add. Ones already present are left alone."
1217
+ },
1218
+ "remove_labels": {
1219
+ "type": "array",
1220
+ "items": {
1221
+ "type": "string"
1222
+ },
1223
+ "description": "Labels to remove. Ones not present are ignored."
1224
+ }
1225
+ },
1226
+ "required": [
1227
+ "thread_id"
1228
+ ],
1229
+ "additionalProperties": false
1230
+ },
1231
+ "read_only": false,
1232
+ "destructive": false,
1233
+ "idempotent": true,
1234
+ "open_world": false
1235
+ },
1236
+ {
1237
+ "name": "verify_account",
1238
+ "title": "Confirm the owner's email",
1239
+ "description": "Confirm the account with the code emailed to its owner, which allows sending to anyone. Until this runs, a new account can only email its own owner.",
1240
+ "input_schema": {
1241
+ "type": "object",
1242
+ "properties": {
1243
+ "code": {
1244
+ "type": "string",
1245
+ "description": "The six-digit code emailed to the account owner."
1246
+ }
1247
+ },
1248
+ "required": [
1249
+ "code"
1250
+ ],
1251
+ "additionalProperties": false
1252
+ },
1253
+ "read_only": false,
1254
+ "destructive": false,
1255
+ "idempotent": true,
1256
+ "open_world": false
1257
+ }
1258
+ ]
1259
+ };