mcp-google-multi 5.4.1-alpha.2 → 6.0.0-alpha.2

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 (116) hide show
  1. package/README.md +21 -16
  2. package/dist/accounts.d.ts +44 -5
  3. package/dist/accounts.js +267 -25
  4. package/dist/auth.d.ts +11 -4
  5. package/dist/auth.js +85 -78
  6. package/dist/client-config.d.ts +90 -0
  7. package/dist/client-config.js +282 -0
  8. package/dist/client.js +10 -4
  9. package/dist/config-file.d.ts +38 -0
  10. package/dist/config-file.js +117 -0
  11. package/dist/discover.js +57 -3
  12. package/dist/doctor.d.ts +86 -0
  13. package/dist/doctor.js +384 -0
  14. package/dist/env-load.d.ts +11 -0
  15. package/dist/env-load.js +52 -0
  16. package/dist/executor.d.ts +2 -0
  17. package/dist/executor.js +2 -1
  18. package/dist/fanout.js +8 -5
  19. package/dist/fs-atomic.d.ts +3 -0
  20. package/dist/fs-atomic.js +123 -0
  21. package/dist/http-config.d.ts +35 -0
  22. package/dist/http-config.js +113 -0
  23. package/dist/http-transport.d.ts +59 -0
  24. package/dist/http-transport.js +269 -0
  25. package/dist/identity.d.ts +24 -0
  26. package/dist/identity.js +19 -0
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +199 -18
  29. package/dist/master-key.d.ts +53 -0
  30. package/dist/master-key.js +242 -0
  31. package/dist/mcp-token.d.ts +81 -0
  32. package/dist/mcp-token.js +176 -0
  33. package/dist/migrate-config.d.ts +7 -0
  34. package/dist/migrate-config.js +103 -0
  35. package/dist/migrate-tokens.js +4 -3
  36. package/dist/net-tuning.d.ts +8 -0
  37. package/dist/net-tuning.js +25 -0
  38. package/dist/oauth-as.d.ts +52 -0
  39. package/dist/oauth-as.js +457 -0
  40. package/dist/oauth-consent.d.ts +28 -0
  41. package/dist/oauth-consent.js +109 -0
  42. package/dist/open-url.d.ts +1 -0
  43. package/dist/open-url.js +30 -0
  44. package/dist/reauth-hint.d.ts +2 -0
  45. package/dist/reauth-hint.js +15 -0
  46. package/dist/registry-transfer.d.ts +41 -0
  47. package/dist/registry-transfer.js +219 -0
  48. package/dist/registry.d.ts +27 -1
  49. package/dist/registry.js +117 -6
  50. package/dist/scope-catalog.d.ts +19 -0
  51. package/dist/scope-catalog.js +182 -0
  52. package/dist/scope-observability.d.ts +78 -0
  53. package/dist/scope-observability.js +192 -0
  54. package/dist/services.js +1 -1
  55. package/dist/setup-prompt.d.ts +9 -0
  56. package/dist/setup-prompt.js +59 -0
  57. package/dist/ssrf-guard.d.ts +48 -0
  58. package/dist/ssrf-guard.js +242 -0
  59. package/dist/token-store.js +23 -125
  60. package/dist/tools/_errors.d.ts +8 -2
  61. package/dist/tools/_errors.js +97 -6
  62. package/dist/tools/account-wizard.d.ts +33 -0
  63. package/dist/tools/account-wizard.js +284 -0
  64. package/dist/tools/accounts-tool.d.ts +8 -5
  65. package/dist/tools/accounts-tool.js +38 -15
  66. package/dist/tools/admin.js +2 -2
  67. package/dist/tools/calendar.js +2 -2
  68. package/dist/tools/chat.js +2 -2
  69. package/dist/tools/contacts.d.ts +40 -0
  70. package/dist/tools/contacts.js +135 -2
  71. package/dist/tools/docs.d.ts +3 -0
  72. package/dist/tools/docs.js +60 -9
  73. package/dist/tools/drive.d.ts +3 -0
  74. package/dist/tools/drive.js +60 -8
  75. package/dist/tools/forms.js +4 -2
  76. package/dist/tools/generated/_shared.d.ts +1 -3
  77. package/dist/tools/generated/_shared.js +3 -3
  78. package/dist/tools/generated/admin.js +175 -132
  79. package/dist/tools/generated/appsmarket.js +6 -2
  80. package/dist/tools/generated/calendar.js +45 -27
  81. package/dist/tools/generated/chat.js +81 -47
  82. package/dist/tools/generated/classroom.js +131 -104
  83. package/dist/tools/generated/cloudidentity.js +73 -61
  84. package/dist/tools/generated/cloudsearch.js +59 -49
  85. package/dist/tools/generated/contacts.js +22 -14
  86. package/dist/tools/generated/drive.js +51 -35
  87. package/dist/tools/generated/driveactivity.js +5 -1
  88. package/dist/tools/generated/drivelabels.js +30 -25
  89. package/dist/tools/generated/forms.js +7 -3
  90. package/dist/tools/generated/gmail.js +73 -58
  91. package/dist/tools/generated/groupsmigration.js +5 -1
  92. package/dist/tools/generated/groupssettings.js +7 -3
  93. package/dist/tools/generated/keep.js +12 -7
  94. package/dist/tools/generated/licensing.js +11 -7
  95. package/dist/tools/generated/meet.js +20 -13
  96. package/dist/tools/generated/postmaster.js +8 -4
  97. package/dist/tools/generated/reseller.js +22 -17
  98. package/dist/tools/generated/script.js +26 -16
  99. package/dist/tools/generated/sheets.js +11 -7
  100. package/dist/tools/generated/tasks.js +6 -2
  101. package/dist/tools/generated/vault.js +38 -33
  102. package/dist/tools/generated/workspaceevents.js +12 -7
  103. package/dist/tools/gmail-mime.d.ts +38 -8
  104. package/dist/tools/gmail-mime.js +75 -71
  105. package/dist/tools/gmail.d.ts +31 -0
  106. package/dist/tools/gmail.js +483 -99
  107. package/dist/tools/google-api.js +7 -4
  108. package/dist/tools/meet.js +2 -2
  109. package/dist/tools/searchconsole.js +2 -2
  110. package/dist/tools/sheets.js +6 -2
  111. package/dist/tools/slides.js +4 -2
  112. package/dist/tools/tasks.js +2 -2
  113. package/dist/types.d.ts +1 -1
  114. package/dist/write-control.d.ts +24 -1
  115. package/dist/write-control.js +26 -1
  116. package/package.json +26 -7
