@mindstone/mcp-server-google-workspace 0.2.0 → 0.3.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.
Files changed (69) hide show
  1. package/README.md +14 -8
  2. package/dist/modules/chat/index.d.ts +12 -0
  3. package/dist/modules/chat/index.js +18 -0
  4. package/dist/modules/chat/scopes.d.ts +14 -0
  5. package/dist/modules/chat/scopes.js +32 -0
  6. package/dist/modules/chat/types.d.ts +88 -0
  7. package/dist/modules/chat/types.js +14 -0
  8. package/dist/modules/comments/service.js +21 -1
  9. package/dist/modules/contacts/scopes.d.ts +1 -0
  10. package/dist/modules/contacts/scopes.js +2 -2
  11. package/dist/modules/contacts/types.d.ts +34 -0
  12. package/dist/modules/docs/service.js +29 -1
  13. package/dist/modules/drive/activity-service.d.ts +45 -0
  14. package/dist/modules/drive/activity-service.js +114 -0
  15. package/dist/modules/drive/index.d.ts +4 -0
  16. package/dist/modules/drive/index.js +12 -0
  17. package/dist/modules/drive/scopes.d.ts +1 -0
  18. package/dist/modules/drive/scopes.js +3 -0
  19. package/dist/modules/forms/service.js +13 -1
  20. package/dist/modules/gmail/services/base.d.ts +5 -1
  21. package/dist/modules/gmail/services/base.js +8 -0
  22. package/dist/modules/gmail/services/settings.d.ts +14 -1
  23. package/dist/modules/gmail/services/settings.js +94 -0
  24. package/dist/modules/gmail/types.d.ts +36 -0
  25. package/dist/modules/meet/index.d.ts +12 -0
  26. package/dist/modules/meet/index.js +18 -0
  27. package/dist/modules/meet/scopes.d.ts +9 -0
  28. package/dist/modules/meet/scopes.js +25 -0
  29. package/dist/modules/meet/types.d.ts +97 -0
  30. package/dist/modules/meet/types.js +14 -0
  31. package/dist/modules/sheets/service.js +49 -0
  32. package/dist/modules/slides/service.js +25 -1
  33. package/dist/modules/tasks/service.js +25 -1
  34. package/dist/services/base/BaseGoogleService.d.ts +9 -1
  35. package/dist/services/base/BaseGoogleService.js +26 -1
  36. package/dist/services/chat/index.d.ts +34 -0
  37. package/dist/services/chat/index.js +120 -0
  38. package/dist/services/contacts/index.d.ts +19 -1
  39. package/dist/services/contacts/index.js +124 -0
  40. package/dist/services/meet/index.d.ts +35 -0
  41. package/dist/services/meet/index.js +116 -0
  42. package/dist/tools/chat-handlers.d.ts +14 -0
  43. package/dist/tools/chat-handlers.js +126 -0
  44. package/dist/tools/contacts-handlers.d.ts +31 -0
  45. package/dist/tools/contacts-handlers.js +88 -0
  46. package/dist/tools/definitions/chat.d.ts +3 -0
  47. package/dist/tools/definitions/chat.js +137 -0
  48. package/dist/tools/definitions/contacts.js +82 -0
  49. package/dist/tools/definitions/destructive-overrides.json +11 -0
  50. package/dist/tools/definitions/drive.js +48 -0
  51. package/dist/tools/definitions/gmail.js +94 -0
  52. package/dist/tools/definitions/index.d.ts +2 -0
  53. package/dist/tools/definitions/index.js +6 -0
  54. package/dist/tools/definitions/meet.d.ts +3 -0
  55. package/dist/tools/definitions/meet.js +149 -0
  56. package/dist/tools/definitions/open-world-overrides.json +11 -0
  57. package/dist/tools/drive-handlers.d.ts +17 -0
  58. package/dist/tools/drive-handlers.js +49 -1
  59. package/dist/tools/gmail-handlers.d.ts +24 -0
  60. package/dist/tools/gmail-handlers.js +129 -11
  61. package/dist/tools/meet-handlers.d.ts +42 -0
  62. package/dist/tools/meet-handlers.js +144 -0
  63. package/dist/tools/server.js +53 -3
  64. package/dist/utils/apiError.js +5 -2
  65. package/dist/utils/scope-hierarchy.js +10 -0
  66. package/dist/utils/service-initializer.js +9 -0
  67. package/dist/utils/untrusted-content.d.ts +37 -1
  68. package/dist/utils/untrusted-content.js +61 -6
  69. package/package.json +1 -1
