mcp-google-multi 5.2.2-beta.1 → 5.3.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/accounts.js CHANGED
@@ -3,8 +3,11 @@ import { fileURLToPath } from 'node:url';
3
3
  import path from 'node:path';
4
4
  import { homedir } from 'node:os';
5
5
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
- dotenv.config();
7
- dotenv.config({ path: path.resolve(__dirname, '..', '.env') });
6
+ // quiet: dotenv v17 prints a banner to stdout by default, which corrupts the
7
+ // stdio JSON-RPC channel (DOTENV_CONFIG_QUIET can't help — it would be read
8
+ // from .env after config() already ran).
9
+ dotenv.config({ quiet: true });
10
+ dotenv.config({ path: path.resolve(__dirname, '..', '.env'), quiet: true });
8
11
  const defaultTokenDir = path.join(process.env.XDG_CONFIG_HOME || path.join(homedir(), '.config'), 'mcp-google-multi', 'tokens');
9
12
  const tokenDir = process.env.TOKEN_STORE_PATH
10
13
  ? path.resolve(process.env.TOKEN_STORE_PATH)
package/dist/auth.js CHANGED
@@ -39,6 +39,16 @@ export const OPTIONAL_SCOPE_BUNDLES = {
39
39
  'https://www.googleapis.com/auth/chat.messages',
40
40
  'https://www.googleapis.com/auth/chat.messages.create',
41
41
  ],
