mcp-google-multi 6.0.0-beta.1 → 6.0.0-beta.3
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 +5 -3
- package/dist/accounts.d.ts +22 -1
- package/dist/accounts.js +64 -16
- package/dist/api-probe.d.ts +5 -0
- package/dist/api-probe.js +23 -15
- package/dist/arg-normalize.d.ts +61 -4
- package/dist/arg-normalize.js +229 -4
- package/dist/arg-strict.d.ts +61 -0
- package/dist/arg-strict.js +193 -0
- package/dist/auth.d.ts +4 -3
- package/dist/auth.js +26 -85
- package/dist/boot-gates.d.ts +26 -0
- package/dist/boot-gates.js +38 -0
- package/dist/cimd-cache.d.ts +38 -0
- package/dist/cimd-cache.js +117 -0
- package/dist/client.d.ts +32 -2
- package/dist/client.js +0 -0
- package/dist/compose.d.ts +11 -0
- package/dist/compose.js +109 -0
- package/dist/config-file.d.ts +14 -0
- package/dist/config-file.js +41 -1
- package/dist/discover.js +38 -15
- package/dist/discovery-client.d.ts +11 -1
- package/dist/discovery-client.js +120 -18
- package/dist/doctor.d.ts +15 -3
- package/dist/doctor.js +151 -27
- package/dist/env-load.d.ts +11 -0
- package/dist/env-load.js +23 -1
- package/dist/executor.d.ts +3 -0
- package/dist/executor.js +16 -3
- package/dist/fanout.d.ts +9 -1
- package/dist/fanout.js +83 -14
- package/dist/fs-atomic.d.ts +11 -0
- package/dist/fs-atomic.js +219 -28
- package/dist/hint-provider.d.ts +129 -0
- package/dist/hint-provider.js +64 -0
- package/dist/http-transport.d.ts +73 -6
- package/dist/http-transport.js +350 -26
- package/dist/identity.d.ts +4 -1
- package/dist/identity.js +25 -6
- package/dist/index.js +142 -114
- package/dist/master-key.js +13 -5
- package/dist/mcp-token.d.ts +136 -19
- package/dist/mcp-token.js +569 -72
- package/dist/metrics-cli.d.ts +21 -0
- package/dist/metrics-cli.js +206 -0
- package/dist/metrics-tap.d.ts +12 -0
- package/dist/metrics-tap.js +95 -0
- package/dist/migrate-config.js +2 -2
- package/dist/oauth-as.d.ts +103 -3
- package/dist/oauth-as.js +374 -79
- package/dist/oauth-consent.d.ts +35 -10
- package/dist/oauth-consent.js +101 -39
- package/dist/outbound-allowlist.d.ts +34 -0
- package/dist/outbound-allowlist.js +111 -0
- package/dist/reauth-hint.d.ts +1 -1
- package/dist/reauth-hint.js +12 -8
- package/dist/registry-transfer.d.ts +5 -0
- package/dist/registry-transfer.js +65 -5
- package/dist/registry.d.ts +66 -2
- package/dist/registry.js +214 -18
- package/dist/scope-catalog.d.ts +11 -0
- package/dist/scope-catalog.js +39 -6
- package/dist/scope-observability.d.ts +8 -6
- package/dist/scope-observability.js +29 -13
- package/dist/services.d.ts +17 -4
- package/dist/services.js +77 -6
- package/dist/setup-prompt.d.ts +1 -1
- package/dist/setup-prompt.js +1 -1
- package/dist/ssrf-guard.d.ts +23 -9
- package/dist/ssrf-guard.js +101 -62
- package/dist/tenant-purge.d.ts +26 -0
- package/dist/tenant-purge.js +67 -0
- package/dist/token-store.d.ts +20 -2
- package/dist/token-store.js +0 -0
- package/dist/tools/_coerce.d.ts +5 -0
- package/dist/tools/_coerce.js +11 -0
- package/dist/tools/_errors.d.ts +34 -3
- package/dist/tools/_errors.js +346 -53
- package/dist/tools/_local-files.d.ts +9 -0
- package/dist/tools/_local-files.js +25 -2
- package/dist/tools/account-wizard.d.ts +34 -2
- package/dist/tools/account-wizard.js +223 -65
- package/dist/tools/accounts-tool.d.ts +7 -0
- package/dist/tools/accounts-tool.js +34 -18
- package/dist/tools/admin.d.ts +10 -1
- package/dist/tools/admin.js +21 -16
- package/dist/tools/analytics.d.ts +27 -0
- package/dist/tools/analytics.js +289 -0
- package/dist/tools/calendar.d.ts +9 -1
- package/dist/tools/calendar.js +93 -29
- package/dist/tools/chat.d.ts +10 -1
- package/dist/tools/chat.js +20 -12
- package/dist/tools/contacts.d.ts +2 -1
- package/dist/tools/contacts.js +74 -43
- package/dist/tools/docs.d.ts +2 -1
- package/dist/tools/docs.js +90 -84
- package/dist/tools/drive.d.ts +2 -1
- package/dist/tools/drive.js +197 -120
- package/dist/tools/forms.d.ts +10 -1
- package/dist/tools/forms.js +26 -19
- package/dist/tools/generated/_shared.d.ts +8 -1
- package/dist/tools/generated/_shared.js +18 -4
- package/dist/tools/generated/admin.d.ts +2 -1
- package/dist/tools/generated/admin.js +610 -479
- package/dist/tools/generated/analytics.d.ts +3 -0
- package/dist/tools/generated/analytics.js +981 -0
- package/dist/tools/generated/appsmarket.d.ts +2 -1
- package/dist/tools/generated/appsmarket.js +9 -9
- package/dist/tools/generated/calendar.d.ts +2 -1
- package/dist/tools/generated/calendar.js +83 -83
- package/dist/tools/generated/chat.d.ts +2 -1
- package/dist/tools/generated/chat.js +178 -151
- package/dist/tools/generated/classroom.d.ts +2 -1
- package/dist/tools/generated/classroom.js +467 -425
- package/dist/tools/generated/cloudidentity.d.ts +2 -1
- package/dist/tools/generated/cloudidentity.js +209 -201
- package/dist/tools/generated/cloudsearch.d.ts +2 -1
- package/dist/tools/generated/cloudsearch.js +139 -138
- package/dist/tools/generated/contacts.d.ts +2 -1
- package/dist/tools/generated/contacts.js +49 -40
- package/dist/tools/generated/drive.d.ts +2 -1
- package/dist/tools/generated/drive.js +133 -124
- package/dist/tools/generated/driveactivity.d.ts +2 -1
- package/dist/tools/generated/driveactivity.js +3 -3
- package/dist/tools/generated/drivelabels.d.ts +2 -1
- package/dist/tools/generated/drivelabels.js +113 -85
- package/dist/tools/generated/forms.d.ts +2 -1
- package/dist/tools/generated/forms.js +14 -14
- package/dist/tools/generated/gmail.d.ts +2 -1
- package/dist/tools/generated/gmail.js +253 -226
- package/dist/tools/generated/groupsmigration.d.ts +2 -1
- package/dist/tools/generated/groupsmigration.js +4 -4
- package/dist/tools/generated/groupssettings.d.ts +2 -1
- package/dist/tools/generated/groupssettings.js +10 -10
- package/dist/tools/generated/index.d.ts +2 -1
- package/dist/tools/generated/index.js +2 -0
- package/dist/tools/generated/keep.d.ts +2 -1
- package/dist/tools/generated/keep.js +23 -22
- package/dist/tools/generated/licensing.d.ts +2 -1
- package/dist/tools/generated/licensing.js +54 -38
- package/dist/tools/generated/meet.d.ts +2 -1
- package/dist/tools/generated/meet.js +41 -41
- package/dist/tools/generated/method-map.d.ts +2 -0
- package/dist/tools/generated/method-map.js +894 -0
- package/dist/tools/generated/postmaster.d.ts +2 -1
- package/dist/tools/generated/postmaster.js +12 -12
- package/dist/tools/generated/reseller.d.ts +2 -1
- package/dist/tools/generated/reseller.js +69 -63
- package/dist/tools/generated/script.d.ts +2 -1
- package/dist/tools/generated/script.js +62 -52
- package/dist/tools/generated/searchconsole.d.ts +2 -1
- package/dist/tools/generated/searchconsole.js +8 -6
- package/dist/tools/generated/sheets.d.ts +2 -1
- package/dist/tools/generated/sheets.js +25 -24
- package/dist/tools/generated/tasks.d.ts +2 -1
- package/dist/tools/generated/tasks.js +15 -9
- package/dist/tools/generated/vault.d.ts +2 -1
- package/dist/tools/generated/vault.js +132 -123
- package/dist/tools/generated/workspaceevents.d.ts +2 -1
- package/dist/tools/generated/workspaceevents.js +48 -47
- package/dist/tools/gmail.d.ts +12 -2
- package/dist/tools/gmail.js +95 -51
- package/dist/tools/google-api.d.ts +2 -3
- package/dist/tools/google-api.js +76 -33
- package/dist/tools/meet.d.ts +10 -1
- package/dist/tools/meet.js +18 -11
- package/dist/tools/searchconsole.d.ts +2 -1
- package/dist/tools/searchconsole.js +27 -23
- package/dist/tools/sheets.d.ts +2 -1
- package/dist/tools/sheets.js +72 -80
- package/dist/tools/slides.d.ts +10 -1
- package/dist/tools/slides.js +23 -16
- package/dist/tools/tasks.d.ts +2 -1
- package/dist/tools/tasks.js +35 -31
- package/dist/trim.d.ts +26 -0
- package/dist/trim.js +67 -0
- package/dist/usage-metrics.d.ts +178 -0
- package/dist/usage-metrics.js +621 -0
- package/dist/write-control.d.ts +27 -1
- package/dist/write-control.js +99 -12
- package/package.json +34 -3
package/dist/tools/meet.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { meet as meetClient } from '@googleapis/meet';
|
|
3
|
-
import {
|
|
3
|
+
import { accountArgLive } from '../accounts.js';
|
|
4
4
|
import { getClient } from '../client.js';
|
|
5
5
|
import { handleGoogleApiError } from './_errors.js';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export function registerMeetTools(server, deps = {}) {
|
|
7
|
+
// Per-registry, LIVE account enum + injectable client (S1.10): the
|
|
8
|
+
// schema follows the registry's account view at parse time, and the
|
|
9
|
+
// custody path is the context's, not the process global.
|
|
10
|
+
const accountEnum = accountArgLive(() => server.accountAliases()).optional();
|
|
11
|
+
const getClientFn = deps.getClientFn ?? getClient;
|
|
8
12
|
// ─── Conference records (past meetings) ────────────────────────────────
|
|
9
13
|
server.registerTool('meet_conference_records_list', {
|
|
10
14
|
description: 'List past conference records (completed Meet sessions) the user has access to',
|
|
@@ -16,7 +20,7 @@ export function registerMeetTools(server) {
|
|
|
16
20
|
},
|
|
17
21
|
}, async ({ account, pageSize, pageToken, filter }) => {
|
|
18
22
|
try {
|
|
19
|
-
const auth = await
|
|
23
|
+
const auth = await getClientFn(account);
|
|
20
24
|
const meet = meetClient({ version: 'v2', auth });
|
|
21
25
|
const res = await meet.conferenceRecords.list({
|
|
22
26
|
pageSize: pageSize ?? 20,
|
|
@@ -35,11 +39,11 @@ export function registerMeetTools(server) {
|
|
|
35
39
|
description: 'Get a single conference record by resource name (e.g. conferenceRecords/abc123)',
|
|
36
40
|
inputSchema: {
|
|
37
41
|
account: accountEnum.describe('Google account alias'),
|
|
38
|
-
name: z.string().describe('Resource name, format: conferenceRecords/{conference_record}'),
|
|
42
|
+
name: z.string().min(1).describe('Resource name, format: conferenceRecords/{conference_record}'),
|
|
39
43
|
},
|
|
40
44
|
}, async ({ account, name }) => {
|
|
41
45
|
try {
|
|
42
|
-
const auth = await
|
|
46
|
+
const auth = await getClientFn(account);
|
|
43
47
|
const meet = meetClient({ version: 'v2', auth });
|
|
44
48
|
const res = await meet.conferenceRecords.get({ name });
|
|
45
49
|
return {
|
|
@@ -61,7 +65,7 @@ export function registerMeetTools(server) {
|
|
|
61
65
|
},
|
|
62
66
|
}, async ({ account, parent, pageSize, pageToken }) => {
|
|
63
67
|
try {
|
|
64
|
-
const auth = await
|
|
68
|
+
const auth = await getClientFn(account);
|
|
65
69
|
const meet = meetClient({ version: 'v2', auth });
|
|
66
70
|
const res = await meet.conferenceRecords.recordings.list({
|
|
67
71
|
parent,
|
|
@@ -87,7 +91,7 @@ export function registerMeetTools(server) {
|
|
|
87
91
|
},
|
|
88
92
|
}, async ({ account, parent, pageSize, pageToken }) => {
|
|
89
93
|
try {
|
|
90
|
-
const auth = await
|
|
94
|
+
const auth = await getClientFn(account);
|
|
91
95
|
const meet = meetClient({ version: 'v2', auth });
|
|
92
96
|
const res = await meet.conferenceRecords.transcripts.list({
|
|
93
97
|
parent,
|
|
@@ -112,7 +116,7 @@ export function registerMeetTools(server) {
|
|
|
112
116
|
},
|
|
113
117
|
}, async ({ account, parent, pageSize, pageToken }) => {
|
|
114
118
|
try {
|
|
115
|
-
const auth = await
|
|
119
|
+
const auth = await getClientFn(account);
|
|
116
120
|
const meet = meetClient({ version: 'v2', auth });
|
|
117
121
|
const res = await meet.conferenceRecords.transcripts.entries.list({
|
|
118
122
|
parent,
|
|
@@ -128,6 +132,9 @@ export function registerMeetTools(server) {
|
|
|
128
132
|
}
|
|
129
133
|
});
|
|
130
134
|
}
|
|
131
|
-
function handleMeetError(error, account) {
|
|
132
|
-
return handleGoogleApiError(error, account,
|
|
135
|
+
export function handleMeetError(error, account) {
|
|
136
|
+
return handleGoogleApiError(error, account, {
|
|
137
|
+
scope: 'Meet needs the meetings.space.readonly scope and the Google Meet API enabled in Cloud Console. Confirm both for this account.',
|
|
138
|
+
resource: `Meet denied this conference record to "${account}". Meet exposes records only to the organizer or a participant, so check which account hosted the meeting.`,
|
|
139
|
+
});
|
|
133
140
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { ToolRegistry } from '../registry.js';
|
|
2
|
-
|
|
2
|
+
import { type CuratedToolDeps } from '../client.js';
|
|
3
|
+
export declare function registerSearchConsoleTools(server: ToolRegistry, deps?: CuratedToolDeps): void;
|
|
@@ -2,11 +2,15 @@ import { z } from 'zod';
|
|
|
2
2
|
import { coerceArray, coerceJson } from './_coerce.js';
|
|
3
3
|
import { searchconsole as searchconsoleClient } from '@googleapis/searchconsole';
|
|
4
4
|
import { webmasters as webmastersClient } from '@googleapis/webmasters';
|
|
5
|
-
import {
|
|
5
|
+
import { accountArgLive } from '../accounts.js';
|
|
6
6
|
import { getClient } from '../client.js';
|
|
7
7
|
import { handleGoogleApiError } from './_errors.js';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export function registerSearchConsoleTools(server, deps = {}) {
|
|
9
|
+
// Per-registry, LIVE account enum + injectable client (S1.10): the
|
|
10
|
+
// schema follows the registry's account view at parse time, and the
|
|
11
|
+
// custody path is the context's, not the process global.
|
|
12
|
+
const accountEnum = accountArgLive(() => server.accountAliases()).optional();
|
|
13
|
+
const getClientFn = deps.getClientFn ?? getClient;
|
|
10
14
|
// ─── Sites ───────────────────────────────────────────────
|
|
11
15
|
server.registerTool('searchconsole_sites_list', {
|
|
12
16
|
description: 'List all sites (properties) the account has access to in Google Search Console',
|
|
@@ -15,7 +19,7 @@ export function registerSearchConsoleTools(server) {
|
|
|
15
19
|
},
|
|
16
20
|
}, async ({ account }) => {
|
|
17
21
|
try {
|
|
18
|
-
const auth = await
|
|
22
|
+
const auth = await getClientFn(account);
|
|
19
23
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
20
24
|
const res = await wm.sites.list();
|
|
21
25
|
return {
|
|
@@ -30,11 +34,11 @@ export function registerSearchConsoleTools(server) {
|
|
|
30
34
|
description: 'Get details for a specific site (property) in Google Search Console',
|
|
31
35
|
inputSchema: {
|
|
32
36
|
account: accountEnum.describe('Google account alias'),
|
|
33
|
-
siteUrl: z.string().describe('Site URL exactly as it appears in Search Console (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
37
|
+
siteUrl: z.string().min(1).describe('Site URL exactly as it appears in Search Console (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
34
38
|
},
|
|
35
39
|
}, async ({ account, siteUrl }) => {
|
|
36
40
|
try {
|
|
37
|
-
const auth = await
|
|
41
|
+
const auth = await getClientFn(account);
|
|
38
42
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
39
43
|
const res = await wm.sites.get({ siteUrl });
|
|
40
44
|
return {
|
|
@@ -49,11 +53,11 @@ export function registerSearchConsoleTools(server) {
|
|
|
49
53
|
description: 'Add a site (property) to Google Search Console. You still need to verify ownership separately.',
|
|
50
54
|
inputSchema: {
|
|
51
55
|
account: accountEnum.describe('Google account alias'),
|
|
52
|
-
siteUrl: z.string().describe('Site URL to add (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
56
|
+
siteUrl: z.string().min(1).describe('Site URL to add (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
53
57
|
},
|
|
54
58
|
}, async ({ account, siteUrl }) => {
|
|
55
59
|
try {
|
|
56
|
-
const auth = await
|
|
60
|
+
const auth = await getClientFn(account);
|
|
57
61
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
58
62
|
await wm.sites.add({ siteUrl });
|
|
59
63
|
return {
|
|
@@ -68,11 +72,11 @@ export function registerSearchConsoleTools(server) {
|
|
|
68
72
|
description: 'Remove a site (property) from Google Search Console',
|
|
69
73
|
inputSchema: {
|
|
70
74
|
account: accountEnum.describe('Google account alias'),
|
|
71
|
-
siteUrl: z.string().describe('Site URL to remove'),
|
|
75
|
+
siteUrl: z.string().min(1).describe('Site URL to remove'),
|
|
72
76
|
},
|
|
73
77
|
}, async ({ account, siteUrl }) => {
|
|
74
78
|
try {
|
|
75
|
-
const auth = await
|
|
79
|
+
const auth = await getClientFn(account);
|
|
76
80
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
77
81
|
await wm.sites.delete({ siteUrl });
|
|
78
82
|
return {
|
|
@@ -88,11 +92,11 @@ export function registerSearchConsoleTools(server) {
|
|
|
88
92
|
description: 'List all sitemaps submitted for a site in Google Search Console',
|
|
89
93
|
inputSchema: {
|
|
90
94
|
account: accountEnum.describe('Google account alias'),
|
|
91
|
-
siteUrl: z.string().describe('Site URL (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
95
|
+
siteUrl: z.string().min(1).describe('Site URL (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
92
96
|
},
|
|
93
97
|
}, async ({ account, siteUrl }) => {
|
|
94
98
|
try {
|
|
95
|
-
const auth = await
|
|
99
|
+
const auth = await getClientFn(account);
|
|
96
100
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
97
101
|
const res = await wm.sitemaps.list({ siteUrl });
|
|
98
102
|
return {
|
|
@@ -107,12 +111,12 @@ export function registerSearchConsoleTools(server) {
|
|
|
107
111
|
description: 'Get details for a specific sitemap submitted to Google Search Console',
|
|
108
112
|
inputSchema: {
|
|
109
113
|
account: accountEnum.describe('Google account alias'),
|
|
110
|
-
siteUrl: z.string().describe('Site URL'),
|
|
114
|
+
siteUrl: z.string().min(1).describe('Site URL'),
|
|
111
115
|
feedpath: z.string().describe('Full URL of the sitemap (e.g. "https://example.com/sitemap.xml")'),
|
|
112
116
|
},
|
|
113
117
|
}, async ({ account, siteUrl, feedpath }) => {
|
|
114
118
|
try {
|
|
115
|
-
const auth = await
|
|
119
|
+
const auth = await getClientFn(account);
|
|
116
120
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
117
121
|
const res = await wm.sitemaps.get({ siteUrl, feedpath });
|
|
118
122
|
return {
|
|
@@ -127,12 +131,12 @@ export function registerSearchConsoleTools(server) {
|
|
|
127
131
|
description: 'Submit a sitemap to Google Search Console for a site',
|
|
128
132
|
inputSchema: {
|
|
129
133
|
account: accountEnum.describe('Google account alias'),
|
|
130
|
-
siteUrl: z.string().describe('Site URL'),
|
|
134
|
+
siteUrl: z.string().min(1).describe('Site URL'),
|
|
131
135
|
feedpath: z.string().describe('Full URL of the sitemap to submit (e.g. "https://example.com/sitemap.xml")'),
|
|
132
136
|
},
|
|
133
137
|
}, async ({ account, siteUrl, feedpath }) => {
|
|
134
138
|
try {
|
|
135
|
-
const auth = await
|
|
139
|
+
const auth = await getClientFn(account);
|
|
136
140
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
137
141
|
await wm.sitemaps.submit({ siteUrl, feedpath });
|
|
138
142
|
return {
|
|
@@ -147,12 +151,12 @@ export function registerSearchConsoleTools(server) {
|
|
|
147
151
|
description: 'Delete a sitemap from Google Search Console',
|
|
148
152
|
inputSchema: {
|
|
149
153
|
account: accountEnum.describe('Google account alias'),
|
|
150
|
-
siteUrl: z.string().describe('Site URL'),
|
|
154
|
+
siteUrl: z.string().min(1).describe('Site URL'),
|
|
151
155
|
feedpath: z.string().describe('Full URL of the sitemap to delete'),
|
|
152
156
|
},
|
|
153
157
|
}, async ({ account, siteUrl, feedpath }) => {
|
|
154
158
|
try {
|
|
155
|
-
const auth = await
|
|
159
|
+
const auth = await getClientFn(account);
|
|
156
160
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
157
161
|
await wm.sitemaps.delete({ siteUrl, feedpath });
|
|
158
162
|
return {
|
|
@@ -168,7 +172,7 @@ export function registerSearchConsoleTools(server) {
|
|
|
168
172
|
description: 'Query Google Search Console search analytics data. Returns clicks, impressions, CTR, and position for your site. Supports filtering by query, page, country, device, search type, and date range.',
|
|
169
173
|
inputSchema: {
|
|
170
174
|
account: accountEnum.describe('Google account alias'),
|
|
171
|
-
siteUrl: z.string().describe('Site URL (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
175
|
+
siteUrl: z.string().min(1).describe('Site URL (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
172
176
|
startDate: z.string().describe('Start date (YYYY-MM-DD). Data is available starting ~3 days ago.'),
|
|
173
177
|
endDate: z.string().describe('End date (YYYY-MM-DD)'),
|
|
174
178
|
dimensions: coerceArray(z.enum(['query', 'page', 'country', 'device', 'searchAppearance', 'date'])).optional()
|
|
@@ -195,7 +199,7 @@ export function registerSearchConsoleTools(server) {
|
|
|
195
199
|
},
|
|
196
200
|
}, async ({ account, siteUrl, startDate, endDate, dimensions, type, dimensionFilterGroups, rowLimit, startRow, aggregationType, dataState }) => {
|
|
197
201
|
try {
|
|
198
|
-
const auth = await
|
|
202
|
+
const auth = await getClientFn(account);
|
|
199
203
|
const wm = webmastersClient({ version: 'v3', auth });
|
|
200
204
|
const requestBody = { startDate, endDate };
|
|
201
205
|
if (dimensions)
|
|
@@ -231,13 +235,13 @@ export function registerSearchConsoleTools(server) {
|
|
|
231
235
|
description: 'Inspect a URL using the Google Search Console URL Inspection API. Returns indexing status, crawl info, rich results, AMP status, and mobile usability for a specific URL.',
|
|
232
236
|
inputSchema: {
|
|
233
237
|
account: accountEnum.describe('Google account alias'),
|
|
234
|
-
siteUrl: z.string().describe('Site URL as registered in Search Console (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
235
|
-
inspectionUrl: z.string().describe('The fully-qualified URL to inspect (must be under the siteUrl property)'),
|
|
238
|
+
siteUrl: z.string().min(1).describe('Site URL as registered in Search Console (e.g. "https://example.com/" or "sc-domain:example.com")'),
|
|
239
|
+
inspectionUrl: z.string().min(1).describe('The fully-qualified URL to inspect (must be under the siteUrl property)'),
|
|
236
240
|
languageCode: z.string().optional().describe('BCP-47 language code for localized results (e.g. "en-US", "fr")'),
|
|
237
241
|
},
|
|
238
242
|
}, async ({ account, siteUrl, inspectionUrl, languageCode }) => {
|
|
239
243
|
try {
|
|
240
|
-
const auth = await
|
|
244
|
+
const auth = await getClientFn(account);
|
|
241
245
|
const searchconsole = searchconsoleClient({ version: 'v1', auth });
|
|
242
246
|
const res = await searchconsole.urlInspection.index.inspect({
|
|
243
247
|
requestBody: {
|
package/dist/tools/sheets.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ToolRegistry } from '../registry.js';
|
|
2
|
-
|
|
2
|
+
import { type CuratedToolDeps } from '../client.js';
|
|
3
|
+
export declare function registerSheetsTools(server: ToolRegistry, deps?: CuratedToolDeps): void;
|
|
3
4
|
export declare function buildCellFormat(input: {
|
|
4
5
|
backgroundColor?: {
|
|
5
6
|
red?: number;
|