@@ -16,6 +16,7 @@
16
16
  "create_task": true,
17
17
  "create_workspace_calendar_event": true,
18
18
  "create_workspace_comment": true,
19
+ "create_workspace_contact": true,
19
20
  "create_workspace_document": true,
20
21
  "create_workspace_draft": true,
21
22
  "create_workspace_label": true,
@@ -44,6 +45,7 @@
44
45
  "get_current_time": false,
45
46
  "get_form": false,
46
47
  "get_form_response": false,
48
+ "get_meet_transcript_entries": false,
47
49
  "get_workspace_calendar_event": false,
48
50
  "get_workspace_contacts": false,
49
51
  "get_workspace_draft": false,
@@ -52,10 +54,14 @@
52
54
  "get_workspace_label": false,
53
55
  "get_workspace_slide": false,
54
56
  "get_workspace_slide_thumbnail": false,
57
+ "list_chat_messages": false,
58
+ "list_chat_spaces": false,
55
59
  "list_drive_files": false,
56
60
  "list_file_revisions": false,
57
61
  "list_form_responses": false,
58
62
  "list_forms": false,
63
+ "list_meet_conference_records": false,
64
+ "list_meet_transcripts": false,
59
65
  "list_shared_drives": false,
60
66
  "list_task_lists": false,
61
67
  "list_tasks": false,
@@ -68,6 +74,7 @@
68
74
  "list_workspace_label_filters": false,
69
75
  "list_workspace_labels": false,
70
76
  "list_workspace_presentation_slides": false,
77
+ "list_workspace_send_as": false,
71
78
  "list_workspace_spreadsheet_sheets": false,
72
79
  "manage_workspace_attachment": true,
73
80
  "manage_workspace_calendar_event": true,
@@ -78,6 +85,7 @@
78
85
  "mark_workspace_email_read": false,
79
86
  "mark_workspace_email_unread": false,
80
87
  "move_drive_file": true,
88
+ "query_drive_activity": false,
81
89
  "read_workspace_document": false,
82
90
  "read_workspace_presentation": false,
83
91
  "read_workspace_spreadsheet": false,
@@ -90,6 +98,7 @@
90
98
  "search_drive_files": false,
91
99
  "search_workspace_contacts": false,
92
100
  "search_workspace_emails": false,
101
+ "send_chat_message": true,
93
102
  "send_workspace_draft": true,
94
103
  "send_workspace_email": true,
95
104
  "trash_drive_file": true,
@@ -98,10 +107,12 @@
98
107
  "untrash_workspace_email": true,
99
108
  "update_drive_permissions": true,
100
109
  "update_task": true,
110
+ "update_workspace_contact": true,
101
111
  "update_workspace_draft": true,
102
112
  "update_workspace_label": true,
103
113
  "update_workspace_label_filter": true,
104
114
  "update_workspace_spreadsheet_values": true,
115
+ "update_workspace_vacation_responder": true,
105
116
  "upload_drive_file": true,
106
117
  "upload_workspace_attachment": true
107
118
  }
@@ -660,6 +660,54 @@ If you want to "restore" a revision, download it and re-upload as a new version.
660
660
  },
661
661
  required: ['file_id', 'revision_id']
662
662
  }