@@ -3,11 +3,19 @@ import { z } from 'zod';
3
3
  import { coerceArray, coerceBoolean, coerceJson } from '../_coerce.js';
4
4
  import { accountField, registerGeneratedTool } from './_shared.js';
5
5
  export function registerContactsGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_people_v1 = [
8
+ ["https://www.googleapis.com/auth/contacts", "https://www.googleapis.com/auth/contacts.readonly"],
9
+ ["https://www.googleapis.com/auth/contacts"],
10
+ ["https://www.googleapis.com/auth/contacts", "https://www.googleapis.com/auth/contacts.other.readonly"],
11
+ ["https://www.googleapis.com/auth/contacts.other.readonly"],
12
+ ["https://www.googleapis.com/auth/directory.readonly"],
13
+ ];
6
14
  registerGeneratedTool(registry, {
7
15
  name: "contacts_contact_groups_batch_get",
8
16
  cud: "read",
9
17
  description: "Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.",
10
- method: { id: "people.contactGroups.batchGet", httpMethod: "GET", path: "v1/contactGroups:batchGet", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
18
+ method: { id: "people.contactGroups.batchGet", httpMethod: "GET", path: "v1/contactGroups:batchGet", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[0] },
11
19
  params: [{ "field": "groupFields", "api": "groupFields", "location": "query" }, { "field": "maxMembers", "api": "maxMembers", "location": "query" }, { "field": "resourceNames", "api": "resourceNames", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
12
20
  hasBody: false,
13
21
  shape: {
@@ -22,7 +30,7 @@ export function registerContactsGeneratedTools(registry) {
22
30
  name: "contacts_contact_groups_delete",
23
31
  cud: "delete",
24
32
  description: "Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent s",
25
- method: { id: "people.contactGroups.delete", httpMethod: "DELETE", path: "v1/{+resourceName}", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
33
+ method: { id: "people.contactGroups.delete", httpMethod: "DELETE", path: "v1/{+resourceName}", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[1] },
26
34
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "deleteContacts", "api": "deleteContacts", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
27
35
  hasBody: false,
28
36
  shape: {
@@ -36,7 +44,7 @@ export function registerContactsGeneratedTools(registry) {
36
44
  name: "contacts_contact_groups_members_modify",
37
45
  cud: "update",
38
46
  description: "Modify the members of a contact group owned by the authenticated user. The only system contact groups that can have members added are `contactGroups/myContacts`",
39
- method: { id: "people.contactGroups.members.modify", httpMethod: "POST", path: "v1/{+resourceName}/members:modify", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
47
+ method: { id: "people.contactGroups.members.modify", httpMethod: "POST", path: "v1/{+resourceName}/members:modify", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[1] },
40
48
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
41
49
  hasBody: true,
42
50
  shape: {
@@ -50,7 +58,7 @@ export function registerContactsGeneratedTools(registry) {
50
58
  name: "contacts_contact_groups_update",
51
59
  cud: "update",
52
60
  description: "Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting",
53
- method: { id: "people.contactGroups.update", httpMethod: "PUT", path: "v1/{+resourceName}", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
61
+ method: { id: "people.contactGroups.update", httpMethod: "PUT", path: "v1/{+resourceName}", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[1] },
54
62
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
55
63
  hasBody: true,
56
64
  shape: {
@@ -64,7 +72,7 @@ export function registerContactsGeneratedTools(registry) {
64
72
  name: "contacts_other_contacts_copy_other_contact_to_my_contacts_group",
65
73
  cud: "create",
66
74
  description: "Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group Mutate requests for the same user should be sent sequentially to avoid increased lat",
67
- method: { id: "people.otherContacts.copyOtherContactToMyContactsGroup", httpMethod: "POST", path: "v1/{+resourceName}:copyOtherContactToMyContactsGroup", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
75
+ method: { id: "people.otherContacts.copyOtherContactToMyContactsGroup", httpMethod: "POST", path: "v1/{+resourceName}:copyOtherContactToMyContactsGroup", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[2] },
68
76
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
69
77
  hasBody: true,
70
78
  shape: {
@@ -78,7 +86,7 @@ export function registerContactsGeneratedTools(registry) {
78
86
  name: "contacts_other_contacts_list",
79
87
  cud: "read",
80
88
  description: "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens",
81
- method: { id: "people.otherContacts.list", httpMethod: "GET", path: "v1/otherContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
89
+ method: { id: "people.otherContacts.list", httpMethod: "GET", path: "v1/otherContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[3] },
82
90
  params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "readMask", "api": "readMask", "location": "query" }, { "field": "requestSyncToken", "api": "requestSyncToken", "location": "query" }, { "field": "sources", "api": "sources", "location": "query" }, { "field": "syncToken", "api": "syncToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
83
91
  hasBody: false,
84
92
  shape: {
@@ -96,7 +104,7 @@ export function registerContactsGeneratedTools(registry) {
96
104
  name: "contacts_other_contacts_search",
97
105
  cud: "read",
98
106
  description: "Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's `names`, `emailAddresses`",
99
- method: { id: "people.otherContacts.search", httpMethod: "GET", path: "v1/otherContacts:search", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
107
+ method: { id: "people.otherContacts.search", httpMethod: "GET", path: "v1/otherContacts:search", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[3] },
100
108
  params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "query", "api": "query", "location": "query" }, { "field": "readMask", "api": "readMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
101
109
  hasBody: false,
102
110
  shape: {
@@ -111,7 +119,7 @@ export function registerContactsGeneratedTools(registry) {
111
119
  name: "contacts_people_batch_create_contacts",
112
120
  cud: "create",
113
121
  description: "Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased lat",
114
- method: { id: "people.people.batchCreateContacts", httpMethod: "POST", path: "v1/people:batchCreateContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
122
+ method: { id: "people.people.batchCreateContacts", httpMethod: "POST", path: "v1/people:batchCreateContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[1] },
115
123
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
116
124
  hasBody: true,
117
125
  shape: {
@@ -124,7 +132,7 @@ export function registerContactsGeneratedTools(registry) {
124
132
  name: "contacts_people_batch_delete_contacts",
125
133
  cud: "delete",
126
134
  description: "Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency a",
127
- method: { id: "people.people.batchDeleteContacts", httpMethod: "POST", path: "v1/people:batchDeleteContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
135
+ method: { id: "people.people.batchDeleteContacts", httpMethod: "POST", path: "v1/people:batchDeleteContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[1] },
128
136
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
129
137
  hasBody: true,
130
138
  shape: {
@@ -137,7 +145,7 @@ export function registerContactsGeneratedTools(registry) {
137
145
  name: "contacts_people_batch_update_contacts",
138
146
  cud: "create",
139
147
  description: "Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequ",
140
- method: { id: "people.people.batchUpdateContacts", httpMethod: "POST", path: "v1/people:batchUpdateContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
148
+ method: { id: "people.people.batchUpdateContacts", httpMethod: "POST", path: "v1/people:batchUpdateContacts", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[1] },
141
149
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
142
150
  hasBody: true,
143
151
  shape: {
@@ -150,7 +158,7 @@ export function registerContactsGeneratedTools(registry) {
150
158
  name: "contacts_people_delete_contact_photo",
151
159
  cud: "delete",
152
160
  description: "Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.",
153
- method: { id: "people.people.deleteContactPhoto", httpMethod: "DELETE", path: "v1/{+resourceName}:deleteContactPhoto", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
161
+ method: { id: "people.people.deleteContactPhoto", httpMethod: "DELETE", path: "v1/{+resourceName}:deleteContactPhoto", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[1] },
154
162
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "personFields", "api": "personFields", "location": "query" }, { "field": "sources", "api": "sources", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
155
163
  hasBody: false,
156
164
  shape: {
@@ -165,7 +173,7 @@ export function registerContactsGeneratedTools(registry) {
165
173
  name: "contacts_people_list_directory_people",
166
174
  cud: "read",
167
175
  description: "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the `sync_token` is specified, resources deleted since",
168
- method: { id: "people.people.listDirectoryPeople", httpMethod: "GET", path: "v1/people:listDirectoryPeople", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
176
+ method: { id: "people.people.listDirectoryPeople", httpMethod: "GET", path: "v1/people:listDirectoryPeople", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[4] },
169
177
  params: [{ "field": "mergeSources", "api": "mergeSources", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "readMask", "api": "readMask", "location": "query" }, { "field": "requestSyncToken", "api": "requestSyncToken", "location": "query" }, { "field": "sources", "api": "sources", "location": "query" }, { "field": "syncToken", "api": "syncToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
170
178
  hasBody: false,
171
179
  shape: {
@@ -184,7 +192,7 @@ export function registerContactsGeneratedTools(registry) {
184
192
  name: "contacts_people_search_directory_people",
185
193
  cud: "read",
186
194
  description: "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.",
187
- method: { id: "people.people.searchDirectoryPeople", httpMethod: "GET", path: "v1/people:searchDirectoryPeople", baseUrl: "https://people.googleapis.com/", requiredParams: [] },
195
+ method: { id: "people.people.searchDirectoryPeople", httpMethod: "GET", path: "v1/people:searchDirectoryPeople", baseUrl: "https://people.googleapis.com/", requiredParams: [], scopes: S_people_v1[4] },
188
196
  params: [{ "field": "mergeSources", "api": "mergeSources", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "query", "api": "query", "location": "query" }, { "field": "readMask", "api": "readMask", "location": "query" }, { "field": "sources", "api": "sources", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
189
197
  hasBody: false,
190
198
  shape: {
@@ -202,7 +210,7 @@ export function registerContactsGeneratedTools(registry) {
202
210
  name: "contacts_people_update_contact_photo",
203
211
  cud: "update",
204
212
  description: "Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.",
205
- method: { id: "people.people.updateContactPhoto", httpMethod: "PATCH", path: "v1/{+resourceName}:updateContactPhoto", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"] },
213
+ method: { id: "people.people.updateContactPhoto", httpMethod: "PATCH", path: "v1/{+resourceName}:updateContactPhoto", baseUrl: "https://people.googleapis.com/", requiredParams: ["resourceName"], scopes: S_people_v1[1] },
206
214
  params: [{ "field": "resourceName", "api": "resourceName", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
207
215
  hasBody: true,
208
216
  shape: {
@@ -3,11 +3,27 @@ import { z } from 'zod';
3
3
  import { coerceBoolean, coerceJson } from '../_coerce.js';
4
4
  import { accountField, registerGeneratedTool } from './_shared.js';
5
5
  export function registerDriveGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_drive_v3 = [
8
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"],
9
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata"],
10
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"],
11
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/drive.apps.readonly", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"],
12
+ ["https://www.googleapis.com/auth/drive.apps.readonly"],
13
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.meet.readonly", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.photos.readonly", "https://www.googleapis.com/auth/drive.readonly"],
14
+ ["https://www.googleapis.com/auth/drive"],
15
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly"],
16
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/drive.file"],
17
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.meet.readonly", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.readonly"],
18
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.meet.readonly", "https://www.googleapis.com/auth/drive.readonly"],
19
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.meet.readonly", "https://www.googleapis.com/auth/drive.metadata", "https://www.googleapis.com/auth/drive.metadata.readonly", "https://www.googleapis.com/auth/drive.photos.readonly", "https://www.googleapis.com/auth/drive.readonly"],
20
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.readonly"],
21
+ ];
6
22
  registerGeneratedTool(registry, {
7
23
  name: "drive_accessproposals_get",
8
24
  cud: "read",
9
25
  description: "Retrieves an access proposal by ID. For more information, see [Manage pending access proposals](https://developers.google.com/workspace/drive/api/guides/pending",
10
- method: { id: "drive.accessproposals.get", httpMethod: "GET", path: "files/{fileId}/accessproposals/{proposalId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "proposalId"] },
26
+ method: { id: "drive.accessproposals.get", httpMethod: "GET", path: "files/{fileId}/accessproposals/{proposalId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "proposalId"], scopes: S_drive_v3[0] },
11
27
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "proposalId", "api": "proposalId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
12
28
  hasBody: false,
13
29
  shape: {
@@ -21,7 +37,7 @@ export function registerDriveGeneratedTools(registry) {
21
37
  name: "drive_approvals_approve",
22
38
  cud: "create",
23
39
  description: "Approves an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update t",
24
- method: { id: "drive.approvals.approve", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:approve", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
40
+ method: { id: "drive.approvals.approve", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:approve", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[1] },
25
41
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
26
42
  hasBody: true,
27
43
  shape: {
@@ -36,7 +52,7 @@ export function registerDriveGeneratedTools(registry) {
36
52
  name: "drive_approvals_cancel",
37
53
  cud: "create",
38
54
  description: "Cancels an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Updates the approval Stat",
39
- method: { id: "drive.approvals.cancel", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:cancel", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
55
+ method: { id: "drive.approvals.cancel", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:cancel", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[1] },
40
56
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
41
57
  hasBody: true,
42
58
  shape: {
@@ -51,7 +67,7 @@ export function registerDriveGeneratedTools(registry) {
51
67
  name: "drive_approvals_comment",
52
68
  cud: "create",
53
69
  description: "Comments on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This sends a notifica",
54
- method: { id: "drive.approvals.comment", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:comment", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
70
+ method: { id: "drive.approvals.comment", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:comment", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[1] },
55
71
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
56
72
  hasBody: true,
57
73
  shape: {
@@ -66,7 +82,7 @@ export function registerDriveGeneratedTools(registry) {
66
82
  name: "drive_approvals_decline",
67
83
  cud: "create",
68
84
  description: "Declines an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). This is used to update t",
69
- method: { id: "drive.approvals.decline", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:decline", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
85
+ method: { id: "drive.approvals.decline", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:decline", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[1] },
70
86
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
71
87
  hasBody: true,
72
88
  shape: {
@@ -81,7 +97,7 @@ export function registerDriveGeneratedTools(registry) {
81
97
  name: "drive_approvals_get",
82
98
  cud: "read",
83
99
  description: "Gets an approval by ID. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).",
84
- method: { id: "drive.approvals.get", httpMethod: "GET", path: "files/{fileId}/approvals/{approvalId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
100
+ method: { id: "drive.approvals.get", httpMethod: "GET", path: "files/{fileId}/approvals/{approvalId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[2] },
85
101
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
86
102
  hasBody: false,
87
103
  shape: {
@@ -95,7 +111,7 @@ export function registerDriveGeneratedTools(registry) {
95
111
  name: "drive_approvals_list",
96
112
  cud: "read",
97
113
  description: "Lists the approvals on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).",
98
- method: { id: "drive.approvals.list", httpMethod: "GET", path: "files/{fileId}/approvals", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
114
+ method: { id: "drive.approvals.list", httpMethod: "GET", path: "files/{fileId}/approvals", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[2] },
99
115
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
100
116
  hasBody: false,
101
117
  shape: {
@@ -110,7 +126,7 @@ export function registerDriveGeneratedTools(registry) {
110
126
  name: "drive_approvals_reassign",
111
127
  cud: "create",
112
128
  description: "Reassigns the reviewers on an approval. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals). Adds o",
113
- method: { id: "drive.approvals.reassign", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:reassign", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"] },
129
+ method: { id: "drive.approvals.reassign", httpMethod: "POST", path: "files/{fileId}/approvals/{approvalId}:reassign", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "approvalId"], scopes: S_drive_v3[1] },
114
130
  params: [{ "field": "approvalId", "api": "approvalId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
115
131
  hasBody: true,
116
132
  shape: {
@@ -125,7 +141,7 @@ export function registerDriveGeneratedTools(registry) {
125
141
  name: "drive_approvals_start",
126
142
  cud: "create",
127
143
  description: "Starts an approval on a file. For more information, see [Manage approvals](https://developers.google.com/workspace/drive/api/guides/approvals).",
128
- method: { id: "drive.approvals.start", httpMethod: "POST", path: "files/{fileId}/approvals:start", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
144
+ method: { id: "drive.approvals.start", httpMethod: "POST", path: "files/{fileId}/approvals:start", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[1] },
129
145
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
130
146
  hasBody: true,
131
147
  shape: {
@@ -139,7 +155,7 @@ export function registerDriveGeneratedTools(registry) {
139
155
  name: "drive_apps_get",
140
156
  cud: "read",
141
157
  description: "Gets a specific app. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info).",
142
- method: { id: "drive.apps.get", httpMethod: "GET", path: "apps/{appId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["appId"] },
158
+ method: { id: "drive.apps.get", httpMethod: "GET", path: "apps/{appId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["appId"], scopes: S_drive_v3[3] },
143
159
  params: [{ "field": "appId", "api": "appId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
144
160
  hasBody: false,
145
161
  shape: {
@@ -152,7 +168,7 @@ export function registerDriveGeneratedTools(registry) {
152
168
  name: "drive_apps_list",
153
169
  cud: "read",
154
170
  description: "Lists a user's installed apps. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info).",
155
- method: { id: "drive.apps.list", httpMethod: "GET", path: "apps", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
171
+ method: { id: "drive.apps.list", httpMethod: "GET", path: "apps", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[4] },
156
172
  params: [{ "field": "appFilterExtensions", "api": "appFilterExtensions", "location": "query" }, { "field": "appFilterMimeTypes", "api": "appFilterMimeTypes", "location": "query" }, { "field": "languageCode", "api": "languageCode", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
157
173
  hasBody: false,
158
174
  shape: {
@@ -167,7 +183,7 @@ export function registerDriveGeneratedTools(registry) {
167
183
  name: "drive_changes_get_start_page_token",
168
184
  cud: "read",
169
185
  description: "Gets the starting pageToken for listing future changes. For more information, see [Retrieve changes](https://developers.google.com/workspace/drive/api/guides/ma",
170
- method: { id: "drive.changes.getStartPageToken", httpMethod: "GET", path: "changes/startPageToken", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
186
+ method: { id: "drive.changes.getStartPageToken", httpMethod: "GET", path: "changes/startPageToken", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[5] },
171
187
  params: [{ "field": "driveId", "api": "driveId", "location": "query" }, { "field": "supportsAllDrives", "api": "supportsAllDrives", "location": "query" }, { "field": "supportsTeamDrives", "api": "supportsTeamDrives", "location": "query" }, { "field": "teamDriveId", "api": "teamDriveId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
172
188
  hasBody: false,
173
189
  shape: {
@@ -183,7 +199,7 @@ export function registerDriveGeneratedTools(registry) {
183
199
  name: "drive_changes_list",
184
200
  cud: "read",
185
201
  description: "Lists the changes for a user or shared drive. For more information, see [Retrieve changes](https://developers.google.com/workspace/drive/api/guides/manage-chang",
186
- method: { id: "drive.changes.list", httpMethod: "GET", path: "changes", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["pageToken"] },
202
+ method: { id: "drive.changes.list", httpMethod: "GET", path: "changes", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["pageToken"], scopes: S_drive_v3[5] },
187
203
  params: [{ "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "driveId", "api": "driveId", "location": "query" }, { "field": "includeCorpusRemovals", "api": "includeCorpusRemovals", "location": "query" }, { "field": "includeItemsFromAllDrives", "api": "includeItemsFromAllDrives", "location": "query" }, { "field": "includeLabels", "api": "includeLabels", "location": "query" }, { "field": "includePermissionsForView", "api": "includePermissionsForView", "location": "query" }, { "field": "includeRemoved", "api": "includeRemoved", "location": "query" }, { "field": "includeTeamDriveItems", "api": "includeTeamDriveItems", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "restrictToMyDrive", "api": "restrictToMyDrive", "location": "query" }, { "field": "spaces", "api": "spaces", "location": "query" }, { "field": "supportsAllDrives", "api": "supportsAllDrives", "location": "query" }, { "field": "supportsTeamDrives", "api": "supportsTeamDrives", "location": "query" }, { "field": "teamDriveId", "api": "teamDriveId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
188
204
  hasBody: false,
189
205
  shape: {
@@ -209,7 +225,7 @@ export function registerDriveGeneratedTools(registry) {
209
225
  name: "drive_changes_watch",
210
226
  cud: "create",
211
227
  description: "Subscribes to changes for a user. For more information, see [Notifications for resource changes](https://developers.google.com/workspace/drive/api/guides/push).",
212
- method: { id: "drive.changes.watch", httpMethod: "POST", path: "changes/watch", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["pageToken"] },
228
+ method: { id: "drive.changes.watch", httpMethod: "POST", path: "changes/watch", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["pageToken"], scopes: S_drive_v3[5] },
213
229
  params: [{ "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "driveId", "api": "driveId", "location": "query" }, { "field": "includeCorpusRemovals", "api": "includeCorpusRemovals", "location": "query" }, { "field": "includeItemsFromAllDrives", "api": "includeItemsFromAllDrives", "location": "query" }, { "field": "includeLabels", "api": "includeLabels", "location": "query" }, { "field": "includePermissionsForView", "api": "includePermissionsForView", "location": "query" }, { "field": "includeRemoved", "api": "includeRemoved", "location": "query" }, { "field": "includeTeamDriveItems", "api": "includeTeamDriveItems", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "restrictToMyDrive", "api": "restrictToMyDrive", "location": "query" }, { "field": "spaces", "api": "spaces", "location": "query" }, { "field": "supportsAllDrives", "api": "supportsAllDrives", "location": "query" }, { "field": "supportsTeamDrives", "api": "supportsTeamDrives", "location": "query" }, { "field": "teamDriveId", "api": "teamDriveId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
214
230
  hasBody: true,
215
231
  shape: {
@@ -236,7 +252,7 @@ export function registerDriveGeneratedTools(registry) {
236
252
  name: "drive_channels_stop",
237
253
  cud: "create",
238
254
  description: "Stops watching resources through this channel. For more information, see [Notifications for resource changes](https://developers.google.com/workspace/drive/api/",
239
- method: { id: "drive.channels.stop", httpMethod: "POST", path: "channels/stop", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
255
+ method: { id: "drive.channels.stop", httpMethod: "POST", path: "channels/stop", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[5] },
240
256
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
241
257
  hasBody: true,
242
258
  shape: {
@@ -249,7 +265,7 @@ export function registerDriveGeneratedTools(registry) {
249
265
  name: "drive_drives_create",
250
266
  cud: "create",
251
267
  description: "Creates a shared drive. For more information, see [Manage shared drives](https://developers.google.com/workspace/drive/api/guides/manage-shareddrives).",
252
- method: { id: "drive.drives.create", httpMethod: "POST", path: "drives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["requestId"] },
268
+ method: { id: "drive.drives.create", httpMethod: "POST", path: "drives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["requestId"], scopes: S_drive_v3[6] },
253
269
  params: [{ "field": "requestId", "api": "requestId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
254
270
  hasBody: true,
255
271
  shape: {
@@ -263,7 +279,7 @@ export function registerDriveGeneratedTools(registry) {
263
279
  name: "drive_drives_delete",
264
280
  cud: "delete",
265
281
  description: "Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items. For more information, see [Manage",
266
- method: { id: "drive.drives.delete", httpMethod: "DELETE", path: "drives/{driveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"] },
282
+ method: { id: "drive.drives.delete", httpMethod: "DELETE", path: "drives/{driveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"], scopes: S_drive_v3[6] },
267
283
  params: [{ "field": "driveId", "api": "driveId", "location": "path" }, { "field": "allowItemDeletion", "api": "allowItemDeletion", "location": "query" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
268
284
  hasBody: false,
269
285
  shape: {
@@ -278,7 +294,7 @@ export function registerDriveGeneratedTools(registry) {
278
294
  name: "drive_drives_hide",
279
295
  cud: "create",
280
296
  description: "Hides a shared drive from the default view. For more information, see [Manage shared drives](https://developers.google.com/workspace/drive/api/guides/manage-sha",
281
- method: { id: "drive.drives.hide", httpMethod: "POST", path: "drives/{driveId}/hide", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"] },
297
+ method: { id: "drive.drives.hide", httpMethod: "POST", path: "drives/{driveId}/hide", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"], scopes: S_drive_v3[6] },
282
298
  params: [{ "field": "driveId", "api": "driveId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
283
299
  hasBody: false,
284
300
  shape: {
@@ -291,7 +307,7 @@ export function registerDriveGeneratedTools(registry) {
291
307
  name: "drive_drives_unhide",
292
308
  cud: "create",
293
309
  description: "Restores a shared drive to the default view. For more information, see [Manage shared drives](https://developers.google.com/workspace/drive/api/guides/manage-sh",
294
- method: { id: "drive.drives.unhide", httpMethod: "POST", path: "drives/{driveId}/unhide", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"] },
310
+ method: { id: "drive.drives.unhide", httpMethod: "POST", path: "drives/{driveId}/unhide", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"], scopes: S_drive_v3[6] },
295
311
  params: [{ "field": "driveId", "api": "driveId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
296
312
  hasBody: false,
297
313
  shape: {
@@ -304,7 +320,7 @@ export function registerDriveGeneratedTools(registry) {
304
320
  name: "drive_drives_update",
305
321
  cud: "update",
306
322
  description: "Updates the metadata for a shared drive. For more information, see [Manage shared drives](https://developers.google.com/workspace/drive/api/guides/manage-shared",
307
- method: { id: "drive.drives.update", httpMethod: "PATCH", path: "drives/{driveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"] },
323
+ method: { id: "drive.drives.update", httpMethod: "PATCH", path: "drives/{driveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["driveId"], scopes: S_drive_v3[6] },
308
324
  params: [{ "field": "driveId", "api": "driveId", "location": "path" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
309
325
  hasBody: true,
310
326
  shape: {
@@ -319,7 +335,7 @@ export function registerDriveGeneratedTools(registry) {
319
335
  name: "drive_files_download",
320
336
  cud: "read",
321
337
  description: "Downloads the content of a file. For more information, see [Download and export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads",
322
- method: { id: "drive.files.download", httpMethod: "POST", path: "files/{fileId}/download", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
338
+ method: { id: "drive.files.download", httpMethod: "POST", path: "files/{fileId}/download", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[7] },
323
339
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "mimeType", "api": "mimeType", "location": "query" }, { "field": "revisionId", "api": "revisionId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
324
340
  hasBody: false,
325
341
  shape: {
@@ -334,7 +350,7 @@ export function registerDriveGeneratedTools(registry) {
334
350
  name: "drive_files_generate_cse_token",
335
351
  cud: "read",
336
352
  description: "Generates a CSE token which can be used to create or update CSE files.",
337
- method: { id: "drive.files.generateCseToken", httpMethod: "GET", path: "files/generateCseToken", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
353
+ method: { id: "drive.files.generateCseToken", httpMethod: "GET", path: "files/generateCseToken", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[6] },
338
354
  params: [{ "field": "fileId", "api": "fileId", "location": "query" }, { "field": "parent", "api": "parent", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
339
355
  hasBody: false,
340
356
  shape: {
@@ -348,7 +364,7 @@ export function registerDriveGeneratedTools(registry) {
348
364
  name: "drive_files_generate_ids",
349
365
  cud: "read",
350
366
  description: "Generates a set of file IDs which can be provided in create or copy requests. For more information, see [Create and manage files](https://developers.google.com/",
351
- method: { id: "drive.files.generateIds", httpMethod: "GET", path: "files/generateIds", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
367
+ method: { id: "drive.files.generateIds", httpMethod: "GET", path: "files/generateIds", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[8] },
352
368
  params: [{ "field": "count", "api": "count", "location": "query" }, { "field": "space", "api": "space", "location": "query" }, { "field": "type", "api": "type", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
353
369
  hasBody: false,
354
370
  shape: {
@@ -363,7 +379,7 @@ export function registerDriveGeneratedTools(registry) {
363
379
  name: "drive_files_list_labels",
364
380
  cud: "read",
365
381
  description: "Lists the labels on a file. For more information, see [List labels on a file](https://developers.google.com/workspace/drive/api/guides/list-labels).",
366
- method: { id: "drive.files.listLabels", httpMethod: "GET", path: "files/{fileId}/listLabels", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
382
+ method: { id: "drive.files.listLabels", httpMethod: "GET", path: "files/{fileId}/listLabels", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[9] },
367
383
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "maxResults", "api": "maxResults", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
368
384
  hasBody: false,
369
385
  shape: {
@@ -378,7 +394,7 @@ export function registerDriveGeneratedTools(registry) {
378
394
  name: "drive_files_modify_labels",
379
395
  cud: "update",
380
396
  description: "Modifies the set of labels applied to a file. For more information, see [Set a label field on a file](https://developers.google.com/workspace/drive/api/guides/s",
381
- method: { id: "drive.files.modifyLabels", httpMethod: "POST", path: "files/{fileId}/modifyLabels", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
397
+ method: { id: "drive.files.modifyLabels", httpMethod: "POST", path: "files/{fileId}/modifyLabels", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[1] },
382
398
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
383
399
  hasBody: true,
384
400
  shape: {
@@ -392,7 +408,7 @@ export function registerDriveGeneratedTools(registry) {
392
408
  name: "drive_files_watch",
393
409
  cud: "create",
394
410
  description: "Subscribes to changes to a file. For more information, see [Notifications for resource changes](https://developers.google.com/workspace/drive/api/guides/push).",
395
- method: { id: "drive.files.watch", httpMethod: "POST", path: "files/{fileId}/watch", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"] },
411
+ method: { id: "drive.files.watch", httpMethod: "POST", path: "files/{fileId}/watch", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId"], scopes: S_drive_v3[5] },
396
412
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "acknowledgeAbuse", "api": "acknowledgeAbuse", "location": "query" }, { "field": "includeLabels", "api": "includeLabels", "location": "query" }, { "field": "includePermissionsForView", "api": "includePermissionsForView", "location": "query" }, { "field": "supportsAllDrives", "api": "supportsAllDrives", "location": "query" }, { "field": "supportsTeamDrives", "api": "supportsTeamDrives", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
397
413
  hasBody: true,
398
414
  shape: {
@@ -411,7 +427,7 @@ export function registerDriveGeneratedTools(registry) {
411
427
  name: "drive_operations_get",
412
428
  cud: "read",
413
429
  description: "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
414
- method: { id: "drive.operations.get", httpMethod: "GET", path: "operations/{name}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["name"] },
430
+ method: { id: "drive.operations.get", httpMethod: "GET", path: "operations/{name}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["name"], scopes: S_drive_v3[10] },
415
431
  params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
416
432
  hasBody: false,
417
433
  shape: {
@@ -424,7 +440,7 @@ export function registerDriveGeneratedTools(registry) {
424
440
  name: "drive_permissions_get",
425
441
  cud: "read",
426
442
  description: "Gets a permission by ID. For more information, see [Share files, folders, and drives](https://developers.google.com/workspace/drive/api/guides/manage-sharing).",
427
- method: { id: "drive.permissions.get", httpMethod: "GET", path: "files/{fileId}/permissions/{permissionId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "permissionId"] },
443
+ method: { id: "drive.permissions.get", httpMethod: "GET", path: "files/{fileId}/permissions/{permissionId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "permissionId"], scopes: S_drive_v3[11] },
428
444
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "permissionId", "api": "permissionId", "location": "path" }, { "field": "supportsAllDrives", "api": "supportsAllDrives", "location": "query" }, { "field": "supportsTeamDrives", "api": "supportsTeamDrives", "location": "query" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
429
445
  hasBody: false,
430
446
  shape: {
@@ -441,7 +457,7 @@ export function registerDriveGeneratedTools(registry) {
441
457
  name: "drive_replies_get",
442
458
  cud: "read",
443
459
  description: "Gets a reply by ID. For more information, see [Manage comments and replies](https://developers.google.com/workspace/drive/api/guides/manage-comments).",
444
- method: { id: "drive.replies.get", httpMethod: "GET", path: "files/{fileId}/comments/{commentId}/replies/{replyId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "commentId", "replyId"] },
460
+ method: { id: "drive.replies.get", httpMethod: "GET", path: "files/{fileId}/comments/{commentId}/replies/{replyId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "commentId", "replyId"], scopes: S_drive_v3[10] },
445
461
  params: [{ "field": "commentId", "api": "commentId", "location": "path" }, { "field": "fileId", "api": "fileId", "location": "path" }, { "field": "replyId", "api": "replyId", "location": "path" }, { "field": "includeDeleted", "api": "includeDeleted", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
446
462
  hasBody: false,
447
463
  shape: {
@@ -457,7 +473,7 @@ export function registerDriveGeneratedTools(registry) {
457
473
  name: "drive_revisions_get",
458
474
  cud: "read",
459
475
  description: "Gets a revision's metadata or content by ID. For more information, see [Manage file revisions](https://developers.google.com/workspace/drive/api/guides/manage-r",
460
- method: { id: "drive.revisions.get", httpMethod: "GET", path: "files/{fileId}/revisions/{revisionId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "revisionId"] },
476
+ method: { id: "drive.revisions.get", httpMethod: "GET", path: "files/{fileId}/revisions/{revisionId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["fileId", "revisionId"], scopes: S_drive_v3[5] },
461
477
  params: [{ "field": "fileId", "api": "fileId", "location": "path" }, { "field": "revisionId", "api": "revisionId", "location": "path" }, { "field": "acknowledgeAbuse", "api": "acknowledgeAbuse", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
462
478
  hasBody: false,
463
479
  shape: {
@@ -472,7 +488,7 @@ export function registerDriveGeneratedTools(registry) {
472
488
  name: "drive_teamdrives_create",
473
489
  cud: "create",
474
490
  description: "Deprecated: Use `drives.create` instead.",
475
- method: { id: "drive.teamdrives.create", httpMethod: "POST", path: "teamdrives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["requestId"] },
491
+ method: { id: "drive.teamdrives.create", httpMethod: "POST", path: "teamdrives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["requestId"], scopes: S_drive_v3[6] },
476
492
  params: [{ "field": "requestId", "api": "requestId", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
477
493
  hasBody: true,
478
494
  shape: {
@@ -486,7 +502,7 @@ export function registerDriveGeneratedTools(registry) {
486
502
  name: "drive_teamdrives_delete",
487
503
  cud: "delete",
488
504
  description: "Deprecated: Use `drives.delete` instead.",
489
- method: { id: "drive.teamdrives.delete", httpMethod: "DELETE", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"] },
505
+ method: { id: "drive.teamdrives.delete", httpMethod: "DELETE", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"], scopes: S_drive_v3[6] },
490
506
  params: [{ "field": "teamDriveId", "api": "teamDriveId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
491
507
  hasBody: false,
492
508
  shape: {
@@ -499,7 +515,7 @@ export function registerDriveGeneratedTools(registry) {
499
515
  name: "drive_teamdrives_get",
500
516
  cud: "read",
501
517
  description: "Deprecated: Use `drives.get` instead.",
502
- method: { id: "drive.teamdrives.get", httpMethod: "GET", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"] },
518
+ method: { id: "drive.teamdrives.get", httpMethod: "GET", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"], scopes: S_drive_v3[12] },
503
519
  params: [{ "field": "teamDriveId", "api": "teamDriveId", "location": "path" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
504
520
  hasBody: false,
505
521
  shape: {
@@ -513,7 +529,7 @@ export function registerDriveGeneratedTools(registry) {
513
529
  name: "drive_teamdrives_list",
514
530
  cud: "read",
515
531
  description: "Deprecated: Use `drives.list` instead.",
516
- method: { id: "drive.teamdrives.list", httpMethod: "GET", path: "teamdrives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [] },
532
+ method: { id: "drive.teamdrives.list", httpMethod: "GET", path: "teamdrives", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: [], scopes: S_drive_v3[12] },
517
533
  params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "q", "api": "q", "location": "query" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
518
534
  hasBody: false,
519
535
  shape: {
@@ -529,7 +545,7 @@ export function registerDriveGeneratedTools(registry) {
529
545
  name: "drive_teamdrives_update",
530
546
  cud: "update",
531
547
  description: "Deprecated: Use `drives.update` instead.",
532
- method: { id: "drive.teamdrives.update", httpMethod: "PATCH", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"] },
548
+ method: { id: "drive.teamdrives.update", httpMethod: "PATCH", path: "teamdrives/{teamDriveId}", baseUrl: "https://www.googleapis.com/drive/v3/", requiredParams: ["teamDriveId"], scopes: S_drive_v3[6] },
533
549
  params: [{ "field": "teamDriveId", "api": "teamDriveId", "location": "path" }, { "field": "useDomainAdminAccess", "api": "useDomainAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
534
550
  hasBody: true,
535
551
  shape: {
@@ -3,11 +3,15 @@ import { z } from 'zod';
3
3
  import { coerceJson } from '../_coerce.js';
4
4
  import { accountField, registerGeneratedTool } from './_shared.js';
5
5
  export function registerDriveactivityGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_driveactivity_v2 = [
8
+ ["https://www.googleapis.com/auth/drive.activity", "https://www.googleapis.com/auth/drive.activity.readonly"],
9
+ ];
6
10
  registerGeneratedTool(registry, {
7
11
  name: "driveactivity_activity_query",
8
12
  cud: "read",
9
13
  description: "Query past activity in Google Drive.",
10
- method: { id: "driveactivity.activity.query", httpMethod: "POST", path: "v2/activity:query", baseUrl: "https://driveactivity.googleapis.com/", requiredParams: [] },
14
+ method: { id: "driveactivity.activity.query", httpMethod: "POST", path: "v2/activity:query", baseUrl: "https://driveactivity.googleapis.com/", requiredParams: [], scopes: S_driveactivity_v2[0] },
11
15
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
12
16
  hasBody: true,
13
17
  shape: {