mcp-google-multi 6.0.0-alpha.11 → 6.0.0-alpha.12

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/README.md CHANGED
@@ -4,10 +4,10 @@ The most complete **local Google Workspace MCP server**: Gmail, Drive, Calendar,
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/mcp-google-multi?label=npm&color=cb3837)](https://www.npmjs.com/package/mcp-google-multi)
6
6
 
7
- - 🧰 **Exhaustive** — 874 tools across 28 services + an escape hatch for anything else → [COVERAGE.md](./COVERAGE.md)
7
+ - 🧰 **Exhaustive** — 940 tools across 29 services, now including Google Analytics (GA4), + an escape hatch for anything else → [COVERAGE.md](./COVERAGE.md)
8
8
  - 🔑 **Multi-account** — drive any number of Google accounts by alias, or fan one call out across all of them
9
9
  - 🔒 **Private by design** — your own OAuth app, tokens encrypted at rest (AES-256-GCM), writes deny-by-default, no telemetry, no metering — it talks only to Google
10
- - 🌐 **Local or remote** — runs locally over stdio, or self-hosted over HTTP with its own built-in OAuth 2.1 server (Claude Code's `/mcp` login and the claude.ai connector, zero custom UI) → [remote setup](./docs/http-setup.md)
10
+ - 🌐 **Local or remote** — runs locally over stdio, or self-hosted over HTTP with its own built-in OAuth 2.1 server (Claude Code's `/mcp` login and the claude.ai connector, zero custom UI). Pull-and-up Docker Compose with optional automatic HTTPS → [remote setup](./docs/http-setup.md)
11
11
  - ✉️ **Built for real work** — send and read email in Markdown with attachments and one-call replies, an interactive setup wizard with a `doctor` self-check, and per-account scope profiles → [features tour](./docs/features.md)
12
12
 
13
13
  ## Quick setup
package/dist/api-probe.js CHANGED
@@ -17,6 +17,9 @@ export const API_PROBES = [
17
17
  { service: 'chat', api: 'chat', url: 'https://chat.googleapis.com/v1/spaces?pageSize=1', scopePrefixes: [`${P}chat.`] },
18
18
  { service: 'meet', api: 'meet', url: 'https://meet.googleapis.com/v2/conferenceRecords?pageSize=1', scopePrefixes: [`${P}meetings.`] },
19
19
  { service: 'forms', api: 'forms', url: `https://forms.googleapis.com/v1/forms/${BOGUS_ID}`, scopePrefixes: [`${P}forms.`], notFoundMeansEnabled: true },
20
+ // Probes the Admin API only: the Data API has no no-arg read (every call
21
+ // needs a property id), so its enablement surfaces on first report instead.
22
+ { service: 'analytics', api: 'analyticsadmin', url: 'https://analyticsadmin.googleapis.com/v1beta/accountSummaries?pageSize=1', scopePrefixes: [`${P}analytics`] },
20
23
  ];
21
24
  export function planProbes(granted, probes = API_PROBES) {
22
25
  return probes.filter((p) => granted.some((s) => p.scopePrefixes.some((prefix) => s.startsWith(prefix))));
@@ -20,6 +20,8 @@ export const WORKSPACE_APIS = {
20
20
  admin_reports: { id: 'admin', version: 'reports_v1' },
21
21
  admin_datatransfer: { id: 'admin', version: 'datatransfer_v1' },
22
22
  groupssettings: { id: 'groupssettings', version: 'v1' },
23
+ analyticsadmin: { id: 'analyticsadmin', version: 'v1beta' },
24
+ analyticsdata: { id: 'analyticsdata', version: 'v1beta' },
23
25
  appsmarket: { id: 'appsmarket', version: 'v2' },
24
26
  classroom: { id: 'classroom', version: 'v1' },
25
27
  cloudidentity: { id: 'cloudidentity', version: 'v1' },
@@ -148,9 +150,13 @@ export async function loadMethodIndex(api, deps = {}) {
148
150
  export function clearDiscoveryMemoryCache() {
149
151
  memoryCache.clear();
150
152
  }
151
- const POST_READ_VERB = /^(get|list|search|query|lookup|count|batchGet|generateIds|export|download|inspect)/i;
153
+ // GA4-style report execution (runReport, batchRunPivotReports, runAccessReport)
154
+ // and check* predicates are POSTs purely for the request-body size — reads.
155
+ const POST_READ_VERB = /^(get|list|search|query|lookup|count|batchGet|generateIds|export|download|inspect|check|(batch)?run\w*report)/i;
152
156
  const POST_UPDATE_VERB = /^(untrash|undelete|restore|modify|move|set|sort|merge|unmerge|replace|resize|publish|resolve|update|patch|write|format)/i;
153
- const POST_DELETE_VERB = /^(batch)?(delete|remove|trash|clear|empty|obliterate|purge|revoke|wipeout)/i;
157
+ // archive sits with the deletes: in GA4 archiving a custom dimension/metric is
158
+ // permanent, so the most restrictive write class is the safe classification.
159
+ const POST_DELETE_VERB = /^(batch)?(delete|remove|trash|clear|empty|obliterate|purge|revoke|wipeout|archive)/i;
154
160
  export function cudFromMethod(method) {
155
161
  switch (method.httpMethod) {
156
162
  case 'GET':
@@ -108,6 +108,13 @@ export const BUNDLE_CATALOG = {
108
108
  description: 'Read Gmail Postmaster Tools deliverability data.',
109
109
  risk: 'low',
110
110
  },
111
+ // Read-only by design: GA4 admin writes need analytics.edit, which ships as
112
+ // a separate opt-in bundle only if real demand appears (plan 6.0.0 GA-1).
113
+ analytics: {
114
+ scopes: ['https://www.googleapis.com/auth/analytics.readonly'],
115
+ description: 'Read Google Analytics (GA4): run reports and inspect accounts, properties and their configuration.',
116
+ risk: 'low',
117
+ },
111
118
  groupssettings: {
112
119
  scopes: ['https://www.googleapis.com/auth/apps.groups.settings'],
113
120
  description: 'Change Google Groups settings for the domain.',
package/dist/services.js CHANGED
@@ -34,6 +34,7 @@ const bundleGate = (name) => ({
34
34
  hint: `add "${name}" to an account's scope profile (or legacy GOOGLE_OPTIONAL_SCOPES)`,
35
35
  });
36
36
  export const GENERATED_GATES = {
37
+ analytics: bundleGate('analytics'),
37
38
  appsmarket: bundleGate('appsmarket'),
38
39
  classroom: bundleGate('classroom'),
39
40
  cloudidentity: bundleGate('cloudidentity'),
@@ -0,0 +1,2 @@
1
+ import type { ToolRegistry } from '../../registry.js';
2
+ export declare function registerAnalyticsGeneratedTools(registry: ToolRegistry): void;
@@ -0,0 +1,939 @@
1
+ // GENERATED by scripts/gen-tools.ts — do not edit. Regenerate: npm run gen:tools
2
+ import { z } from 'zod';
3
+ import { coerceBoolean, coerceJson } from '../_coerce.js';
4
+ import { accountField, registerGeneratedTool } from './_shared.js';
5
+ export function registerAnalyticsGeneratedTools(registry) {
6
+ // Interned method scope sets (shared across tools; see scope-observability).
7
+ const S_analyticsadmin_v1beta = [
8
+ ["https://www.googleapis.com/auth/analytics.edit"],
9
+ ["https://www.googleapis.com/auth/analytics.edit", "https://www.googleapis.com/auth/analytics.readonly"],
10
+ ];
11
+ registerGeneratedTool(registry, {
12
+ name: "analytics_accounts_delete",
13
+ cud: "delete",
14
+ description: "Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be rest",
15
+ method: { id: "analyticsadmin.accounts.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
16
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
17
+ hasBody: false,
18
+ shape: {
19
+ account: accountField(),
20
+ name: z.string().describe("Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\""),
21
+ fields: z.string().optional().describe('Response field mask.'),
22
+ },
23
+ });
24
+ registerGeneratedTool(registry, {
25
+ name: "analytics_accounts_get",
26
+ cud: "read",
27
+ description: "Lookup for a single Account.",
28
+ method: { id: "analyticsadmin.accounts.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
29
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
30
+ hasBody: false,
31
+ shape: {
32
+ account: accountField(),
33
+ name: z.string().describe("Required. The name of the account to lookup. Format: accounts/{account} Example: \"accounts/100\""),
34
+ fields: z.string().optional().describe('Response field mask.'),
35
+ },
36
+ });
37
+ registerGeneratedTool(registry, {
38
+ name: "analytics_accounts_get_data_sharing_settings",
39
+ cud: "read",
40
+ description: "Get data sharing settings on an account. Data sharing settings are singletons.",
41
+ method: { id: "analyticsadmin.accounts.getDataSharingSettings", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
42
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
43
+ hasBody: false,
44
+ shape: {
45
+ account: accountField(),
46
+ name: z.string().describe("Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings`"),
47
+ fields: z.string().optional().describe('Response field mask.'),
48
+ },
49
+ });
50
+ registerGeneratedTool(registry, {
51
+ name: "analytics_accounts_list",
52
+ cud: "read",
53
+ description: "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are exclud",
54
+ method: { id: "analyticsadmin.accounts.list", httpMethod: "GET", path: "v1beta/accounts", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: [], scopes: S_analyticsadmin_v1beta[1] },
55
+ params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "showDeleted", "api": "showDeleted", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
56
+ hasBody: false,
57
+ shape: {
58
+ account: accountField(),
59
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximu").optional(),
60
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call").optional(),
61
+ showDeleted: coerceBoolean.describe("Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.").optional(),
62
+ fields: z.string().optional().describe('Response field mask.'),
63
+ },
64
+ });
65
+ registerGeneratedTool(registry, {
66
+ name: "analytics_accounts_patch",
67
+ cud: "update",
68
+ description: "Updates an account.",
69
+ method: { id: "analyticsadmin.accounts.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
70
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
71
+ hasBody: true,
72
+ shape: {
73
+ account: accountField(),
74
+ name: z.string().describe("Identifier. Resource name of this account. Format: accounts/{account} Example: \"accounts/100\""),
75
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (for example, \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the ").optional(),
76
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaAccount JSON request body. Top-level fields: createTime, deleted, displayName, gmpOrganization, name, regionCode, updateTime."),
77
+ fields: z.string().optional().describe('Response field mask.'),
78
+ },
79
+ });
80
+ registerGeneratedTool(registry, {
81
+ name: "analytics_accounts_provision_account_ticket",
82
+ cud: "create",
83
+ description: "Requests a ticket for creating an account.",
84
+ method: { id: "analyticsadmin.accounts.provisionAccountTicket", httpMethod: "POST", path: "v1beta/accounts:provisionAccountTicket", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: [], scopes: S_analyticsadmin_v1beta[0] },
85
+ params: [{ "field": "fields", "api": "fields", "location": "query" }],
86
+ hasBody: true,
87
+ shape: {
88
+ account: accountField(),
89
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaProvisionAccountTicketRequest JSON request body. Top-level fields: account, redirectUri."),
90
+ fields: z.string().optional().describe('Response field mask.'),
91
+ },
92
+ });
93
+ registerGeneratedTool(registry, {
94
+ name: "analytics_accounts_run_access_report",
95
+ cud: "read",
96
+ description: "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are re",
97
+ method: { id: "analyticsadmin.accounts.runAccessReport", httpMethod: "POST", path: "v1beta/{+entity}:runAccessReport", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["entity"], scopes: S_analyticsadmin_v1beta[1] },
98
+ params: [{ "field": "entity", "api": "entity", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
99
+ hasBody: true,
100
+ shape: {
101
+ account: accountField(),
102
+ entity: z.string().describe("The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To r"),
103
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaRunAccessReportRequest JSON request body. Top-level fields: dateRanges, dimensionFilter, dimensions, expandGroups, includeAllUsers, limit, metricFilter, metrics, offset, orderBys, returnEntityQuota, timeZone."),
104
+ fields: z.string().optional().describe('Response field mask.'),
105
+ },
106
+ });
107
+ registerGeneratedTool(registry, {
108
+ name: "analytics_accounts_search_change_history_events",
109
+ cud: "read",
110
+ description: "Searches through all changes to an account or its children given the specified set of filters. Only returns the subset of changes supported by the API. The UI m",
111
+ method: { id: "analyticsadmin.accounts.searchChangeHistoryEvents", httpMethod: "POST", path: "v1beta/{+account}:searchChangeHistoryEvents", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["account"], scopes: S_analyticsadmin_v1beta[0] },
112
+ params: [{ "field": "account_", "api": "account", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
113
+ hasBody: true,
114
+ shape: {
115
+ account: accountField(),
116
+ account_: z.string().describe("Required. The account resource for which to return change history resources. Format: accounts/{account} Example: `accounts/100`"),
117
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest JSON request body. Top-level fields: action, actorEmail, earliestChangeTime, latestChangeTime, pageSize, pageToken, property, resourceType."),
118
+ fields: z.string().optional().describe('Response field mask.'),
119
+ },
120
+ });
121
+ registerGeneratedTool(registry, {
122
+ name: "analytics_account_summaries_list",
123
+ cud: "read",
124
+ description: "Returns summaries of all accounts accessible by the caller.",
125
+ method: { id: "analyticsadmin.accountSummaries.list", httpMethod: "GET", path: "v1beta/accountSummaries", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: [], scopes: S_analyticsadmin_v1beta[1] },
126
+ params: [{ "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
127
+ hasBody: false,
128
+ shape: {
129
+ account: accountField(),
130
+ pageSize: z.number().describe("Optional. The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be retur").optional(),
131
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListAccountSummaries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccountSummaries` mus").optional(),
132
+ fields: z.string().optional().describe('Response field mask.'),
133
+ },
134
+ });
135
+ registerGeneratedTool(registry, {
136
+ name: "analytics_properties_acknowledge_user_data_collection",
137
+ cud: "update",
138
+ description: "Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or through",
139
+ method: { id: "analyticsadmin.properties.acknowledgeUserDataCollection", httpMethod: "POST", path: "v1beta/{+property}:acknowledgeUserDataCollection", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsadmin_v1beta[0] },
140
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
141
+ hasBody: true,
142
+ shape: {
143
+ account: accountField(),
144
+ property: z.string().describe("Required. The property for which to acknowledge user data collection."),
145
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaAcknowledgeUserDataCollectionRequest JSON request body. Top-level fields: acknowledgement."),
146
+ fields: z.string().optional().describe('Response field mask.'),
147
+ },
148
+ });
149
+ registerGeneratedTool(registry, {
150
+ name: "analytics_properties_conversion_events_create",
151
+ cud: "create",
152
+ description: "Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event with the specified attributes.",
153
+ method: { id: "analyticsadmin.properties.conversionEvents.create", httpMethod: "POST", path: "v1beta/{+parent}/conversionEvents", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
154
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
155
+ hasBody: true,
156
+ shape: {
157
+ account: accountField(),
158
+ parent: z.string().describe("Required. The resource name of the parent property where this conversion event will be created. Format: properties/123"),
159
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaConversionEvent JSON request body. Top-level fields: countingMethod, createTime, custom, defaultConversionValue, deletable, eventName, name."),
160
+ fields: z.string().optional().describe('Response field mask.'),
161
+ },
162
+ });
163
+ registerGeneratedTool(registry, {
164
+ name: "analytics_properties_conversion_events_delete",
165
+ cud: "delete",
166
+ description: "Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event in a property.",
167
+ method: { id: "analyticsadmin.properties.conversionEvents.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
168
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
169
+ hasBody: false,
170
+ shape: {
171
+ account: accountField(),
172
+ name: z.string().describe("Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\""),
173
+ fields: z.string().optional().describe('Response field mask.'),
174
+ },
175
+ });
176
+ registerGeneratedTool(registry, {
177
+ name: "analytics_properties_conversion_events_get",
178
+ cud: "read",
179
+ description: "Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion event.",
180
+ method: { id: "analyticsadmin.properties.conversionEvents.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
181
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
182
+ hasBody: false,
183
+ shape: {
184
+ account: accountField(),
185
+ name: z.string().describe("Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: \"properties/123/conversionEvents/456\""),
186
+ fields: z.string().optional().describe('Response field mask.'),
187
+ },
188
+ });
189
+ registerGeneratedTool(registry, {
190
+ name: "analytics_properties_conversion_events_list",
191
+ cud: "read",
192
+ description: "Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are",
193
+ method: { id: "analyticsadmin.properties.conversionEvents.list", httpMethod: "GET", path: "v1beta/{+parent}/conversionEvents", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
194
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
195
+ hasBody: false,
196
+ shape: {
197
+ account: accountField(),
198
+ parent: z.string().describe("Required. The resource name of the parent property. Example: 'properties/123'"),
199
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)").optional(),
200
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListConversionEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConversionEvents` mus").optional(),
201
+ fields: z.string().optional().describe('Response field mask.'),
202
+ },
203
+ });
204
+ registerGeneratedTool(registry, {
205
+ name: "analytics_properties_conversion_events_patch",
206
+ cud: "update",
207
+ description: "Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event with the specified attributes.",
208
+ method: { id: "analyticsadmin.properties.conversionEvents.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
209
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
210
+ hasBody: true,
211
+ shape: {
212
+ account: accountField(),
213
+ name: z.string().describe("Identifier. Resource name of this conversion event. Format: properties/{property}/conversionEvents/{conversion_event}"),
214
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string ").optional(),
215
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaConversionEvent JSON request body. Top-level fields: countingMethod, createTime, custom, defaultConversionValue, deletable, eventName, name."),
216
+ fields: z.string().optional().describe('Response field mask.'),
217
+ },
218
+ });
219
+ registerGeneratedTool(registry, {
220
+ name: "analytics_properties_create",
221
+ cud: "create",
222
+ description: "Creates a Google Analytics property with the specified location and attributes.",
223
+ method: { id: "analyticsadmin.properties.create", httpMethod: "POST", path: "v1beta/properties", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: [], scopes: S_analyticsadmin_v1beta[0] },
224
+ params: [{ "field": "fields", "api": "fields", "location": "query" }],
225
+ hasBody: true,
226
+ shape: {
227
+ account: accountField(),
228
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaProperty JSON request body. Top-level fields: account, createTime, currencyCode, deleteTime, displayName, expireTime, industryCategory, name, parent, propertyType, serviceLevel, timeZone, +1 more."),
229
+ fields: z.string().optional().describe('Response field mask.'),
230
+ },
231
+ });
232
+ registerGeneratedTool(registry, {
233
+ name: "analytics_properties_custom_dimensions_archive",
234
+ cud: "delete",
235
+ description: "Archives a CustomDimension on a property.",
236
+ method: { id: "analyticsadmin.properties.customDimensions.archive", httpMethod: "POST", path: "v1beta/{+name}:archive", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
237
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
238
+ hasBody: true,
239
+ shape: {
240
+ account: accountField(),
241
+ name: z.string().describe("Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678"),
242
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaArchiveCustomDimensionRequest JSON request body."),
243
+ fields: z.string().optional().describe('Response field mask.'),
244
+ },
245
+ });
246
+ registerGeneratedTool(registry, {
247
+ name: "analytics_properties_custom_dimensions_create",
248
+ cud: "create",
249
+ description: "Creates a CustomDimension. Warning: It's not permissible to use this method to collect data on individual users. In particular, sending user IDs in custom dimen",
250
+ method: { id: "analyticsadmin.properties.customDimensions.create", httpMethod: "POST", path: "v1beta/{+parent}/customDimensions", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
251
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
252
+ hasBody: true,
253
+ shape: {
254
+ account: accountField(),
255
+ parent: z.string().describe("Required. Example format: properties/1234"),
256
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaCustomDimension JSON request body. Top-level fields: description, disallowAdsPersonalization, displayName, name, parameterName, scope."),
257
+ fields: z.string().optional().describe('Response field mask.'),
258
+ },
259
+ });
260
+ registerGeneratedTool(registry, {
261
+ name: "analytics_properties_custom_dimensions_get",
262
+ cud: "read",
263
+ description: "Lookup for a single CustomDimension.",
264
+ method: { id: "analyticsadmin.properties.customDimensions.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
265
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
266
+ hasBody: false,
267
+ shape: {
268
+ account: accountField(),
269
+ name: z.string().describe("Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678"),
270
+ fields: z.string().optional().describe('Response field mask.'),
271
+ },
272
+ });
273
+ registerGeneratedTool(registry, {
274
+ name: "analytics_properties_custom_dimensions_list",
275
+ cud: "read",
276
+ description: "Lists CustomDimensions on a property.",
277
+ method: { id: "analyticsadmin.properties.customDimensions.list", httpMethod: "GET", path: "v1beta/{+parent}/customDimensions", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
278
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
279
+ hasBody: false,
280
+ shape: {
281
+ account: accountField(),
282
+ parent: z.string().describe("Required. Example format: properties/1234"),
283
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).").optional(),
284
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListCustomDimensions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomDimensions` mus").optional(),
285
+ fields: z.string().optional().describe('Response field mask.'),
286
+ },
287
+ });
288
+ registerGeneratedTool(registry, {
289
+ name: "analytics_properties_custom_dimensions_patch",
290
+ cud: "update",
291
+ description: "Updates a CustomDimension on a property.",
292
+ method: { id: "analyticsadmin.properties.customDimensions.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
293
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
294
+ hasBody: true,
295
+ shape: {
296
+ account: accountField(),
297
+ name: z.string().describe("Identifier. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}"),
298
+ updateMask: z.string().describe("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.").optional(),
299
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaCustomDimension JSON request body. Top-level fields: description, disallowAdsPersonalization, displayName, name, parameterName, scope."),
300
+ fields: z.string().optional().describe('Response field mask.'),
301
+ },
302
+ });
303
+ registerGeneratedTool(registry, {
304
+ name: "analytics_properties_custom_metrics_archive",
305
+ cud: "delete",
306
+ description: "Archives a CustomMetric on a property.",
307
+ method: { id: "analyticsadmin.properties.customMetrics.archive", httpMethod: "POST", path: "v1beta/{+name}:archive", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
308
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
309
+ hasBody: true,
310
+ shape: {
311
+ account: accountField(),
312
+ name: z.string().describe("Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678"),
313
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaArchiveCustomMetricRequest JSON request body."),
314
+ fields: z.string().optional().describe('Response field mask.'),
315
+ },
316
+ });
317
+ registerGeneratedTool(registry, {
318
+ name: "analytics_properties_custom_metrics_create",
319
+ cud: "create",
320
+ description: "Creates a CustomMetric.",
321
+ method: { id: "analyticsadmin.properties.customMetrics.create", httpMethod: "POST", path: "v1beta/{+parent}/customMetrics", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
322
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
323
+ hasBody: true,
324
+ shape: {
325
+ account: accountField(),
326
+ parent: z.string().describe("Required. Example format: properties/1234"),
327
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaCustomMetric JSON request body. Top-level fields: description, displayName, measurementUnit, name, parameterName, restrictedMetricType, scope."),
328
+ fields: z.string().optional().describe('Response field mask.'),
329
+ },
330
+ });
331
+ registerGeneratedTool(registry, {
332
+ name: "analytics_properties_custom_metrics_get",
333
+ cud: "read",
334
+ description: "Lookup for a single CustomMetric.",
335
+ method: { id: "analyticsadmin.properties.customMetrics.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
336
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
337
+ hasBody: false,
338
+ shape: {
339
+ account: accountField(),
340
+ name: z.string().describe("Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678"),
341
+ fields: z.string().optional().describe('Response field mask.'),
342
+ },
343
+ });
344
+ registerGeneratedTool(registry, {
345
+ name: "analytics_properties_custom_metrics_list",
346
+ cud: "read",
347
+ description: "Lists CustomMetrics on a property.",
348
+ method: { id: "analyticsadmin.properties.customMetrics.list", httpMethod: "GET", path: "v1beta/{+parent}/customMetrics", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
349
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
350
+ hasBody: false,
351
+ shape: {
352
+ account: accountField(),
353
+ parent: z.string().describe("Required. Example format: properties/1234"),
354
+ pageSize: z.number().describe("The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).").optional(),
355
+ pageToken: z.string().describe("A page token, received from a previous `ListCustomMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomMetrics` must match the call").optional(),
356
+ fields: z.string().optional().describe('Response field mask.'),
357
+ },
358
+ });
359
+ registerGeneratedTool(registry, {
360
+ name: "analytics_properties_custom_metrics_patch",
361
+ cud: "update",
362
+ description: "Updates a CustomMetric on a property.",
363
+ method: { id: "analyticsadmin.properties.customMetrics.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
364
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
365
+ hasBody: true,
366
+ shape: {
367
+ account: accountField(),
368
+ name: z.string().describe("Identifier. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}"),
369
+ updateMask: z.string().describe("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.").optional(),
370
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaCustomMetric JSON request body. Top-level fields: description, displayName, measurementUnit, name, parameterName, restrictedMetricType, scope."),
371
+ fields: z.string().optional().describe('Response field mask.'),
372
+ },
373
+ });
374
+ registerGeneratedTool(registry, {
375
+ name: "analytics_properties_data_streams_create",
376
+ cud: "create",
377
+ description: "Creates a DataStream.",
378
+ method: { id: "analyticsadmin.properties.dataStreams.create", httpMethod: "POST", path: "v1beta/{+parent}/dataStreams", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
379
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
380
+ hasBody: true,
381
+ shape: {
382
+ account: accountField(),
383
+ parent: z.string().describe("Required. Example format: properties/1234"),
384
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaDataStream JSON request body. Top-level fields: androidAppStreamData, createTime, displayName, iosAppStreamData, name, type, updateTime, webStreamData."),
385
+ fields: z.string().optional().describe('Response field mask.'),
386
+ },
387
+ });
388
+ registerGeneratedTool(registry, {
389
+ name: "analytics_properties_data_streams_delete",
390
+ cud: "delete",
391
+ description: "Deletes a DataStream on a property.",
392
+ method: { id: "analyticsadmin.properties.dataStreams.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
393
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
394
+ hasBody: false,
395
+ shape: {
396
+ account: accountField(),
397
+ name: z.string().describe("Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678"),
398
+ fields: z.string().optional().describe('Response field mask.'),
399
+ },
400
+ });
401
+ registerGeneratedTool(registry, {
402
+ name: "analytics_properties_data_streams_get",
403
+ cud: "read",
404
+ description: "Lookup for a single DataStream.",
405
+ method: { id: "analyticsadmin.properties.dataStreams.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
406
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
407
+ hasBody: false,
408
+ shape: {
409
+ account: accountField(),
410
+ name: z.string().describe("Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678"),
411
+ fields: z.string().optional().describe('Response field mask.'),
412
+ },
413
+ });
414
+ registerGeneratedTool(registry, {
415
+ name: "analytics_properties_data_streams_list",
416
+ cud: "read",
417
+ description: "Lists DataStreams on a property.",
418
+ method: { id: "analyticsadmin.properties.dataStreams.list", httpMethod: "GET", path: "v1beta/{+parent}/dataStreams", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
419
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
420
+ hasBody: false,
421
+ shape: {
422
+ account: accountField(),
423
+ parent: z.string().describe("Required. Example format: properties/1234"),
424
+ pageSize: z.number().describe("The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).").optional(),
425
+ pageToken: z.string().describe("A page token, received from a previous `ListDataStreams` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDataStreams` must match the call tha").optional(),
426
+ fields: z.string().optional().describe('Response field mask.'),
427
+ },
428
+ });
429
+ registerGeneratedTool(registry, {
430
+ name: "analytics_data_streams_measurement_protocol_secrets_create",
431
+ cud: "create",
432
+ description: "Creates a measurement protocol secret.",
433
+ method: { id: "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create", httpMethod: "POST", path: "v1beta/{+parent}/measurementProtocolSecrets", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
434
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
435
+ hasBody: true,
436
+ shape: {
437
+ account: accountField(),
438
+ parent: z.string().describe("Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}"),
439
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaMeasurementProtocolSecret JSON request body. Top-level fields: displayName, name, secretValue."),
440
+ fields: z.string().optional().describe('Response field mask.'),
441
+ },
442
+ });
443
+ registerGeneratedTool(registry, {
444
+ name: "analytics_data_streams_measurement_protocol_secrets_delete",
445
+ cud: "delete",
446
+ description: "Deletes target MeasurementProtocolSecret.",
447
+ method: { id: "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
448
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
449
+ hasBody: false,
450
+ shape: {
451
+ account: accountField(),
452
+ name: z.string().describe("Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}"),
453
+ fields: z.string().optional().describe('Response field mask.'),
454
+ },
455
+ });
456
+ registerGeneratedTool(registry, {
457
+ name: "analytics_data_streams_measurement_protocol_secrets_get",
458
+ cud: "read",
459
+ description: "Lookup for a single MeasurementProtocolSecret.",
460
+ method: { id: "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
461
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
462
+ hasBody: false,
463
+ shape: {
464
+ account: accountField(),
465
+ name: z.string().describe("Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}"),
466
+ fields: z.string().optional().describe('Response field mask.'),
467
+ },
468
+ });
469
+ registerGeneratedTool(registry, {
470
+ name: "analytics_data_streams_measurement_protocol_secrets_list",
471
+ cud: "read",
472
+ description: "Returns child MeasurementProtocolSecrets under the specified parent Property.",
473
+ method: { id: "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.list", httpMethod: "GET", path: "v1beta/{+parent}/measurementProtocolSecrets", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
474
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
475
+ hasBody: false,
476
+ shape: {
477
+ account: accountField(),
478
+ parent: z.string().describe("Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets"),
479
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.").optional(),
480
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListMeasurementProtocolSecrets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMeasurement").optional(),
481
+ fields: z.string().optional().describe('Response field mask.'),
482
+ },
483
+ });
484
+ registerGeneratedTool(registry, {
485
+ name: "analytics_data_streams_measurement_protocol_secrets_patch",
486
+ cud: "update",
487
+ description: "Updates a measurement protocol secret.",
488
+ method: { id: "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
489
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
490
+ hasBody: true,
491
+ shape: {
492
+ account: accountField(),
493
+ name: z.string().describe("Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret"),
494
+ updateMask: z.string().describe("Required. The list of fields to be updated. Omitted fields will not be updated.").optional(),
495
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaMeasurementProtocolSecret JSON request body. Top-level fields: displayName, name, secretValue."),
496
+ fields: z.string().optional().describe('Response field mask.'),
497
+ },
498
+ });
499
+ registerGeneratedTool(registry, {
500
+ name: "analytics_properties_data_streams_patch",
501
+ cud: "update",
502
+ description: "Updates a DataStream on a property.",
503
+ method: { id: "analyticsadmin.properties.dataStreams.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
504
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
505
+ hasBody: true,
506
+ shape: {
507
+ account: accountField(),
508
+ name: z.string().describe("Identifier. Resource name of this Data Stream. Format: properties/{property_id}/dataStreams/{stream_id} Example: \"properties/1000/dataStreams/2000\""),
509
+ updateMask: z.string().describe("Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"*\" to match all fields.").optional(),
510
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaDataStream JSON request body. Top-level fields: androidAppStreamData, createTime, displayName, iosAppStreamData, name, type, updateTime, webStreamData."),
511
+ fields: z.string().optional().describe('Response field mask.'),
512
+ },
513
+ });
514
+ registerGeneratedTool(registry, {
515
+ name: "analytics_properties_delete",
516
+ cud: "delete",
517
+ description: "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be r",
518
+ method: { id: "analyticsadmin.properties.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
519
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
520
+ hasBody: false,
521
+ shape: {
522
+ account: accountField(),
523
+ name: z.string().describe("Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\""),
524
+ fields: z.string().optional().describe('Response field mask.'),
525
+ },
526
+ });
527
+ registerGeneratedTool(registry, {
528
+ name: "analytics_properties_firebase_links_create",
529
+ cud: "create",
530
+ description: "Creates a FirebaseLink. Properties can have at most one FirebaseLink.",
531
+ method: { id: "analyticsadmin.properties.firebaseLinks.create", httpMethod: "POST", path: "v1beta/{+parent}/firebaseLinks", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
532
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
533
+ hasBody: true,
534
+ shape: {
535
+ account: accountField(),
536
+ parent: z.string().describe("Required. Format: properties/{property_id} Example: `properties/1234`"),
537
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaFirebaseLink JSON request body. Top-level fields: createTime, name, project."),
538
+ fields: z.string().optional().describe('Response field mask.'),
539
+ },
540
+ });
541
+ registerGeneratedTool(registry, {
542
+ name: "analytics_properties_firebase_links_delete",
543
+ cud: "delete",
544
+ description: "Deletes a FirebaseLink on a property",
545
+ method: { id: "analyticsadmin.properties.firebaseLinks.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
546
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
547
+ hasBody: false,
548
+ shape: {
549
+ account: accountField(),
550
+ name: z.string().describe("Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: `properties/1234/firebaseLinks/5678`"),
551
+ fields: z.string().optional().describe('Response field mask.'),
552
+ },
553
+ });
554
+ registerGeneratedTool(registry, {
555
+ name: "analytics_properties_firebase_links_list",
556
+ cud: "read",
557
+ description: "Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.",
558
+ method: { id: "analyticsadmin.properties.firebaseLinks.list", httpMethod: "GET", path: "v1beta/{+parent}/firebaseLinks", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
559
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
560
+ hasBody: false,
561
+ shape: {
562
+ account: accountField(),
563
+ parent: z.string().describe("Required. Format: properties/{property_id} Example: `properties/1234`"),
564
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximu").optional(),
565
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListFirebaseLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFirebaseLinks` must matc").optional(),
566
+ fields: z.string().optional().describe('Response field mask.'),
567
+ },
568
+ });
569
+ registerGeneratedTool(registry, {
570
+ name: "analytics_properties_get",
571
+ cud: "read",
572
+ description: "Lookup for a single GA Property.",
573
+ method: { id: "analyticsadmin.properties.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
574
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
575
+ hasBody: false,
576
+ shape: {
577
+ account: accountField(),
578
+ name: z.string().describe("Required. The name of the property to lookup. Format: properties/{property_id} Example: \"properties/1000\""),
579
+ fields: z.string().optional().describe('Response field mask.'),
580
+ },
581
+ });
582
+ registerGeneratedTool(registry, {
583
+ name: "analytics_properties_get_data_retention_settings",
584
+ cud: "read",
585
+ description: "Returns the singleton data retention settings for this property.",
586
+ method: { id: "analyticsadmin.properties.getDataRetentionSettings", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
587
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
588
+ hasBody: false,
589
+ shape: {
590
+ account: accountField(),
591
+ name: z.string().describe("Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: \"properties/1000/dataRetentionSettings\""),
592
+ fields: z.string().optional().describe('Response field mask.'),
593
+ },
594
+ });
595
+ registerGeneratedTool(registry, {
596
+ name: "analytics_properties_google_ads_links_create",
597
+ cud: "create",
598
+ description: "Creates a GoogleAdsLink.",
599
+ method: { id: "analyticsadmin.properties.googleAdsLinks.create", httpMethod: "POST", path: "v1beta/{+parent}/googleAdsLinks", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
600
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
601
+ hasBody: true,
602
+ shape: {
603
+ account: accountField(),
604
+ parent: z.string().describe("Required. Example format: properties/1234"),
605
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaGoogleAdsLink JSON request body. Top-level fields: adsPersonalizationEnabled, canManageClients, createTime, creatorEmailAddress, customerId, name, updateTime."),
606
+ fields: z.string().optional().describe('Response field mask.'),
607
+ },
608
+ });
609
+ registerGeneratedTool(registry, {
610
+ name: "analytics_properties_google_ads_links_delete",
611
+ cud: "delete",
612
+ description: "Deletes a GoogleAdsLink on a property",
613
+ method: { id: "analyticsadmin.properties.googleAdsLinks.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
614
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
615
+ hasBody: false,
616
+ shape: {
617
+ account: accountField(),
618
+ name: z.string().describe("Required. Example format: properties/1234/googleAdsLinks/5678"),
619
+ fields: z.string().optional().describe('Response field mask.'),
620
+ },
621
+ });
622
+ registerGeneratedTool(registry, {
623
+ name: "analytics_properties_google_ads_links_list",
624
+ cud: "read",
625
+ description: "Lists GoogleAdsLinks on a property.",
626
+ method: { id: "analyticsadmin.properties.googleAdsLinks.list", httpMethod: "GET", path: "v1beta/{+parent}/googleAdsLinks", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
627
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
628
+ hasBody: false,
629
+ shape: {
630
+ account: accountField(),
631
+ parent: z.string().describe("Required. Example format: properties/1234"),
632
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).").optional(),
633
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListGoogleAdsLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGoogleAdsLinks` must ma").optional(),
634
+ fields: z.string().optional().describe('Response field mask.'),
635
+ },
636
+ });
637
+ registerGeneratedTool(registry, {
638
+ name: "analytics_properties_google_ads_links_patch",
639
+ cud: "update",
640
+ description: "Updates a GoogleAdsLink on a property",
641
+ method: { id: "analyticsadmin.properties.googleAdsLinks.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
642
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
643
+ hasBody: true,
644
+ shape: {
645
+ account: accountField(),
646
+ name: z.string().describe("Identifier. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} Note: googleAdsLinkId is not the Google Ads customer ID."),
647
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string ").optional(),
648
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaGoogleAdsLink JSON request body. Top-level fields: adsPersonalizationEnabled, canManageClients, createTime, creatorEmailAddress, customerId, name, updateTime."),
649
+ fields: z.string().optional().describe('Response field mask.'),
650
+ },
651
+ });
652
+ registerGeneratedTool(registry, {
653
+ name: "analytics_properties_key_events_create",
654
+ cud: "create",
655
+ description: "Creates a Key Event.",
656
+ method: { id: "analyticsadmin.properties.keyEvents.create", httpMethod: "POST", path: "v1beta/{+parent}/keyEvents", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[0] },
657
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
658
+ hasBody: true,
659
+ shape: {
660
+ account: accountField(),
661
+ parent: z.string().describe("Required. The resource name of the parent property where this Key Event will be created. Format: properties/123"),
662
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaKeyEvent JSON request body. Top-level fields: countingMethod, createTime, custom, defaultValue, deletable, eventName, name."),
663
+ fields: z.string().optional().describe('Response field mask.'),
664
+ },
665
+ });
666
+ registerGeneratedTool(registry, {
667
+ name: "analytics_properties_key_events_delete",
668
+ cud: "delete",
669
+ description: "Deletes a Key Event.",
670
+ method: { id: "analyticsadmin.properties.keyEvents.delete", httpMethod: "DELETE", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
671
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
672
+ hasBody: false,
673
+ shape: {
674
+ account: accountField(),
675
+ name: z.string().describe("Required. The resource name of the Key Event to delete. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\""),
676
+ fields: z.string().optional().describe('Response field mask.'),
677
+ },
678
+ });
679
+ registerGeneratedTool(registry, {
680
+ name: "analytics_properties_key_events_get",
681
+ cud: "read",
682
+ description: "Retrieves a single Key Event.",
683
+ method: { id: "analyticsadmin.properties.keyEvents.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[1] },
684
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
685
+ hasBody: false,
686
+ shape: {
687
+ account: accountField(),
688
+ name: z.string().describe("Required. The resource name of the Key Event to retrieve. Format: properties/{property}/keyEvents/{key_event} Example: \"properties/123/keyEvents/456\""),
689
+ fields: z.string().optional().describe('Response field mask.'),
690
+ },
691
+ });
692
+ registerGeneratedTool(registry, {
693
+ name: "analytics_properties_key_events_list",
694
+ cud: "read",
695
+ description: "Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.",
696
+ method: { id: "analyticsadmin.properties.keyEvents.list", httpMethod: "GET", path: "v1beta/{+parent}/keyEvents", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsadmin_v1beta[1] },
697
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
698
+ hasBody: false,
699
+ shape: {
700
+ account: accountField(),
701
+ parent: z.string().describe("Required. The resource name of the parent property. Example: 'properties/123'"),
702
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)").optional(),
703
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListKeyEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListKeyEvents` must match the ca").optional(),
704
+ fields: z.string().optional().describe('Response field mask.'),
705
+ },
706
+ });
707
+ registerGeneratedTool(registry, {
708
+ name: "analytics_properties_key_events_patch",
709
+ cud: "update",
710
+ description: "Updates a Key Event.",
711
+ method: { id: "analyticsadmin.properties.keyEvents.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
712
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
713
+ hasBody: true,
714
+ shape: {
715
+ account: accountField(),
716
+ name: z.string().describe("Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}"),
717
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string ").optional(),
718
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaKeyEvent JSON request body. Top-level fields: countingMethod, createTime, custom, defaultValue, deletable, eventName, name."),
719
+ fields: z.string().optional().describe('Response field mask.'),
720
+ },
721
+ });
722
+ registerGeneratedTool(registry, {
723
+ name: "analytics_properties_list",
724
+ cud: "read",
725
+ description: "Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") proper",
726
+ method: { id: "analyticsadmin.properties.list", httpMethod: "GET", path: "v1beta/properties", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: [], scopes: S_analyticsadmin_v1beta[1] },
727
+ params: [{ "field": "filter", "api": "filter", "location": "query" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "showDeleted", "api": "showDeleted", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
728
+ hasBody: false,
729
+ shape: {
730
+ account: accountField(),
731
+ filter: z.string().describe("Required. An expression for filtering the results of the request. Fields eligible for filtering are: `parent:`(The resource name of the parent account/property) or `ancestor:`(The resource name of the").optional(),
732
+ pageSize: z.number().describe("Optional. The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximu").optional(),
733
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListProperties` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProperties` must match the ").optional(),
734
+ showDeleted: coerceBoolean.describe("Whether to include soft-deleted (ie: \"trashed\") Properties in the results. Properties can be inspected to determine whether they are deleted or not.").optional(),
735
+ fields: z.string().optional().describe('Response field mask.'),
736
+ },
737
+ });
738
+ registerGeneratedTool(registry, {
739
+ name: "analytics_properties_patch",
740
+ cud: "update",
741
+ description: "Updates a property.",
742
+ method: { id: "analyticsadmin.properties.patch", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
743
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
744
+ hasBody: true,
745
+ shape: {
746
+ account: accountField(),
747
+ name: z.string().describe("Identifier. Resource name of this property. Format: properties/{property_id} Example: \"properties/1000\""),
748
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string ").optional(),
749
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaProperty JSON request body. Top-level fields: account, createTime, currencyCode, deleteTime, displayName, expireTime, industryCategory, name, parent, propertyType, serviceLevel, timeZone, +1 more."),
750
+ fields: z.string().optional().describe('Response field mask.'),
751
+ },
752
+ });
753
+ registerGeneratedTool(registry, {
754
+ name: "analytics_properties_run_access_report",
755
+ cud: "read",
756
+ description: "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are re",
757
+ method: { id: "analyticsadmin.properties.runAccessReport", httpMethod: "POST", path: "v1beta/{+entity}:runAccessReport", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["entity"], scopes: S_analyticsadmin_v1beta[1] },
758
+ params: [{ "field": "entity", "api": "entity", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
759
+ hasBody: true,
760
+ shape: {
761
+ account: accountField(),
762
+ entity: z.string().describe("The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To r"),
763
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaRunAccessReportRequest JSON request body. Top-level fields: dateRanges, dimensionFilter, dimensions, expandGroups, includeAllUsers, limit, metricFilter, metrics, offset, orderBys, returnEntityQuota, timeZone."),
764
+ fields: z.string().optional().describe('Response field mask.'),
765
+ },
766
+ });
767
+ registerGeneratedTool(registry, {
768
+ name: "analytics_properties_update_data_retention_settings",
769
+ cud: "update",
770
+ description: "Updates the singleton data retention settings for this property.",
771
+ method: { id: "analyticsadmin.properties.updateDataRetentionSettings", httpMethod: "PATCH", path: "v1beta/{+name}", baseUrl: "https://analyticsadmin.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsadmin_v1beta[0] },
772
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "updateMask", "api": "updateMask", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
773
+ hasBody: true,
774
+ shape: {
775
+ account: accountField(),
776
+ name: z.string().describe("Identifier. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings"),
777
+ updateMask: z.string().describe("Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the entire entity, use one path with the string ").optional(),
778
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("GoogleAnalyticsAdminV1betaDataRetentionSettings JSON request body. Top-level fields: eventDataRetention, name, resetUserDataOnNewActivity, userDataRetention."),
779
+ fields: z.string().optional().describe('Response field mask.'),
780
+ },
781
+ });
782
+ // Interned method scope sets (shared across tools; see scope-observability).
783
+ const S_analyticsdata_v1beta = [
784
+ ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"],
785
+ ];
786
+ registerGeneratedTool(registry, {
787
+ name: "analytics_properties_audience_exports_create",
788
+ cud: "create",
789
+ description: "Creates an audience export for later retrieval. This method quickly returns the audience export's resource name and initiates a long running asynchronous reques",
790
+ method: { id: "analyticsdata.properties.audienceExports.create", httpMethod: "POST", path: "v1beta/{+parent}/audienceExports", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsdata_v1beta[0] },
791
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
792
+ hasBody: true,
793
+ shape: {
794
+ account: accountField(),
795
+ parent: z.string().describe("Required. The parent resource where this audience export will be created. Format: `properties/{property}`"),
796
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("AudienceExport JSON request body. Top-level fields: audience, audienceDisplayName, beginCreatingTime, creationQuotaTokensCharged, dimensions, errorMessage, name, percentageCompleted, rowCount, state."),
797
+ fields: z.string().optional().describe('Response field mask.'),
798
+ },
799
+ });
800
+ registerGeneratedTool(registry, {
801
+ name: "analytics_properties_audience_exports_get",
802
+ cud: "read",
803
+ description: "Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See [Creating",
804
+ method: { id: "analyticsdata.properties.audienceExports.get", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsdata_v1beta[0] },
805
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
806
+ hasBody: false,
807
+ shape: {
808
+ account: accountField(),
809
+ name: z.string().describe("Required. The audience export resource name. Format: `properties/{property}/audienceExports/{audience_export}`"),
810
+ fields: z.string().optional().describe('Response field mask.'),
811
+ },
812
+ });
813
+ registerGeneratedTool(registry, {
814
+ name: "analytics_properties_audience_exports_list",
815
+ cud: "read",
816
+ description: "Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audi",
817
+ method: { id: "analyticsdata.properties.audienceExports.list", httpMethod: "GET", path: "v1beta/{+parent}/audienceExports", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["parent"], scopes: S_analyticsdata_v1beta[0] },
818
+ params: [{ "field": "parent", "api": "parent", "location": "path" }, { "field": "pageSize", "api": "pageSize", "location": "query" }, { "field": "pageToken", "api": "pageToken", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
819
+ hasBody: false,
820
+ shape: {
821
+ account: accountField(),
822
+ parent: z.string().describe("Required. All audience exports for this property will be listed in the response. Format: `properties/{property}`"),
823
+ pageSize: z.number().describe("Optional. The maximum number of audience exports to return. The service may return fewer than this value. If unspecified, at most 200 audience exports will be returned. The maximum value is 1000 (high").optional(),
824
+ pageToken: z.string().describe("Optional. A page token, received from a previous `ListAudienceExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAudienceExports` must ").optional(),
825
+ fields: z.string().optional().describe('Response field mask.'),
826
+ },
827
+ });
828
+ registerGeneratedTool(registry, {
829
+ name: "analytics_properties_audience_exports_query",
830
+ cud: "read",
831
+ description: "Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to `CreateAudienceExp",
832
+ method: { id: "analyticsdata.properties.audienceExports.query", httpMethod: "POST", path: "v1beta/{+name}:query", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsdata_v1beta[0] },
833
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
834
+ hasBody: true,
835
+ shape: {
836
+ account: accountField(),
837
+ name: z.string().describe("Required. The name of the audience export to retrieve users from. Format: `properties/{property}/audienceExports/{audience_export}`"),
838
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("QueryAudienceExportRequest JSON request body. Top-level fields: limit, offset."),
839
+ fields: z.string().optional().describe('Response field mask.'),
840
+ },
841
+ });
842
+ registerGeneratedTool(registry, {
843
+ name: "analytics_properties_batch_run_pivot_reports",
844
+ cud: "read",
845
+ description: "Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.",
846
+ method: { id: "analyticsdata.properties.batchRunPivotReports", httpMethod: "POST", path: "v1beta/{+property}:batchRunPivotReports", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
847
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
848
+ hasBody: true,
849
+ shape: {
850
+ account: accountField(),
851
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics"),
852
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("BatchRunPivotReportsRequest JSON request body. Top-level fields: requests."),
853
+ fields: z.string().optional().describe('Response field mask.'),
854
+ },
855
+ });
856
+ registerGeneratedTool(registry, {
857
+ name: "analytics_properties_batch_run_reports",
858
+ cud: "read",
859
+ description: "Returns multiple reports in a batch. All reports must be for the same Google Analytics property.",
860
+ method: { id: "analyticsdata.properties.batchRunReports", httpMethod: "POST", path: "v1beta/{+property}:batchRunReports", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
861
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
862
+ hasBody: true,
863
+ shape: {
864
+ account: accountField(),
865
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics"),
866
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("BatchRunReportsRequest JSON request body. Top-level fields: requests."),
867
+ fields: z.string().optional().describe('Response field mask.'),
868
+ },
869
+ });
870
+ registerGeneratedTool(registry, {
871
+ name: "analytics_properties_check_compatibility",
872
+ cud: "read",
873
+ description: "This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dime",
874
+ method: { id: "analyticsdata.properties.checkCompatibility", httpMethod: "POST", path: "v1beta/{+property}:checkCompatibility", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
875
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
876
+ hasBody: true,
877
+ shape: {
878
+ account: accountField(),
879
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `"),
880
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("CheckCompatibilityRequest JSON request body. Top-level fields: compatibilityFilter, dimensionFilter, dimensions, metricFilter, metrics."),
881
+ fields: z.string().optional().describe('Response field mask.'),
882
+ },
883
+ });
884
+ registerGeneratedTool(registry, {
885
+ name: "analytics_properties_get_metadata",
886
+ cud: "read",
887
+ description: "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics prope",
888
+ method: { id: "analyticsdata.properties.getMetadata", httpMethod: "GET", path: "v1beta/{+name}", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["name"], scopes: S_analyticsdata_v1beta[0] },
889
+ params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
890
+ hasBody: false,
891
+ shape: {
892
+ account: accountField(),
893
+ name: z.string().describe("Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more,"),
894
+ fields: z.string().optional().describe('Response field mask.'),
895
+ },
896
+ });
897
+ registerGeneratedTool(registry, {
898
+ name: "analytics_properties_run_pivot_report",
899
+ cud: "read",
900
+ description: "Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot r",
901
+ method: { id: "analyticsdata.properties.runPivotReport", httpMethod: "POST", path: "v1beta/{+property}:runPivotReport", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
902
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
903
+ hasBody: true,
904
+ shape: {
905
+ account: accountField(),
906
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics"),
907
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("RunPivotReportRequest JSON request body. Top-level fields: cohortSpec, comparisons, currencyCode, dateRanges, dimensionFilter, dimensions, keepEmptyRows, metricFilter, metrics, pivots, property, returnPropertyQuota."),
908
+ fields: z.string().optional().describe('Response field mask.'),
909
+ },
910
+ });
911
+ registerGeneratedTool(registry, {
912
+ name: "analytics_properties_run_realtime_report",
913
+ cud: "read",
914
+ description: "Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytic",
915
+ method: { id: "analyticsdata.properties.runRealtimeReport", httpMethod: "POST", path: "v1beta/{+property}:runRealtimeReport", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
916
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
917
+ hasBody: true,
918
+ shape: {
919
+ account: accountField(),
920
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics"),
921
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("RunRealtimeReportRequest JSON request body. Top-level fields: dimensionFilter, dimensions, limit, metricAggregations, metricFilter, metrics, minuteRanges, orderBys, returnPropertyQuota."),
922
+ fields: z.string().optional().describe('Response field mask.'),
923
+ },
924
+ });
925
+ registerGeneratedTool(registry, {
926
+ name: "analytics_properties_run_report",
927
+ cud: "read",
928
+ description: "Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. T",
929
+ method: { id: "analyticsdata.properties.runReport", httpMethod: "POST", path: "v1beta/{+property}:runReport", baseUrl: "https://analyticsdata.googleapis.com/", requiredParams: ["property"], scopes: S_analyticsdata_v1beta[0] },
930
+ params: [{ "field": "property", "api": "property", "location": "path" }, { "field": "fields", "api": "fields", "location": "query" }],
931
+ hasBody: true,
932
+ shape: {
933
+ account: accountField(),
934
+ property: z.string().describe("A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics"),
935
+ body: coerceJson(z.record(z.string(), z.unknown())).describe("RunReportRequest JSON request body. Top-level fields: cohortSpec, comparisons, currencyCode, dateRanges, dimensionFilter, dimensions, keepEmptyRows, limit, metricAggregations, metricFilter, metrics, offset, +3 more."),
936
+ fields: z.string().optional().describe('Response field mask.'),
937
+ },
938
+ });
939
+ }
@@ -15,7 +15,7 @@ export function registerCloudsearchGeneratedTools(registry) {
15
15
  ];
16
16
  registerGeneratedTool(registry, {
17
17
  name: "cloudsearch_debug_datasources_items_check_access",
18
- cud: "create",
18
+ cud: "read",
19
19
  description: "Checks whether an item is accessible by specified principal. Principal must be a user; groups and domain values aren't supported. **Note:** This API requires an",
20
20
  method: { id: "cloudsearch.debug.datasources.items.checkAccess", httpMethod: "POST", path: "v1/debug/{+name}:checkAccess", baseUrl: "https://cloudsearch.googleapis.com/", requiredParams: ["name"], scopes: S_cloudsearch_v1[0] },
21
21
  params: [{ "field": "name", "api": "name", "location": "path" }, { "field": "debugOptions.enableDebugging", "api": "debugOptions.enableDebugging", "location": "query" }, { "field": "fields", "api": "fields", "location": "query" }],
@@ -1,4 +1,5 @@
1
1
  import { registerAdminGeneratedTools } from './admin.js';
2
+ import { registerAnalyticsGeneratedTools } from './analytics.js';
2
3
  import { registerAppsmarketGeneratedTools } from './appsmarket.js';
3
4
  import { registerCalendarGeneratedTools } from './calendar.js';
4
5
  import { registerChatGeneratedTools } from './chat.js';
@@ -26,6 +27,7 @@ import { registerVaultGeneratedTools } from './vault.js';
26
27
  import { registerWorkspaceeventsGeneratedTools } from './workspaceevents.js';
27
28
  export const GENERATED_SERVICES = [
28
29
  { name: "admin", register: registerAdminGeneratedTools },
30
+ { name: "analytics", register: registerAnalyticsGeneratedTools },
29
31
  { name: "appsmarket", register: registerAppsmarketGeneratedTools },
30
32
  { name: "calendar", register: registerCalendarGeneratedTools },
31
33
  { name: "chat", register: registerChatGeneratedTools },
@@ -29,6 +29,8 @@ const SERVICE_FOR_ALIAS = {
29
29
  admin_reports: 'admin',
30
30
  admin_datatransfer: 'admin',
31
31
  groupssettings: 'groupssettings',
32
+ analyticsadmin: 'analytics',
33
+ analyticsdata: 'analytics',
32
34
  };
33
35
  /** Up to three closest known ids for the unknown_method did-you-mean hint;
34
36
  * bounded distance so unrelated ids never masquerade as suggestions. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-google-multi",
3
- "version": "6.0.0-alpha.11",
3
+ "version": "6.0.0-alpha.12",
4
4
  "description": "Local MCP server for Google Workspace (Gmail, Drive, Calendar, Sheets, Docs, Contacts, Tasks, Meet, Search Console, +Forms/Chat/Admin) across multiple accounts — OAuth-only, encrypted token storage, deny-by-default writes.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,7 +58,8 @@
58
58
  "gen:discovery": "tsx scripts/fetch-discovery.ts",
59
59
  "gen:tools": "tsx scripts/gen-tools.ts",
60
60
  "gen:coverage": "tsx scripts/gen-coverage.ts",
61
- "pack:mcpb": "mcpb pack . mcp-google-multi.mcpb"
61
+ "pack:mcpb": "mcpb pack . mcp-google-multi.mcpb",
62
+ "bundle": "esbuild dist/index.js --bundle --platform=node --format=esm --outfile=bundle/index.js --external:@napi-rs/keyring --banner:js=\"import{createRequire as __dockerCR}from'node:module';var require=__dockerCR(import.meta.url);\" --log-level=warning"
62
63
  },
63
64
  "dependencies": {
64
65
  "@googleapis/admin": "^37.0.0",
@@ -88,12 +89,14 @@
88
89
  "devDependencies": {
89
90
  "@anthropic-ai/mcpb": "^2.1.2",
90
91
  "@eslint/js": "^10.0.1",
92
+ "@semantic-release/exec": "^7.1.0",
91
93
  "@types/js-yaml": "^4.0.9",
92
94
  "@types/markdown-it": "^14.1.2",
93
95
  "@types/mime-types": "^3.0.1",
94
96
  "@types/node": "^22.20.1",
95
97
  "@types/nodemailer": "^8.0.1",
96
98
  "@types/turndown": "^5.0.6",
99
+ "esbuild": "^0.28.2",
97
100
  "eslint": "^10.2.1",
98
101
  "js-yaml": "^4.3.2",
99
102
  "semantic-release": "^25.0.3",