663
+ },
664
+ {
665
+ name: 'query_drive_activity',
666
+ category: 'Drive',
667
+ description: `See what changed on a Drive file, or inside a folder or shared drive — who edited, moved, renamed, created, deleted, or commented, and when (Drive Activity API).
668
+
669
+ Exactly one of item_id or ancestor_id is required:
670
+ - item_id: a single file or folder ID (from list_drive_files / search_drive_files)
671
+ - ancestor_id: a folder or shared-drive ID — reports activity on everything inside it
672
+
673
+ Optional:
674
+ - page_size: max activities to return (default API page, max 100)
675
+ - page_token: from a previous response's nextPageToken, for pagination
676
+ - filter: Drive Activity API filter string (e.g. time range: 'time >= "2026-07-01T00:00:00Z"', or action filtering like 'detail.action_detail_case:EDIT')
677
+
678
+ Example: { "ancestor_id": "0AAbbbbCCCC", "filter": "time >= \"2026-07-25T00:00:00-07:00\"" }`,
679
+ aliases: ['drive_activity', 'list_drive_activity', 'what_changed_in_drive'],
680
+ annotations: { readOnlyHint: true },
681
+ inputSchema: {
682
+ type: 'object',
683
+ properties: {
684
+ email: {
685
+ type: 'string',
686
+ description: 'Email address of the Drive account'
687
+ },
688
+ item_id: {
689
+ type: 'string',
690
+ description: 'ID of a single file or folder to inspect (mutually exclusive with ancestor_id)'
691
+ },
692
+ ancestor_id: {
693
+ type: 'string',
694
+ description: 'ID of a folder or shared drive; reports activity on everything inside it (mutually exclusive with item_id)'
695
+ },
696
+ page_size: {
697
+ type: 'number',
698
+ description: 'Maximum activities to return (capped at 100)'
699
+ },
700
+ page_token: {
701
+ type: 'string',
702
+ description: 'Page token from a previous response (for pagination)'
703
+ },
704
+ filter: {
705
+ type: 'string',
706
+ description: 'Drive Activity API filter string, e.g. time >= "2026-07-01T00:00:00Z" or detail.action_detail_case:EDIT'
707
+ }
708
+ },
709
+ required: []
710
+ }
663
711
  }
664
712
  ];
665
713
  //# sourceMappingURL=drive.js.map
@@ -708,6 +708,100 @@ Attachments are NOT automatically carried over — you must explicitly download
708
708
  required: []
709
709
  }
710
710
  },
