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,21 @@ import { z } from 'zod';
3
3
  import { coerceArray, coerceJson } from '../_coerce.js';
4
4
  import { accountField, registerGeneratedTool } from './_shared.js';
5
5
  export function registerScriptGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_script_v1 = [
8
+ ["https://www.googleapis.com/auth/script.processes"],
9
+ ["https://www.googleapis.com/auth/script.projects"],
10
+ ["https://www.googleapis.com/auth/script.deployments"],
11
+ ["https://www.googleapis.com/auth/script.deployments", "https://www.googleapis.com/auth/script.deployments.readonly"],
12
+ ["https://www.googleapis.com/auth/script.projects", "https://www.googleapis.com/auth/script.projects.readonly"],
13
+ ["https://www.googleapis.com/auth/script.metrics"],
14
+ ["https://mail.google.com/", "https://www.google.com/calendar/feeds", "https://www.google.com/m8/feeds", "https://www.googleapis.com/auth/admin.directory.group", "https://www.googleapis.com/auth/admin.directory.user", "https://www.googleapis.com/auth/documents", "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/forms", "https://www.googleapis.com/auth/forms.currentonly", "https://www.googleapis.com/auth/groups", "https://www.googleapis.com/auth/spreadsheets", "https://www.googleapis.com/auth/userinfo.email"],
15
+ ];
6
16
  registerGeneratedTool(registry, {
7
17
  name: "script_processes_list",
8
18
  cud: "read",
9
19
  description: "List information about processes made by or on behalf of a user, such as process type and current status.",
10
- method: { id: "script.processes.list", httpMethod: "GET", path: "v1/processes", baseUrl: "https://script.googleapis.com/", requiredParams: [] },
20
+ method: { id: "script.processes.list", httpMethod: "GET", path: "v1/processes", baseUrl: "https://script.googleapis.com/", requiredParams: [], scopes: S_script_v1[0] },
11
21
  params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "userProcessFilter.deploymentId", "api": "userProcessFilter.deploymentId", "location": "query" }, { "field": "userProcessFilter.endTime", "api": "userProcessFilter.endTime", "location": "query" }, { "field": "userProcessFilter.functionName", "api": "userProcessFilter.functionName", "location": "query" }, { "field": "userProcessFilter.projectName", "api": "userProcessFilter.projectName", "location": "query" }, { "field": "userProcessFilter.scriptId", "api": "userProcessFilter.scriptId", "location": "query" }, { "field": "userProcessFilter.startTime", "api": "userProcessFilter.startTime", "location": "query" }, { "field": "userProcessFilter.statuses", "api": "userProcessFilter.statuses", "location": "query" }, { "field": "userProcessFilter.types", "api": "userProcessFilter.types", "location": "query" }, { "field": "userProcessFilter.userAccessLevels", "api": "userProcessFilter.userAccessLevels", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
12
22
  hasBody: false,
13
23
  shape: {
@@ -30,7 +40,7 @@ export function registerScriptGeneratedTools(registry) {
30
40
  name: "script_processes_list_script_processes",
31
41
  cud: "read",
32
42
  description: "List information about a script's executed processes, such as process type and current status.",
33
- method: { id: "script.processes.listScriptProcesses", httpMethod: "GET", path: "v1/processes:listScriptProcesses", baseUrl: "https://script.googleapis.com/", requiredParams: [] },
43
+ method: { id: "script.processes.listScriptProcesses", httpMethod: "GET", path: "v1/processes:listScriptProcesses", baseUrl: "https://script.googleapis.com/", requiredParams: [], scopes: S_script_v1[0] },
34
44
  params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "scriptId", "api": "scriptId", "location": "query" }, { "field": "scriptProcessFilter.deploymentId", "api": "scriptProcessFilter.deploymentId", "location": "query" }, { "field": "scriptProcessFilter.endTime", "api": "scriptProcessFilter.endTime", "location": "query" }, { "field": "scriptProcessFilter.functionName", "api": "scriptProcessFilter.functionName", "location": "query" }, { "field": "scriptProcessFilter.startTime", "api": "scriptProcessFilter.startTime", "location": "query" }, { "field": "scriptProcessFilter.statuses", "api": "scriptProcessFilter.statuses", "location": "query" }, { "field": "scriptProcessFilter.types", "api": "scriptProcessFilter.types", "location": "query" }, { "field": "scriptProcessFilter.userAccessLevels", "api": "scriptProcessFilter.userAccessLevels", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
35
45
  hasBody: false,
36
46
  shape: {
@@ -52,7 +62,7 @@ export function registerScriptGeneratedTools(registry) {
52
62
  name: "script_projects_create",
53
63
  cud: "create",
54
64
  description: "Creates a new, empty script project with no script files and a base manifest file.",
55
- method: { id: "script.projects.create", httpMethod: "POST", path: "v1/projects", baseUrl: "https://script.googleapis.com/", requiredParams: [] },
65
+ method: { id: "script.projects.create", httpMethod: "POST", path: "v1/projects", baseUrl: "https://script.googleapis.com/", requiredParams: [], scopes: S_script_v1[1] },
56
66
  params: [{ "field": "fields", "api": "fields", "location": "query" }],
57
67
  hasBody: true,
58
68
  shape: {
@@ -65,7 +75,7 @@ export function registerScriptGeneratedTools(registry) {
65
75
  name: "script_projects_deployments_create",
66
76
  cud: "create",
67
77
  description: "Creates a deployment of an Apps Script project.",
68
- method: { id: "script.projects.deployments.create", httpMethod: "POST", path: "v1/projects/{scriptId}/deployments", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
78
+ method: { id: "script.projects.deployments.create", httpMethod: "POST", path: "v1/projects/{scriptId}/deployments", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[2] },
69
79
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
70
80
  hasBody: true,
71
81
  shape: {
@@ -79,7 +89,7 @@ export function registerScriptGeneratedTools(registry) {
79
89
  name: "script_projects_deployments_delete",
80
90
  cud: "delete",
81
91
  description: "Deletes a deployment of an Apps Script project.",
82
- method: { id: "script.projects.deployments.delete", httpMethod: "DELETE", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"] },
92
+ method: { id: "script.projects.deployments.delete", httpMethod: "DELETE", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"], scopes: S_script_v1[2] },
83
93
  params: [{ "field": "deploymentId", "api": "deploymentId", "location": "path" }, { "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
84
94
  hasBody: false,
85
95
  shape: {
@@ -93,7 +103,7 @@ export function registerScriptGeneratedTools(registry) {
93
103
  name: "script_projects_deployments_get",
94
104
  cud: "read",
95
105
  description: "Gets a deployment of an Apps Script project.",
96
- method: { id: "script.projects.deployments.get", httpMethod: "GET", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"] },
106
+ method: { id: "script.projects.deployments.get", httpMethod: "GET", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"], scopes: S_script_v1[3] },
97
107
  params: [{ "field": "deploymentId", "api": "deploymentId", "location": "path" }, { "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
98
108
  hasBody: false,
99
109
  shape: {
@@ -107,7 +117,7 @@ export function registerScriptGeneratedTools(registry) {
107
117
  name: "script_projects_deployments_list",
108
118
  cud: "read",
109
119
  description: "Lists the deployments of an Apps Script project.",
110
- method: { id: "script.projects.deployments.list", httpMethod: "GET", path: "v1/projects/{scriptId}/deployments", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
120
+ method: { id: "script.projects.deployments.list", httpMethod: "GET", path: "v1/projects/{scriptId}/deployments", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[3] },
111
121
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
112
122
  hasBody: false,
113
123
  shape: {
@@ -122,7 +132,7 @@ export function registerScriptGeneratedTools(registry) {
122
132
  name: "script_projects_deployments_update",
123
133
  cud: "update",
124
134
  description: "Updates a deployment of an Apps Script project.",
125
- method: { id: "script.projects.deployments.update", httpMethod: "PUT", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"] },
135
+ method: { id: "script.projects.deployments.update", httpMethod: "PUT", path: "v1/projects/{scriptId}/deployments/{deploymentId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "deploymentId"], scopes: S_script_v1[2] },
126
136
  params: [{ "field": "deploymentId", "api": "deploymentId", "location": "path" }, { "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
127
137
  hasBody: true,
128
138
  shape: {
@@ -137,7 +147,7 @@ export function registerScriptGeneratedTools(registry) {
137
147
  name: "script_projects_get",
138
148
  cud: "read",
139
149
  description: "Gets a script project's metadata.",
140
- method: { id: "script.projects.get", httpMethod: "GET", path: "v1/projects/{scriptId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
150
+ method: { id: "script.projects.get", httpMethod: "GET", path: "v1/projects/{scriptId}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[4] },
141
151
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
142
152
  hasBody: false,
143
153
  shape: {
@@ -150,7 +160,7 @@ export function registerScriptGeneratedTools(registry) {
150
160
  name: "script_projects_get_content",
151
161
  cud: "read",
152
162
  description: "Gets the content of the script project, including the code source and metadata for each script file.",
153
- method: { id: "script.projects.getContent", httpMethod: "GET", path: "v1/projects/{scriptId}/content", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
163
+ method: { id: "script.projects.getContent", httpMethod: "GET", path: "v1/projects/{scriptId}/content", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[4] },
154
164
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "versionNumber", "api": "versionNumber", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
155
165
  hasBody: false,
156
166
  shape: {
@@ -164,7 +174,7 @@ export function registerScriptGeneratedTools(registry) {
164
174
  name: "script_projects_get_metrics",
165
175
  cud: "read",
166
176
  description: "Get metrics data for scripts, such as number of executions and active users.",
167
- method: { id: "script.projects.getMetrics", httpMethod: "GET", path: "v1/projects/{scriptId}/metrics", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
177
+ method: { id: "script.projects.getMetrics", httpMethod: "GET", path: "v1/projects/{scriptId}/metrics", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[5] },
168
178
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "metricsFilter.deploymentId", "api": "metricsFilter.deploymentId", "location": "query" }, { "field": "metricsGranularity", "api": "metricsGranularity", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
169
179
  hasBody: false,
170
180
  shape: {
@@ -179,7 +189,7 @@ export function registerScriptGeneratedTools(registry) {
179
189
  name: "script_projects_update_content",
180
190
  cud: "update",
181
191
  description: "Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the sc",
182
- method: { id: "script.projects.updateContent", httpMethod: "PUT", path: "v1/projects/{scriptId}/content", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
192
+ method: { id: "script.projects.updateContent", httpMethod: "PUT", path: "v1/projects/{scriptId}/content", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[1] },
183
193
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
184
194
  hasBody: true,
185
195
  shape: {
@@ -193,7 +203,7 @@ export function registerScriptGeneratedTools(registry) {
193
203
  name: "script_projects_versions_create",
194
204
  cud: "create",
195
205
  description: "Creates a new immutable version using the current code, with a unique version number.",
196
- method: { id: "script.projects.versions.create", httpMethod: "POST", path: "v1/projects/{scriptId}/versions", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
206
+ method: { id: "script.projects.versions.create", httpMethod: "POST", path: "v1/projects/{scriptId}/versions", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[1] },
197
207
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
198
208
  hasBody: true,
199
209
  shape: {
@@ -207,7 +217,7 @@ export function registerScriptGeneratedTools(registry) {
207
217
  name: "script_projects_versions_get",
208
218
  cud: "read",
209
219
  description: "Gets a version of a script project.",
210
- method: { id: "script.projects.versions.get", httpMethod: "GET", path: "v1/projects/{scriptId}/versions/{versionNumber}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "versionNumber"] },
220
+ method: { id: "script.projects.versions.get", httpMethod: "GET", path: "v1/projects/{scriptId}/versions/{versionNumber}", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId", "versionNumber"], scopes: S_script_v1[4] },
211
221
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "versionNumber", "api": "versionNumber", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
212
222
  hasBody: false,
213
223
  shape: {
@@ -221,7 +231,7 @@ export function registerScriptGeneratedTools(registry) {
221
231
  name: "script_projects_versions_list",
222
232
  cud: "read",
223
233
  description: "List the versions of a script project.",
224
- method: { id: "script.projects.versions.list", httpMethod: "GET", path: "v1/projects/{scriptId}/versions", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
234
+ method: { id: "script.projects.versions.list", httpMethod: "GET", path: "v1/projects/{scriptId}/versions", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[4] },
225
235
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
226
236
  hasBody: false,
227
237
  shape: {
@@ -236,7 +246,7 @@ export function registerScriptGeneratedTools(registry) {
236
246
  name: "script_scripts_run",
237
247
  cud: "create",
238
248
  description: "POST script.scripts.run",
239
- method: { id: "script.scripts.run", httpMethod: "POST", path: "v1/scripts/{scriptId}:run", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"] },
249
+ method: { id: "script.scripts.run", httpMethod: "POST", path: "v1/scripts/{scriptId}:run", baseUrl: "https://script.googleapis.com/", requiredParams: ["scriptId"], scopes: S_script_v1[6] },
240
250
  params: [{ "field": "scriptId", "api": "scriptId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
241
251
  hasBody: true,
242
252
  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 registerSheetsGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_sheets_v4 = [
8
+ ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets"],
9
+ ];
6
10
  registerGeneratedTool(registry, {
7
11
  name: "sheets_spreadsheets_developer_metadata_get",
8
12
  cud: "read",
9
13
  description: "Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId. For more inform",
10
- method: { id: "sheets.spreadsheets.developerMetadata.get", httpMethod: "GET", path: "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId", "metadataId"] },
14
+ method: { id: "sheets.spreadsheets.developerMetadata.get", httpMethod: "GET", path: "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId", "metadataId"], scopes: S_sheets_v4[0] },
11
15
  params: [{ "field": "metadataId", "api": "metadataId", "location": "path" }, { "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
12
16
  hasBody: false,
13
17
  shape: {
@@ -21,7 +25,7 @@ export function registerSheetsGeneratedTools(registry) {
21
25
  name: "sheets_spreadsheets_developer_metadata_search",
22
26
  cud: "read",
23
27
  description: "Returns all developer metadata matching the specified DataFilter. For more information, see [Read, write, and search metadata](https://developers.google.com/wor",
24
- method: { id: "sheets.spreadsheets.developerMetadata.search", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"] },
28
+ method: { id: "sheets.spreadsheets.developerMetadata.search", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"], scopes: S_sheets_v4[0] },
25
29
  params: [{ "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
26
30
  hasBody: true,
27
31
  shape: {
@@ -35,7 +39,7 @@ export function registerSheetsGeneratedTools(registry) {
35
39
  name: "sheets_spreadsheets_get_by_data_filter",
36
40
  cud: "read",
37
41
  description: "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. For more information, see [Read, write, and search metadata](https://develo",
38
- method: { id: "sheets.spreadsheets.getByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}:getByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"] },
42
+ method: { id: "sheets.spreadsheets.getByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}:getByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"], scopes: S_sheets_v4[0] },
39
43
  params: [{ "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
40
44
  hasBody: true,
41
45
  shape: {
@@ -49,7 +53,7 @@ export function registerSheetsGeneratedTools(registry) {
49
53
  name: "sheets_spreadsheets_sheets_copy_to",
50
54
  cud: "create",
51
55
  description: "Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.",
52
- method: { id: "sheets.spreadsheets.sheets.copyTo", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId", "sheetId"] },
56
+ method: { id: "sheets.spreadsheets.sheets.copyTo", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId", "sheetId"], scopes: S_sheets_v4[0] },
53
57
  params: [{ "field": "sheetId", "api": "sheetId", "location": "path" }, { "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
54
58
  hasBody: true,
55
59
  shape: {
@@ -64,7 +68,7 @@ export function registerSheetsGeneratedTools(registry) {
64
68
  name: "sheets_spreadsheets_values_batch_clear_by_data_filter",
65
69
  cud: "delete",
66
70
  description: "Clears one or more ranges of values from a spreadsheet. For more information, see [Read, write, and search metadata](https://developers.google.com/workspace/she",
67
- method: { id: "sheets.spreadsheets.values.batchClearByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"] },
71
+ method: { id: "sheets.spreadsheets.values.batchClearByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"], scopes: S_sheets_v4[0] },
68
72
  params: [{ "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
69
73
  hasBody: true,
70
74
  shape: {
@@ -78,7 +82,7 @@ export function registerSheetsGeneratedTools(registry) {
78
82
  name: "sheets_spreadsheets_values_batch_get_by_data_filter",
79
83
  cud: "read",
80
84
  description: "Returns one or more ranges of values that match the specified data filters. For more information, see [Read, write, and search metadata](https://developers.goog",
81
- method: { id: "sheets.spreadsheets.values.batchGetByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"] },
85
+ method: { id: "sheets.spreadsheets.values.batchGetByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"], scopes: S_sheets_v4[0] },
82
86
  params: [{ "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
83
87
  hasBody: true,
84
88
  shape: {
@@ -92,7 +96,7 @@ export function registerSheetsGeneratedTools(registry) {
92
96
  name: "sheets_spreadsheets_values_batch_update_by_data_filter",
93
97
  cud: "create",
94
98
  description: "Sets values in one or more ranges of a spreadsheet. For more information, see [Read, write, and search metadata](https://developers.google.com/workspace/sheets/",
95
- method: { id: "sheets.spreadsheets.values.batchUpdateByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"] },
99
+ method: { id: "sheets.spreadsheets.values.batchUpdateByDataFilter", httpMethod: "POST", path: "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", baseUrl: "https://sheets.googleapis.com/", requiredParams: ["spreadsheetId"], scopes: S_sheets_v4[0] },
96
100
  params: [{ "field": "spreadsheetId", "api": "spreadsheetId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
97
101
  hasBody: true,
98
102
  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 registerTasksGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_tasks_v1 = [
8
+ ["https://www.googleapis.com/auth/tasks"],
9
+ ];
6
10
  registerGeneratedTool(registry, {
7
11
  name: "tasks_tasklists_update",
8
12
  cud: "update",
9
13
  description: "Updates the authenticated user's specified task list.",
10
- method: { id: "tasks.tasklists.update", httpMethod: "PUT", path: "tasks/v1/users/@me/lists/{tasklist}", baseUrl: "https://tasks.googleapis.com/", requiredParams: ["tasklist"] },
14
+ method: { id: "tasks.tasklists.update", httpMethod: "PUT", path: "tasks/v1/users/@me/lists/{tasklist}", baseUrl: "https://tasks.googleapis.com/", requiredParams: ["tasklist"], scopes: S_tasks_v1[0] },
11
15
  params: [{ "field": "tasklist", "api": "tasklist", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
12
16
  hasBody: true,
13
17
  shape: {
@@ -21,7 +25,7 @@ export function registerTasksGeneratedTools(registry) {
21
25
  name: "tasks_tasks_update",
22
26
  cud: "update",
23
27
  description: "Updates the specified task.",
24
- method: { id: "tasks.tasks.update", httpMethod: "PUT", path: "tasks/v1/lists/{tasklist}/tasks/{task}", baseUrl: "https://tasks.googleapis.com/", requiredParams: ["tasklist", "task"] },
28
+ method: { id: "tasks.tasks.update", httpMethod: "PUT", path: "tasks/v1/lists/{tasklist}/tasks/{task}", baseUrl: "https://tasks.googleapis.com/", requiredParams: ["tasklist", "task"], scopes: S_tasks_v1[0] },
25
29
  params: [{ "field": "task", "api": "task", "location": "path" }, { "field": "tasklist", "api": "tasklist", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
26
30
  hasBody: true,
27
31
  shape: {