42
+ // Unlike the service bundles these extend the always-on gmail service:
43
+ // users.settings.* writes only accept the settings scopes (reads already
44
+ // work via gmail.modify). sharing is separate — it governs delegation,
45
+ // auto-forwarding and send-as, a different risk profile from e.g. filters.
46
+ gmail_settings: [
47
+ 'https://www.googleapis.com/auth/gmail.settings.basic',
48
+ ],
49
+ gmail_settings_sharing: [
50
+ 'https://www.googleapis.com/auth/gmail.settings.sharing',
51
+ ],
42
52
  classroom: [
43
53
  'https://www.googleapis.com/auth/classroom.courses',
44
54
  'https://www.googleapis.com/auth/classroom.coursework.me',
@@ -371,7 +371,7 @@ export function registerAdminGeneratedTools(registry) {
371
371
  name: "admin_asps_delete",
372
372
  cud: "delete",
373
373
  description: "Deletes an ASP issued by a user.",
374
- method: { id: "directory.asps.delete", httpMethod: "DELETE", path: "admin/directory/v1/users/{userKey}/asps/{codeId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["userKey", "codeId"] },
374
+ method: { id: "directory.asps.delete", httpMethod: "DELETE", path: "admin/directory/v1/users/{userKey}/asps/{codeId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["codeId", "userKey"] },
375
375
  params: [{ "field": "codeId", "api": "codeId", "location": "path" }, { "field": "userKey", "api": "userKey", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
376
376
  hasBody: false,
377
377
  shape: {
@@ -412,7 +412,7 @@ export function registerAdminGeneratedTools(registry) {
412
412
  name: "admin_chromeosdevices_action",
413
413
  cud: "create",
414
414
  description: "Use [BatchChangeChromeOsDeviceStatus](https://developers.google.com/workspace/admin/directory/reference/rest/v1/customer.devices.chromeos/batchChangeStatus) ins",
415
- method: { id: "directory.chromeosdevices.action", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action", baseUrl: "https://admin.googleapis.com/", requiredParams: ["resourceId", "customerId"] },
415
+ method: { id: "directory.chromeosdevices.action", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "resourceId"] },
416
416
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "resourceId", "api": "resourceId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
417
417
  hasBody: true,
418
418
  shape: {
@@ -463,7 +463,7 @@ export function registerAdminGeneratedTools(registry) {
463
463
  name: "admin_chromeosdevices_move_devices_to_ou",
464
464
  cud: "update",
465
465
  description: "Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.",
466
- method: { id: "directory.chromeosdevices.moveDevicesToOu", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "orgUnitPath"] },
466
+ method: { id: "directory.chromeosdevices.moveDevicesToOu", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu", baseUrl: "https://admin.googleapis.com/", requiredParams: ["orgUnitPath", "customerId"] },
467
467
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "orgUnitPath", "api": "orgUnitPath", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
468
468
  hasBody: true,
469
469
  shape: {
@@ -734,7 +734,7 @@ export function registerAdminGeneratedTools(registry) {
734
734
  hasBody: true,
735
735
  shape: {
736
736
  account: accountField(),
737
- body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, id, kind, name, nonEditableAliases."),
737
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, externalIds, id, kind, name, nonEditableAliases."),
738
738
  fields: z.string().optional().describe('Response field mask.'),
739
739
  },
740
740
  });
@@ -748,7 +748,7 @@ export function registerAdminGeneratedTools(registry) {
748
748
  shape: {
749
749
  account: accountField(),
750
750
  groupKey: z.string().describe("Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID."),
751
- body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, id, kind, name, nonEditableAliases."),
751
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, externalIds, id, kind, name, nonEditableAliases."),
752
752
  fields: z.string().optional().describe('Response field mask.'),
753
753
  },
754
754
  });
@@ -762,7 +762,7 @@ export function registerAdminGeneratedTools(registry) {
762
762
  shape: {
763
763
  account: accountField(),
764
764
  groupKey: z.string().describe("Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID."),
765
- body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, id, kind, name, nonEditableAliases."),
765
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("Group JSON request body. Top-level fields: adminCreated, aliases, description, directMembersCount, email, etag, externalIds, id, kind, name, nonEditableAliases."),
766
766
  fields: z.string().optional().describe('Response field mask.'),
767
767
  },
768
768
  });
@@ -784,7 +784,7 @@ export function registerAdminGeneratedTools(registry) {
784
784
  name: "admin_members_get",
785
785
  cud: "read",
786
786
  description: "Retrieves a group member's properties.",
787
- method: { id: "directory.members.get", httpMethod: "GET", path: "admin/directory/v1/groups/{groupKey}/members/{memberKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["groupKey", "memberKey"] },
787
+ method: { id: "directory.members.get", httpMethod: "GET", path: "admin/directory/v1/groups/{groupKey}/members/{memberKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["memberKey", "groupKey"] },
788
788
  params: [{ "field": "groupKey", "api": "groupKey", "location": "path" }, { "field": "memberKey", "api": "memberKey", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
789
789
  hasBody: false,
790
790
  shape: {
@@ -841,7 +841,7 @@ export function registerAdminGeneratedTools(registry) {
841
841
  name: "admin_members_update",
842
842
  cud: "update",
843
843
  description: "Updates the membership of a user in the specified group.",
844
- method: { id: "directory.members.update", httpMethod: "PUT", path: "admin/directory/v1/groups/{groupKey}/members/{memberKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["groupKey", "memberKey"] },
844
+ method: { id: "directory.members.update", httpMethod: "PUT", path: "admin/directory/v1/groups/{groupKey}/members/{memberKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["memberKey", "groupKey"] },
845
845
  params: [{ "field": "groupKey", "api": "groupKey", "location": "path" }, { "field": "memberKey", "api": "memberKey", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
846
846
  hasBody: true,
847
847
  shape: {
@@ -856,7 +856,7 @@ export function registerAdminGeneratedTools(registry) {
856
856
  name: "admin_mobiledevices_action",
857
857
  cud: "create",
858
858
  description: "Takes an action that affects a mobile device. For example, remotely wiping a device.",
859
- method: { id: "directory.mobiledevices.action", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action", baseUrl: "https://admin.googleapis.com/", requiredParams: ["resourceId", "customerId"] },
859
+ method: { id: "directory.mobiledevices.action", httpMethod: "POST", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "resourceId"] },
860
860
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "resourceId", "api": "resourceId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
861
861
  hasBody: true,
862
862
  shape: {
@@ -871,7 +871,7 @@ export function registerAdminGeneratedTools(registry) {
871
871
  name: "admin_mobiledevices_delete",
872
872
  cud: "delete",
873
873
  description: "Removes a mobile device.",
874
- method: { id: "directory.mobiledevices.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["resourceId", "customerId"] },
874
+ method: { id: "directory.mobiledevices.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "resourceId"] },
875
875
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "resourceId", "api": "resourceId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
876
876
  hasBody: false,
877
877
  shape: {
@@ -885,7 +885,7 @@ export function registerAdminGeneratedTools(registry) {
885
885
  name: "admin_mobiledevices_get",
886
886
  cud: "read",
887
887
  description: "Retrieves a mobile device's properties.",
888
- method: { id: "directory.mobiledevices.get", httpMethod: "GET", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["resourceId", "customerId"] },
888
+ method: { id: "directory.mobiledevices.get", httpMethod: "GET", path: "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "resourceId"] },
889
889
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "resourceId", "api": "resourceId", "location": "path" }, { "field": "projection", "api": "projection", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
890
890
  hasBody: false,
891
891
  shape: {
@@ -976,7 +976,7 @@ export function registerAdminGeneratedTools(registry) {
976
976
  name: "admin_orgunits_patch",
977
977
  cud: "update",
978
978
  description: "Updates an organizational unit. This method supports [patch semantics](https://developers.google.com/workspace/admin/directory/v1/guides/performance#patch)",
979
- method: { id: "directory.orgunits.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "orgUnitPath"] },
979
+ method: { id: "directory.orgunits.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["orgUnitPath", "customerId"] },
980
980
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "orgUnitPath", "api": "orgUnitPath", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
981
981
  hasBody: true,
982
982
  shape: {
@@ -991,7 +991,7 @@ export function registerAdminGeneratedTools(registry) {
991
991
  name: "admin_orgunits_update",
992
992
  cud: "update",
993
993
  description: "Updates an organizational unit.",
994
- method: { id: "directory.orgunits.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["orgUnitPath", "customerId"] },
994
+ method: { id: "directory.orgunits.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customerId", "orgUnitPath"] },
995
995
  params: [{ "field": "customerId", "api": "customerId", "location": "path" }, { "field": "orgUnitPath", "api": "orgUnitPath", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
996
996
  hasBody: true,
997
997
  shape: {
@@ -1077,7 +1077,7 @@ export function registerAdminGeneratedTools(registry) {
1077
1077
  name: "admin_resources_buildings_patch",
1078
1078
  cud: "update",
1079
1079
  description: "Patches a building.",
1080
- method: { id: "directory.resources.buildings.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["buildingId", "customer"] },
1080
+ method: { id: "directory.resources.buildings.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "buildingId"] },
1081
1081
  params: [{ "field": "buildingId", "api": "buildingId", "location": "path" }, { "field": "customer", "api": "customer", "location": "path" }, { "field": "coordinatesSource", "api": "coordinatesSource", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
1082
1082
  hasBody: true,
1083
1083
  shape: {
@@ -1093,7 +1093,7 @@ export function registerAdminGeneratedTools(registry) {
1093
1093
  name: "admin_resources_buildings_update",
1094
1094
  cud: "update",
1095
1095
  description: "Updates a building.",
1096
- method: { id: "directory.resources.buildings.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "buildingId"] },
1096
+ method: { id: "directory.resources.buildings.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["buildingId", "customer"] },
1097
1097
  params: [{ "field": "buildingId", "api": "buildingId", "location": "path" }, { "field": "customer", "api": "customer", "location": "path" }, { "field": "coordinatesSource", "api": "coordinatesSource", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
1098
1098
  hasBody: true,
1099
1099
  shape: {
@@ -1109,7 +1109,7 @@ export function registerAdminGeneratedTools(registry) {
1109
1109
  name: "admin_resources_calendars_delete",
1110
1110
  cud: "delete",
1111
1111
  description: "Deletes a calendar resource.",
1112
- method: { id: "directory.resources.calendars.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["calendarResourceId", "customer"] },
1112
+ method: { id: "directory.resources.calendars.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "calendarResourceId"] },
1113
1113
  params: [{ "field": "calendarResourceId", "api": "calendarResourceId", "location": "path" }, { "field": "customer", "api": "customer", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1114
1114
  hasBody: false,
1115
1115
  shape: {
@@ -1168,7 +1168,7 @@ export function registerAdminGeneratedTools(registry) {
1168
1168
  name: "admin_resources_calendars_patch",
1169
1169
  cud: "update",
1170
1170
  description: "Patches a calendar resource.",
1171
- method: { id: "directory.resources.calendars.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["calendarResourceId", "customer"] },
1171
+ method: { id: "directory.resources.calendars.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "calendarResourceId"] },
1172
1172
  params: [{ "field": "calendarResourceId", "api": "calendarResourceId", "location": "path" }, { "field": "customer", "api": "customer", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1173
1173
  hasBody: true,
1174
1174
  shape: {
@@ -1183,7 +1183,7 @@ export function registerAdminGeneratedTools(registry) {
1183
1183
  name: "admin_resources_calendars_update",
1184
1184
  cud: "update",
1185
1185
  description: "Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present i",
1186
- method: { id: "directory.resources.calendars.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["calendarResourceId", "customer"] },
1186
+ method: { id: "directory.resources.calendars.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "calendarResourceId"] },
1187
1187
  params: [{ "field": "calendarResourceId", "api": "calendarResourceId", "location": "path" }, { "field": "customer", "api": "customer", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1188
1188
  hasBody: true,
1189
1189
  shape: {
@@ -1255,7 +1255,7 @@ export function registerAdminGeneratedTools(registry) {
1255
1255
  name: "admin_resources_features_patch",
1256
1256
  cud: "update",
1257
1257
  description: "Patches a feature.",
1258
- method: { id: "directory.resources.features.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/features/{featureKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "featureKey"] },
1258
+ method: { id: "directory.resources.features.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/resources/features/{featureKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["featureKey", "customer"] },
1259
1259
  params: [{ "field": "customer", "api": "customer", "location": "path" }, { "field": "featureKey", "api": "featureKey", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1260
1260
  hasBody: true,
1261
1261
  shape: {
@@ -1285,7 +1285,7 @@ export function registerAdminGeneratedTools(registry) {
1285
1285
  name: "admin_resources_features_update",
1286
1286
  cud: "update",
1287
1287
  description: "Updates a feature.",
1288
- method: { id: "directory.resources.features.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/features/{featureKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "featureKey"] },
1288
+ method: { id: "directory.resources.features.update", httpMethod: "PUT", path: "admin/directory/v1/customer/{customer}/resources/features/{featureKey}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["featureKey", "customer"] },
1289
1289
  params: [{ "field": "customer", "api": "customer", "location": "path" }, { "field": "featureKey", "api": "featureKey", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1290
1290
  hasBody: true,
1291
1291
  shape: {
@@ -1360,7 +1360,7 @@ export function registerAdminGeneratedTools(registry) {
1360
1360
  name: "admin_roles_delete",
1361
1361
  cud: "delete",
1362
1362
  description: "Deletes a role.",
1363
- method: { id: "directory.roles.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "roleId"] },
1363
+ method: { id: "directory.roles.delete", httpMethod: "DELETE", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["roleId", "customer"] },
1364
1364
  params: [{ "field": "customer", "api": "customer", "location": "path" }, { "field": "roleId", "api": "roleId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1365
1365
  hasBody: false,
1366
1366
  shape: {
@@ -1374,7 +1374,7 @@ export function registerAdminGeneratedTools(registry) {
1374
1374
  name: "admin_roles_get",
1375
1375
  cud: "read",
1376
1376
  description: "Retrieves a role.",
1377
- method: { id: "directory.roles.get", httpMethod: "GET", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "roleId"] },
1377
+ method: { id: "directory.roles.get", httpMethod: "GET", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["roleId", "customer"] },
1378
1378
  params: [{ "field": "customer", "api": "customer", "location": "path" }, { "field": "roleId", "api": "roleId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1379
1379
  hasBody: false,
1380
1380
  shape: {
@@ -1417,7 +1417,7 @@ export function registerAdminGeneratedTools(registry) {
1417
1417
  name: "admin_roles_patch",
1418
1418
  cud: "update",
1419
1419
  description: "Patches a role.",
1420
- method: { id: "directory.roles.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["customer", "roleId"] },
1420
+ method: { id: "directory.roles.patch", httpMethod: "PATCH", path: "admin/directory/v1/customer/{customer}/roles/{roleId}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["roleId", "customer"] },
1421
1421
  params: [{ "field": "customer", "api": "customer", "location": "path" }, { "field": "roleId", "api": "roleId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
1422
1422
  hasBody: true,
1423
1423
  shape: {
@@ -1856,7 +1856,7 @@ export function registerAdminGeneratedTools(registry) {
1856
1856
  name: "admin_activities_watch",
1857
1857
  cud: "create",
1858
1858
  description: "Start receiving notifications for account activities. For more information, see Receiving Push Notifications.",
1859
- method: { id: "reports.activities.watch", httpMethod: "POST", path: "admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch", baseUrl: "https://admin.googleapis.com/", requiredParams: ["userKey", "applicationName"] },
1859
+ method: { id: "reports.activities.watch", httpMethod: "POST", path: "admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch", baseUrl: "https://admin.googleapis.com/", requiredParams: ["applicationName", "userKey"] },
1860
1860
  params: [{ "field": "applicationName", "api": "applicationName", "location": "path" }, { "field": "userKey", "api": "userKey", "location": "path" }, { "field": "actorIpAddress", "api": "actorIpAddress", "location": "query" }, { "field": "customerId", "api": "customerId", "location": "query" }, { "field": "endTime", "api": "endTime", "location": "query" }, { "field": "eventName", "api": "eventName", "location": "query" }, { "field": "filters", "api": "filters", "location": "query" }, { "field": "groupIdFilter", "api": "groupIdFilter", "location": "query" }, { "field": "maxResults", "api": "maxResults", "location": "query" }, { "field": "orgUnitID", "api": "orgUnitID", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "startTime", "api": "startTime", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
1861
1861
  hasBody: true,
1862
1862
  shape: {
@@ -1897,7 +1897,7 @@ export function registerAdminGeneratedTools(registry) {
1897
1897
  name: "admin_entity_usage_reports_get",
1898
1898
  cud: "read",
1899
1899
  description: "Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usag",
1900
- method: { id: "reports.entityUsageReports.get", httpMethod: "GET", path: "admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["entityType", "entityKey", "date"] },
1900
+ method: { id: "reports.entityUsageReports.get", httpMethod: "GET", path: "admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["entityKey", "entityType", "date"] },
1901
1901
  params: [{ "field": "date", "api": "date", "location": "path" }, { "field": "entityKey", "api": "entityKey", "location": "path" }, { "field": "entityType", "api": "entityType", "location": "path" }, { "field": "customerId", "api": "customerId", "location": "query" }, { "field": "filters", "api": "filters", "location": "query" }, { "field": "maxResults", "api": "maxResults", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "parameters", "api": "parameters", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
1902
1902
  hasBody: false,
1903
1903
  shape: {
@@ -1917,7 +1917,7 @@ export function registerAdminGeneratedTools(registry) {
1917
1917
  name: "admin_user_usage_report_get",
1918
1918
  cud: "read",
1919
1919
  description: "Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide",
1920
- method: { id: "reports.userUsageReport.get", httpMethod: "GET", path: "admin/reports/v1/usage/users/{userKey}/dates/{date}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["date", "userKey"] },
1920
+ method: { id: "reports.userUsageReport.get", httpMethod: "GET", path: "admin/reports/v1/usage/users/{userKey}/dates/{date}", baseUrl: "https://admin.googleapis.com/", requiredParams: ["userKey", "date"] },
1921
1921
  params: [{ "field": "date", "api": "date", "location": "path" }, { "field": "userKey", "api": "userKey", "location": "path" }, { "field": "customerId", "api": "customerId", "location": "query" }, { "field": "filters", "api": "filters", "location": "query" }, { "field": "groupIdFilter", "api": "groupIdFilter", "location": "query" }, { "field": "maxResults", "api": "maxResults", "location": "query" }, { "field": "orgUnitID", "api": "orgUnitID", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "parameters", "api": "parameters", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
1922
1922
  hasBody: false,
1923
1923
  shape: {
@@ -6,7 +6,7 @@ export function registerAppsmarketGeneratedTools(registry) {
6
6
  name: "appsmarket_customer_license_get",
7
7
  cud: "read",
8
8
  description: "Gets the customer's licensing status to determine if they have access to a given app. For more information, see [Getting app installation and licensing details]",
9
- method: { id: "appsmarket.customerLicense.get", httpMethod: "GET", path: "appsmarket/v2/customerLicense/{applicationId}/{customerId}", baseUrl: "https://appsmarket.googleapis.com/", requiredParams: ["applicationId", "customerId"] },
9
+ method: { id: "appsmarket.customerLicense.get", httpMethod: "GET", path: "appsmarket/v2/customerLicense/{applicationId}/{customerId}", baseUrl: "https://appsmarket.googleapis.com/", requiredParams: ["customerId", "applicationId"] },
10
10
  params: [{ "field": "applicationId", "api": "applicationId", "location": "path" }, { "field": "customerId", "api": "customerId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
11
11
  hasBody: false,
12
12
  shape: {
@@ -20,7 +20,7 @@ export function registerAppsmarketGeneratedTools(registry) {
20
20
  name: "appsmarket_user_license_get",
21
21
  cud: "read",
22
22
  description: "Gets the user's licensing status to determine if they have permission to use a given app. For more information, see [Getting app installation and licensing deta",
23
- method: { id: "appsmarket.userLicense.get", httpMethod: "GET", path: "appsmarket/v2/userLicense/{applicationId}/{userId}", baseUrl: "https://appsmarket.googleapis.com/", requiredParams: ["applicationId", "userId"] },
23
+ method: { id: "appsmarket.userLicense.get", httpMethod: "GET", path: "appsmarket/v2/userLicense/{applicationId}/{userId}", baseUrl: "https://appsmarket.googleapis.com/", requiredParams: ["userId", "applicationId"] },
24
24
  params: [{ "field": "applicationId", "api": "applicationId", "location": "path" }, { "field": "userId", "api": "userId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
25
25
  hasBody: false,
26
26
  shape: {
@@ -7,7 +7,7 @@ export function registerCalendarGeneratedTools(registry) {
7
7
  name: "calendar_acl_delete",
8
8
  cud: "delete",
9
9
  description: "Deletes an access control rule.",
10
- method: { id: "calendar.acl.delete", httpMethod: "DELETE", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "ruleId"] },
10
+ method: { id: "calendar.acl.delete", httpMethod: "DELETE", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["ruleId", "calendarId"] },
11
11
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "ruleId", "api": "ruleId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
12
12
  hasBody: false,
13
13
  shape: {
@@ -21,7 +21,7 @@ export function registerCalendarGeneratedTools(registry) {
21
21
  name: "calendar_acl_get",
22
22
  cud: "read",
23
23
  description: "Returns an access control rule.",
24
- method: { id: "calendar.acl.get", httpMethod: "GET", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "ruleId"] },
24
+ method: { id: "calendar.acl.get", httpMethod: "GET", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["ruleId", "calendarId"] },
25
25
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "ruleId", "api": "ruleId", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
26
26
  hasBody: false,
27
27
  shape: {
@@ -67,7 +67,7 @@ export function registerCalendarGeneratedTools(registry) {
67
67
  name: "calendar_acl_patch",
68
68
  cud: "update",
69
69
  description: "Updates an access control rule. This method supports patch semantics.",
70
- method: { id: "calendar.acl.patch", httpMethod: "PATCH", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["ruleId", "calendarId"] },
70
+ method: { id: "calendar.acl.patch", httpMethod: "PATCH", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "ruleId"] },
71
71
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "ruleId", "api": "ruleId", "location": "path" }, { "field": "sendNotifications", "api": "sendNotifications", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
72
72
  hasBody: true,
73
73
  shape: {
@@ -83,7 +83,7 @@ export function registerCalendarGeneratedTools(registry) {
83
83
  name: "calendar_acl_update",
84
84
  cud: "update",
85
85
  description: "Updates an access control rule.",
86
- method: { id: "calendar.acl.update", httpMethod: "PUT", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["ruleId", "calendarId"] },
86
+ method: { id: "calendar.acl.update", httpMethod: "PUT", path: "calendars/{calendarId}/acl/{ruleId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "ruleId"] },
87
87
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "ruleId", "api": "ruleId", "location": "path" }, { "field": "sendNotifications", "api": "sendNotifications", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
88
88
  hasBody: true,
89
89
  shape: {
@@ -260,7 +260,7 @@ export function registerCalendarGeneratedTools(registry) {
260
260
  name: "calendar_calendars_transfer_ownership",
261
261
  cud: "create",
262
262
  description: "Transfers a secondary calendar between users within a Google Workspace organization. Requires user authentication with Manage Calendars administrator privilege,",
263
- method: { id: "calendar.calendars.transferOwnership", httpMethod: "POST", path: "calendars/{calendarId}/transferOwnership", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["newDataOwner", "useAdminAccess", "calendarId"] },
263
+ method: { id: "calendar.calendars.transferOwnership", httpMethod: "POST", path: "calendars/{calendarId}/transferOwnership", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "newDataOwner", "useAdminAccess"] },
264
264
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "newDataOwner", "api": "newDataOwner", "location": "query" }, { "field": "useAdminAccess", "api": "useAdminAccess", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
265
265
  hasBody: false,
266
266
  shape: {
@@ -331,7 +331,7 @@ export function registerCalendarGeneratedTools(registry) {
331
331
  name: "calendar_events_update",
332
332
  cud: "update",
333
333
  description: "Updates an event.",
334
- method: { id: "calendar.events.update", httpMethod: "PUT", path: "calendars/{calendarId}/events/{eventId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["eventId", "calendarId"] },
334
+ method: { id: "calendar.events.update", httpMethod: "PUT", path: "calendars/{calendarId}/events/{eventId}", baseUrl: "https://www.googleapis.com/calendar/v3/", requiredParams: ["calendarId", "eventId"] },
335
335
  params: [{ "field": "calendarId", "api": "calendarId", "location": "path" }, { "field": "eventId", "api": "eventId", "location": "path" }, { "field": "alwaysIncludeEmail", "api": "alwaysIncludeEmail", "location": "query" }, { "field": "conferenceDataVersion", "api": "conferenceDataVersion", "location": "query" }, { "field": "eventLabelVersion", "api": "eventLabelVersion", "location": "query" }, { "field": "maxAttendees", "api": "maxAttendees", "location": "query" }, { "field": "sendNotifications", "api": "sendNotifications", "location": "query" }, { "field": "sendUpdates", "api": "sendUpdates", "location": "query" }, { "field": "supportsAttachments", "api": "supportsAttachments", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
336
336
  hasBody: true,
337
337
  shape: {
@@ -265,11 +265,12 @@ export function registerChatGeneratedTools(registry) {
265
265
  cud: "read",
266
266
  description: "Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). Supports the foll",
267
267
  method: { id: "chat.spaces.messages.get", httpMethod: "GET", path: "v1/{+name}", baseUrl: "https://chat.googleapis.com/", requiredParams: ["name"] },
268
- params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
268
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "markupSyntax", "api": "markupSyntax", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
269
269
  hasBody: false,
270
270
  shape: {
271
271
  account: accountField(),
272
272
  name: z.string().describe("Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{mes"),
273
+ markupSyntax: z.enum(["MARKUP_SYNTAX_UNSPECIFIED", "MARKUP_SYNTAX_CHAT", "MARKUP_SYNTAX_MARKDOWN"]).describe("Optional. Specifies the desired output syntax for the Chat message `formatted_text` field.").optional(),
273
274
  fields: z.string().optional().describe('Response field mask.'),
274
275
  },
275
276
  });
@@ -285,7 +286,7 @@ export function registerChatGeneratedTools(registry) {
285
286
  name: z.string().describe("Identifier. Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the"),
286
287
  allowMissing: coerceBoolean.describe("Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/c").optional(),
287
288
  updateMask: z.string().describe("Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authen").optional(),
288
- body: coerceJson(z.record(z.string(), z.unknown())).describe("Message JSON request body. Top-level fields: accessoryWidgets, actionResponse, annotations, argumentText, attachedGifs, attachment, cards, cardsV2, clientAssignedMessageId, createTime, deleteTime, deletionMetadata, +15 more."),
289
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("Message JSON request body. Top-level fields: accessoryWidgets, actionResponse, annotations, argumentText, attachedGifs, attachment, cards, cardsV2, clientAssignedMessageId, createTime, deleteTime, deletionMetadata, +16 more."),
289
290
  fields: z.string().optional().describe('Response field mask.'),
290
291
  },
291
292
  });
@@ -332,6 +333,20 @@ export function registerChatGeneratedTools(registry) {
332
333
  fields: z.string().optional().describe('Response field mask.'),
333
334
  },
334
335
  });
336
+ registerGeneratedTool(registry, {
337
+ name: "chat_spaces_messages_search",
338
+ cud: "read",
339
+ description: "Searches for messages in Google Chat that the calling user has access to. Returns a list of messages matching the search criteria. To search across all spaces t",
340
+ method: { id: "chat.spaces.messages.search", httpMethod: "POST", path: "v1/{+parent}/messages:search", baseUrl: "https://chat.googleapis.com/", requiredParams: ["parent"] },
341
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
342
+ hasBody: true,
343
+ shape: {
344
+ account: accountField(),
345
+ parent: z.string().describe("Required. The resource name of the space to search within. To search across all spaces the user has access to, set this field to `spaces/-`. Using any other value for `parent` results in an `INVALID_A"),
346
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("SearchMessagesRequest JSON request body. Top-level fields: filter, markupSyntax, orderBy, pageSize, pageToken, view."),
347
+ fields: z.string().optional().describe('Response field mask.'),
348
+ },
349
+ });
335
350
  registerGeneratedTool(registry, {
336
351
  name: "chat_spaces_messages_update",
337
352
  cud: "update",
@@ -344,7 +359,7 @@ export function registerChatGeneratedTools(registry) {
344
359
  name: z.string().describe("Identifier. Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the"),
345
360
  allowMissing: coerceBoolean.describe("Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/c").optional(),
346
361
  updateMask: z.string().describe("Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authen").optional(),
347
- body: coerceJson(z.record(z.string(), z.unknown())).describe("Message JSON request body. Top-level fields: accessoryWidgets, actionResponse, annotations, argumentText, attachedGifs, attachment, cards, cardsV2, clientAssignedMessageId, createTime, deleteTime, deletionMetadata, +15 more."),
362
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("Message JSON request body. Top-level fields: accessoryWidgets, actionResponse, annotations, argumentText, attachedGifs, attachment, cards, cardsV2, clientAssignedMessageId, createTime, deleteTime, deletionMetadata, +16 more."),
348
363
  fields: z.string().optional().describe('Response field mask.'),
349
364
  },
350
365
  });