711
+ {
712
+ name: 'update_workspace_vacation_responder',
713
+ category: 'Gmail/Settings',
714
+ description: `Turn the Gmail out-of-office (vacation) auto-reply on or off, and set its message.
715
+
716
+ Only the fields you provide are changed; the existing subject/body are kept
717
+ when omitted (the Gmail API otherwise replaces the whole resource).
718
+
719
+ Parameters:
720
+ - email: The Gmail account
721
+ - enabled: Required. true to turn the auto-reply on, false to turn it off
722
+ - response_subject: Subject of the auto-reply (e.g. "Out of office")
723
+ - response_body: Plain-text body of the auto-reply. Required when enabling
724
+ and the account has no existing auto-reply message.
725
+ - start_time: When to start replying — epoch milliseconds (number, e.g.
726
+ 1786032000000) or a parseable date string (e.g. "2026-08-07"). Defaults to
727
+ now when enabling.
728
+ - end_time: When to stop replying (same formats). Omit to keep the currently
729
+ scheduled end (if any).
730
+ - clear_end_time: Set true to remove the scheduled end (open-ended auto-reply).
731
+ Cannot be combined with end_time.
732
+ - contacts_only: Only auto-reply to people in the user's contacts
733
+ - domain_only: Only auto-reply to people in the user's organization
734
+
735
+ Example: { "enabled": true, "response_subject": "Out of office", "response_body": "I'm away until Monday.", "end_time": "2026-08-10" }`,
736
+ aliases: ['set_vacation_responder', 'update_vacation_responder', 'set_out_of_office'],
737
+ annotations: { readOnlyHint: false },
738
+ inputSchema: {
739
+ type: 'object',
740
+ properties: {
741
+ email: {
742
+ type: 'string',
743
+ description: 'Email address of the Gmail account'
744
+ },
745
+ enabled: {
746
+ type: 'boolean',
747
+ description: 'true to turn the out-of-office auto-reply on, false to turn it off'
748
+ },
749
+ response_subject: {
750
+ type: 'string',
751
+ description: 'Subject of the auto-reply message'
752
+ },
753
+ response_body: {
754
+ type: 'string',
755
+ description: 'Plain-text body of the auto-reply message'
756
+ },
757
+ start_time: {
758
+ type: ['number', 'string'],
759
+ description: 'When to start replying: Unix timestamp in milliseconds (number, e.g. 1786032000000) or a parseable date string (e.g. "2026-08-07"). Defaults to now when enabling.'
760
+ },
761
+ end_time: {
762
+ type: ['number', 'string'],
763
+ description: 'When to stop replying: Unix timestamp in milliseconds (number, e.g. 1786464000000) or a parseable date string (e.g. "2026-08-10"). Omit to keep the currently scheduled end (if any).'
764
+ },
765
+ clear_end_time: {
766
+ type: 'boolean',
767
+ description: 'Set true to remove the scheduled end time (open-ended auto-reply). Cannot be combined with end_time.'
768
+ },
769
+ contacts_only: {
770
+ type: 'boolean',
771
+ description: 'Only auto-reply to people in the user\'s contacts'
772
+ },
773
+ domain_only: {
774
+ type: 'boolean',
775
+ description: 'Only auto-reply to people in the user\'s organization'
776
+ }
777
+ },
778
+ required: ['enabled']
779
+ }
780
+ },
781
+ {
782
+ name: 'list_workspace_send_as',
783
+ category: 'Gmail/Settings',
784
+ description: `List the Gmail account's send-as aliases, including each alias's
785
+ signature, display name, reply-to address, and verification status.
786
+
787
+ Useful for checking which identities an account can send from and what
788
+ signature each uses.
789
+
790
+ Parameters:
791
+ - email: The Gmail account`,
792
+ aliases: ['list_send_as', 'get_signatures', 'list_email_aliases'],
793
+ annotations: { readOnlyHint: true },
794
+ inputSchema: {
795
+ type: 'object',
796
+ properties: {
797
+ email: {
798
+ type: 'string',
799
+ description: 'Email address of the Gmail account'
800
+ }
801
+ },
802
+ required: []
803
+ }
804
+ },
711
805
  // --- Individual draft tools (replaced legacy manage_workspace_draft) ---
712
806
  {
713
807
  name: 'list_workspace_drafts',
@@ -27,6 +27,8 @@ export { sheetsTools } from "./sheets.js";
27
27
  export { commentsTools } from "./comments.js";
28
28
  export { tasksTools } from "./tasks.js";
29
29
  export { formsTools } from "./forms.js";
30
+ export { chatTools } from "./chat.js";
31
+ export { meetTools } from "./meet.js";
30
32
  export declare const DESTRUCTIVE_OVERRIDES: Record<string, boolean>;
31
33
  export declare const OPEN_WORLD_OVERRIDES: Record<string, boolean>;
32
34
  export declare const allTools: ToolMetadata[];
@@ -29,6 +29,8 @@ export { sheetsTools } from "./sheets.js";
29
29
  export { commentsTools } from "./comments.js";
30
30
  export { tasksTools } from "./tasks.js";
31
31
  export { formsTools } from "./forms.js";
32
+ export { chatTools } from "./chat.js";
33
+ export { meetTools } from "./meet.js";
32
34
  // Import for combining into allTools
33
35
  import { accountTools } from "./account.js";
34
36
  import { gmailTools } from "./gmail.js";
@@ -42,6 +44,8 @@ import { sheetsTools } from "./sheets.js";
42
44
  import { commentsTools } from "./comments.js";
43
45
  import { tasksTools } from "./tasks.js";
44
46
  import { formsTools } from "./forms.js";
47
+ import { chatTools } from "./chat.js";
48
+ import { meetTools } from "./meet.js";
45
49
  const require = createRequire(import.meta.url);
46
50
  export const DESTRUCTIVE_OVERRIDES = require('./destructive-overrides.json');
47
51
  export const OPEN_WORLD_OVERRIDES = require('./open-world-overrides.json');
@@ -70,6 +74,8 @@ const rawTools = [
70
74
  ...slidesTools,
71
75
  ...sheetsTools,
72
76
  ...commentsTools,
77
+ ...chatTools,
78
+ ...meetTools,
73
79
  ...(TASKS_FORMS_ENABLED ? tasksTools : []),
74
80
  ...(TASKS_FORMS_ENABLED ? formsTools : []),
75
81
  ];
@@ -0,0 +1,3 @@
1
+ import { ToolMetadata } from "../../modules/tools/registry.js";
2
+ export declare const meetTools: ToolMetadata[];
3
+ //# sourceMappingURL=meet.d.ts.map
@@ -0,0 +1,149 @@
1
+ // Define Meet Tools
2
+ export const meetTools = [
3
+ {
4
+ name: "list_meet_conference_records",
5
+ category: "Meet",
6
+ description: `List past Google Meet conferences (conference records) for meeting prep and recap workflows.
7
+
8
+ IMPORTANT: Before using this tool:
9
+ 1. Verify account access with list_workspace_accounts
10
+ 2. Confirm account if multiple exist
11
+ 3. Check required scopes include Meet read access
12
+
13
+ Parameters:
14
+ - email: The Google account email to list conferences for
15
+ - page_size: Optional maximum number of conference records to return (max: 100)
16
+ - page_token: Optional token for pagination (to get the next page)
17
+ - filter: Optional filter passed through to the Meet API (EBNF syntax).
18
+ Filterable fields: space.name, space.meeting_code, start_time, end_time.
19
+ Example: space.meeting_code = "abc-mnop-xyz"
20
+ Example: start_time>="2026-01-01T00:00:00Z" AND start_time<="2026-02-01T00:00:00Z"
21
+
22
+ Example Usage:
23
+ 1. Call list_workspace_accounts to check for valid accounts
24
+ 2. Call list_meet_conference_records to find the relevant conference
25
+ 3. Use the returned conference record name with list_meet_transcripts
26
+
27
+ Note: Conference records are deleted by Google 30 days after the conference ends.`,
28
+ aliases: ["list_conference_records", "list_meet_conferences", "list_past_meetings"],
29
+ annotations: { readOnlyHint: true },
30
+ inputSchema: {
31
+ type: "object",
32
+ properties: {
33
+ email: {
34
+ type: "string",
35
+ description: "Email address of the Google account"
36
+ },
37
+ page_size: {
38
+ type: "number",
39
+ description: "Maximum number of conference records to return (default: 25, max: 100)"
40
+ },
41
+ page_token: {
42
+ type: "string",
43
+ description: "Page token from a previous response (for pagination)"
44
+ },
45
+ filter: {
46
+ type: "string",
47
+ description: 'Optional filter in EBNF syntax (e.g. space.meeting_code = "abc-mnop-xyz")'
48
+ }
49
+ }
50
+ }
51
+ },
52
+ {
53
+ name: "list_meet_transcripts",
54
+ category: "Meet",
55
+ description: `List the transcripts of a Google Meet conference record.
56
+
57
+ Use this after list_meet_conference_records to find the transcript(s) of a meeting.
58
+ Each transcript represents one transcription session of the conference.
59
+
60
+ Parameters:
61
+ - email: The Google account email
62
+ - conference_record: The conference record — either the full resource name
63
+ ("conferenceRecords/abc-123") or just the ID ("abc-123")
64
+ - page_size: Optional maximum number of transcripts to return (max: 100)
65
+ - page_token: Optional token for pagination
66
+
67
+ Example usage:
68
+ - { "conference_record": "abc-123" }
69
+ - { "conference_record": "conferenceRecords/abc-123", "page_size": 10 }`,
70
+ aliases: ["list_transcripts", "get_meet_transcripts"],
71
+ annotations: { readOnlyHint: true },
72
+ inputSchema: {
73
+ type: "object",
74
+ properties: {
75
+ email: {
76
+ type: "string",
77
+ description: "Email address of the Google account"
78
+ },
79
+ conference_record: {
80
+ type: "string",
81
+ description: 'Conference record resource name ("conferenceRecords/abc-123") or bare ID ("abc-123")'
82
+ },
83
+ page_size: {
84
+ type: "number",
85
+ description: "Maximum number of transcripts to return (default: 10, max: 100)"
86
+ },
87
+ page_token: {
88
+ type: "string",
89
+ description: "Page token from a previous response (for pagination)"
90
+ }
91
+ },
92
+ required: ["conference_record"]
93
+ }
94
+ },
95
+ {
96
+ name: "get_meet_transcript_entries",
97
+ category: "Meet",
98
+ description: `List the entries (speaker + text) of one Google Meet transcript, paginated.
99
+
100
+ Use this after list_meet_transcripts to read what was said in a meeting —
101
+ for meeting recaps, action-item extraction, and prep for follow-up meetings.
102
+
103
+ Parameters:
104
+ - email: The Google account email
105
+ - conference_record: The conference record — either the full resource name
106
+ ("conferenceRecords/abc-123") or just the ID ("abc-123")
107
+ - transcript: The transcript — a bare ID ("def-456"), a segment
108
+ ("transcripts/def-456"), or a full resource name
109
+ ("conferenceRecords/abc-123/transcripts/def-456")
110
+ - page_size: Optional maximum number of entries to return (max: 100)
111
+ - page_token: Optional token for pagination
112
+
113
+ Example usage:
114
+ - { "conference_record": "abc-123", "transcript": "def-456" }
115
+ - { "conference_record": "abc-123", "transcript": "def-456", "page_size": 100 }
116
+
117
+ Note: Transcript entries are returned in chronological order. Each entry
118
+ includes the speaking participant's resource name and the transcribed text.`,
119
+ aliases: ["get_transcript_entries", "read_meet_transcript"],
120
+ annotations: { readOnlyHint: true },
121
+ inputSchema: {
122
+ type: "object",
123
+ properties: {
124
+ email: {
125
+ type: "string",
126
+ description: "Email address of the Google account"
127
+ },
128
+ conference_record: {
129
+ type: "string",
130
+ description: 'Conference record resource name ("conferenceRecords/abc-123") or bare ID ("abc-123")'
131
+ },
132
+ transcript: {
133
+ type: "string",
134
+ description: 'Transcript ID ("def-456"), segment ("transcripts/def-456"), or full resource name'
135
+ },
136
+ page_size: {
137
+ type: "number",
138
+ description: "Maximum number of entries to return (default: 10, max: 100)"
139
+ },
140
+ page_token: {
141
+ type: "string",
142
+ description: "Page token from a previous response (for pagination)"
143
+ }
144
+ },
145
+ required: ["conference_record", "transcript"]
146
+ }
147
+ }
148
+ ];
149
+ //# sourceMappingURL=meet.js.map
@@ -16,6 +16,7 @@
16
16
  "create_task": true,
17
17
  "create_workspace_calendar_event": true,
18
18
  "create_workspace_comment": true,
19
+ "create_workspace_contact": true,
19
20
  "create_workspace_document": true,
20
21
  "create_workspace_draft": true,
21
22
  "create_workspace_label": true,
@@ -44,6 +45,7 @@
44
45
  "get_current_time": true,
45
46
  "get_form": true,
46
47
  "get_form_response": true,
48
+ "get_meet_transcript_entries": true,
47
49
  "get_workspace_calendar_event": true,
48
50
  "get_workspace_contacts": true,
49
51
  "get_workspace_draft": true,
@@ -52,10 +54,14 @@
52
54
  "get_workspace_label": true,
53
55
  "get_workspace_slide": true,
54
56
  "get_workspace_slide_thumbnail": true,
57
+ "list_chat_messages": true,
58
+ "list_chat_spaces": true,
55
59
  "list_drive_files": true,
56
60
  "list_file_revisions": true,
57
61
  "list_form_responses": true,
58
62
  "list_forms": true,
63
+ "list_meet_conference_records": true,
64
+ "list_meet_transcripts": true,
59
65
  "list_shared_drives": true,
60
66
  "list_task_lists": true,
61
67
  "list_tasks": true,
@@ -68,6 +74,7 @@
68
74
  "list_workspace_label_filters": true,
69
75
  "list_workspace_labels": true,
70
76
  "list_workspace_presentation_slides": true,
77
+ "list_workspace_send_as": true,
71
78
  "list_workspace_spreadsheet_sheets": true,
72
79
  "manage_workspace_attachment": true,
73
80
  "manage_workspace_calendar_event": true,
@@ -78,6 +85,7 @@
78
85
  "mark_workspace_email_read": true,
79
86
  "mark_workspace_email_unread": true,
80
87
  "move_drive_file": true,
88
+ "query_drive_activity": true,
81
89
  "read_workspace_document": true,
82
90
  "read_workspace_presentation": true,
83
91
  "read_workspace_spreadsheet": true,
@@ -90,6 +98,7 @@
90
98
  "search_drive_files": true,
91
99
  "search_workspace_contacts": true,
92
100
  "search_workspace_emails": true,
101
+ "send_chat_message": true,
93
102
  "send_workspace_draft": true,
94
103
  "send_workspace_email": true,
95
104
  "trash_drive_file": true,
@@ -98,10 +107,12 @@
98
107
  "untrash_workspace_email": true,
99
108
  "update_drive_permissions": true,
100
109
  "update_task": true,
110
+ "update_workspace_contact": true,
101
111
  "update_workspace_draft": true,
102
112
  "update_workspace_label": true,
103
113
  "update_workspace_label_filter": true,
104
114
  "update_workspace_spreadsheet_values": true,
115
+ "update_workspace_vacation_responder": true,
105
116
  "upload_drive_file": true,
106
117
  "upload_workspace_attachment": true
107
118
  }
@@ -101,5 +101,22 @@ interface DriveDownloadRevisionArgs {
101
101
  revisionId?: string;
102
102
  }
103
103
  export declare function handleDownloadFileRevision(args: DriveDownloadRevisionArgs): Promise<string>;
104
+ export interface QueryDriveActivityArgs {
105
+ email?: string;
106
+ item_id?: string;
107
+ itemId?: string;
108
+ ancestor_id?: string;
109
+ ancestorId?: string;
110
+ page_size?: number;
111
+ pageSize?: number;
112
+ page_token?: string;
113
+ pageToken?: string;
114
+ filter?: string;
115
+ }
116
+ /**
117
+ * Query the Drive Activity API: what changed on a file, or inside a folder /
118
+ * shared drive, and who did it.
119
+ */
120
+ export declare function handleQueryDriveActivity(args: QueryDriveActivityArgs): Promise<unknown>;
104
121
  export {};
105
122
  //# sourceMappingURL=drive-handlers.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
2
  import { getAccountManager, resolveEmail } from '../modules/accounts/index.js';
3
- import { getDriveService } from '../modules/drive/index.js';
3
+ import { getDriveService, getDriveActivityService } from '../modules/drive/index.js';
4
+ import { normalizeDriveItemName } from '../modules/drive/activity-service.js';
5
+ import { toMcpError } from '../utils/apiError.js';
4
6
  import { readAliasedBoolean, readAliasedNumber, readAliasedString } from './arg-aliases.js';
5
7
  import { wrapUntrustedContent, wrapUntrustedJsonStrings } from '../utils/untrusted-content.js';
6
8
  const HOST_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -546,4 +548,50 @@ export async function handleDownloadFileRevision(args) {
546
548
  }
547
549
  });
548
550
  }
551
+ const MAX_DRIVE_ACTIVITY_PAGE_SIZE = 100;
552
+ /**
553
+ * Query the Drive Activity API: what changed on a file, or inside a folder /
554
+ * shared drive, and who did it.
555
+ */
556
+ export async function handleQueryDriveActivity(args) {
557
+ const rawArgs = args;
558
+ const itemId = readAliasedString(rawArgs, 'item_id', 'itemId');
559
+ const ancestorId = readAliasedString(rawArgs, 'ancestor_id', 'ancestorId');
560
+ const filter = readAliasedString(rawArgs, 'filter', 'filter');
561
+ const pageToken = readAliasedString(rawArgs, 'page_token', 'pageToken');
562
+ const rawPageSize = readAliasedNumber(rawArgs, 'page_size', 'pageSize');
563
+ if (!itemId && !ancestorId) {
564
+ throw new McpError(ErrorCode.InvalidParams, 'Provide item_id (a file/folder ID, from list_drive_files or search_drive_files) ' +
565
+ 'or ancestor_id (a folder or shared-drive ID, to see everything that changed inside it).');
566
+ }
567
+ if (itemId && ancestorId) {
568
+ throw new McpError(ErrorCode.InvalidParams, 'Provide only one of item_id or ancestor_id — the Drive Activity API rejects queries with both.');
569
+ }
570
+ if (rawPageSize !== undefined && (rawPageSize < 1 || !Number.isInteger(rawPageSize))) {
571
+ throw new McpError(ErrorCode.InvalidParams, 'page_size must be a positive integer');
572
+ }
573
+ const pageSize = rawPageSize === undefined
574
+ ? undefined
575
+ : Math.min(rawPageSize, MAX_DRIVE_ACTIVITY_PAGE_SIZE);
576
+ const accountManager = getAccountManager();
577
+ const email = await resolveEmail(args);
578
+ return await accountManager.withTokenRenewal(email, async () => {
579
+ try {
580
+ const activityService = await getDriveActivityService();
581
+ const result = await activityService.queryActivity(email, {
582
+ itemName: itemId ? normalizeDriveItemName(itemId) : undefined,
583
+ ancestorName: ancestorId ? normalizeDriveItemName(ancestorId) : undefined,
584
+ pageSize,
585
+ pageToken,
586
+ filter
587
+ });
588
+ // Titles are enveloped field-level in the service (see summarizeTarget);
589
+ // the rest of the summary is connector-derived and returned raw.
590
+ return result;
591
+ }
592
+ catch (error) {
593
+ throw toMcpError(error, 'Failed to query Drive activity');
594
+ }
595
+ });
596
+ }
549
597
  //# sourceMappingURL=drive-handlers.js.map
@@ -218,6 +218,30 @@ export declare function handleSendWorkspaceEmail(params: SendEmailRequestParams
218
218
  export declare function handleGetWorkspaceGmailSettings(params: {
219
219
  email?: string;
220
220
  }): Promise<import("../modules/gmail/types.js").GetGmailSettingsResponse>;
221
+ export interface UpdateVacationResponderToolParams {
222
+ email?: string;
223
+ enabled?: boolean;
224
+ response_subject?: string;
225
+ responseSubject?: string;
226
+ response_body?: string;
227
+ responseBody?: string;
228
+ start_time?: number | string;
229
+ startTime?: number | string;
230
+ end_time?: number | string;
231
+ endTime?: number | string;
232
+ clear_end_time?: boolean;
233
+ clearEndTime?: boolean;
234
+ contacts_only?: boolean;
235
+ contactsOnly?: boolean;
236
+ domain_only?: boolean;
237
+ domainOnly?: boolean;
238
+ }
239
+ export declare function handleUpdateWorkspaceVacationResponder(params: UpdateVacationResponderToolParams): Promise<import("../modules/gmail/types.js").VacationResponderState>;
240
+ export declare function handleListWorkspaceSendAs(params: {
241
+ email?: string;
242
+ }): Promise<{
243
+ sendAs: import("../modules/gmail/types.js").SendAsAlias[];
244
+ }>;
221
245
  export declare function handleManageWorkspaceDraft(params: ManageDraftParams): Promise<void | import("../modules/gmail/types.js").DraftResponse | import("../modules/gmail/types.js").GetDraftsResponse | import("../modules/gmail/types.js").SendEmailResponse>;
222
246
  export declare function handleManageWorkspaceLabel(params: ManageLabelParams): Promise<void | import("../modules/gmail/types.js").Label | import("../modules/gmail/types.js").GetLabelsResponse>;
223
247
  export declare function handleManageWorkspaceLabelAssignment(params: ManageLabelAssignmentParams): Promise<{