chrome-devtools-mcp 1.9.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/BrowserManager.js +401 -0
- package/build/src/McpContext.js +5 -5
- package/build/src/McpPage.js +107 -3
- package/build/src/McpResponse.js +68 -3
- package/build/src/ToolHandler.js +172 -118
- package/build/src/bin/chrome-devtools-mcp-main.js +11 -6
- package/build/src/bin/chrome-devtools.js +6 -12
- package/build/src/collectors/PageCollector.js +66 -3
- package/build/src/config/browser-options.js +2 -0
- package/build/src/config/category-options.js +13 -4
- package/build/src/config/cli-commands.js +26 -0
- package/build/src/config/cli-options.js +32 -0
- package/build/src/config/mcp-options.js +40 -1
- package/build/src/devtools/DevToolsCommentBridge.js +91 -0
- package/build/src/formatters/CommentFormatter.js +82 -0
- package/build/src/formatters/CssFormatter.js +812 -0
- package/build/src/index.js +53 -72
- package/build/src/processors/ChunkedTraceParser.js +361 -0
- package/build/src/processors/PerformanceTrace.js +60 -13
- package/build/src/telemetry/ClearcutLogger.js +91 -34
- package/build/src/telemetry/metricsRegistry.js +3 -0
- package/build/src/telemetry/persistence.js +17 -7
- package/build/src/telemetry/transformation.js +53 -4
- package/build/src/telemetry/types.js +1 -0
- package/build/src/third_party/THIRD_PARTY_NOTICES +715 -131
- package/build/src/third_party/bundled-packages.json +6 -3
- package/build/src/third_party/devtools-formatter-worker.js +136 -5
- package/build/src/third_party/devtools-heap-snapshot-worker.js +567 -6
- package/build/src/third_party/index.js +54948 -35497
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingId.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallNoManifest.md +3 -0
- package/build/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +3 -0
- package/build/src/tools/ToolDefinition.js +13 -21
- package/build/src/tools/comments.js +169 -0
- package/build/src/tools/console.js +3 -3
- package/build/src/tools/css.js +45 -0
- package/build/src/tools/emulation.js +5 -5
- package/build/src/tools/extensions.js +10 -10
- package/build/src/tools/input.js +159 -87
- package/build/src/tools/lighthouse.js +18 -7
- package/build/src/tools/memory.js +26 -26
- package/build/src/tools/network.js +4 -4
- package/build/src/tools/pages.js +14 -14
- package/build/src/tools/performance.js +6 -6
- package/build/src/tools/pwa.js +8 -8
- package/build/src/tools/screencast.js +4 -4
- package/build/src/tools/screenshot.js +2 -2
- package/build/src/tools/script.js +7 -7
- package/build/src/tools/slim/tools.js +5 -5
- package/build/src/tools/snapshot.js +4 -4
- package/build/src/tools/thirdPartyDeveloper.js +4 -4
- package/build/src/tools/tools.js +6 -9
- package/build/src/tools/webmcp.js +4 -4
- package/build/src/types.js +4 -1
- package/build/src/utils/WaitForHelper.js +14 -8
- package/build/src/utils/logger.js +7 -6
- package/build/src/version.js +1 -1
- package/package.json +8 -5
- package/skills/chrome-devtools/SKILL.md +2 -1
- package/skills/chrome-devtools-cli/SKILL.md +2 -0
- package/build/src/browser.js +0 -233
- package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +0 -4
|
@@ -5,27 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { zod } from '../third_party/index.js';
|
|
7
7
|
export function defineTool(definition) {
|
|
8
|
-
if (typeof definition === 'function') {
|
|
9
|
-
const factory = definition;
|
|
10
|
-
return (args) => {
|
|
11
|
-
return factory(args);
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
8
|
return definition;
|
|
15
9
|
}
|
|
16
10
|
export function definePageTool(definition) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
return (args) => {
|
|
12
|
+
const tool = definition(args);
|
|
13
|
+
return {
|
|
14
|
+
...tool,
|
|
15
|
+
schema: {
|
|
16
|
+
...(args.pageIdRouting && !args.slim ? pageIdSchema : {}),
|
|
17
|
+
...tool.schema,
|
|
18
|
+
},
|
|
19
|
+
pageScoped: true,
|
|
24
20
|
};
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
...definition,
|
|
28
|
-
pageScoped: true,
|
|
29
21
|
};
|
|
30
22
|
}
|
|
31
23
|
export const CLOSE_PAGE_ERROR = 'The last open page cannot be closed. It is fine to keep it open.';
|
|
@@ -36,11 +28,11 @@ export const timeoutSchema = {
|
|
|
36
28
|
timeout: zod
|
|
37
29
|
.number()
|
|
38
30
|
.int()
|
|
39
|
-
.optional()
|
|
40
|
-
.describe(`Maximum wait time in milliseconds. If set to 0, the default timeout will be used.`)
|
|
41
31
|
.transform(value => {
|
|
42
|
-
return value
|
|
43
|
-
})
|
|
32
|
+
return value <= 0 ? undefined : value;
|
|
33
|
+
})
|
|
34
|
+
.optional()
|
|
35
|
+
.describe(`Maximum wait time in milliseconds. If set to 0, the default timeout will be used.`),
|
|
44
36
|
};
|
|
45
37
|
export function viewportTransform(arg) {
|
|
46
38
|
if (!arg) {
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { zod } from '../third_party/index.js';
|
|
7
|
+
import { ToolCategory } from './categories.js';
|
|
8
|
+
import { definePageTool } from './ToolDefinition.js';
|
|
9
|
+
export const openDevtools = definePageTool(() => ({
|
|
10
|
+
name: 'open_devtools',
|
|
11
|
+
description: 'Open a DevTools window for the selected page.',
|
|
12
|
+
annotations: {
|
|
13
|
+
category: ToolCategory.DEBUGGING,
|
|
14
|
+
readOnlyHint: true,
|
|
15
|
+
conditions: ['devtoolsComments'],
|
|
16
|
+
},
|
|
17
|
+
schema: {},
|
|
18
|
+
blockedByDialog: false,
|
|
19
|
+
verifyFilesSchema: [],
|
|
20
|
+
handler: async (request, response) => {
|
|
21
|
+
const page = request.page;
|
|
22
|
+
try {
|
|
23
|
+
await page.openDevTools();
|
|
24
|
+
response.appendResponseLine('DevTools window opened successfully.');
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
28
|
+
response.appendResponseLine(`Failed to open DevTools: ${message}`);
|
|
29
|
+
}
|
|
30
|
+
response.setIncludePages(true);
|
|
31
|
+
},
|
|
32
|
+
}));
|
|
33
|
+
export const getDevtoolsComments = definePageTool(() => ({
|
|
34
|
+
name: 'get_devtools_comments',
|
|
35
|
+
description: 'Retrieve user comments from the DevTools window for the page.',
|
|
36
|
+
annotations: {
|
|
37
|
+
category: ToolCategory.DEBUGGING,
|
|
38
|
+
readOnlyHint: true,
|
|
39
|
+
conditions: ['devtoolsComments'],
|
|
40
|
+
},
|
|
41
|
+
schema: {},
|
|
42
|
+
blockedByDialog: false,
|
|
43
|
+
verifyFilesSchema: {},
|
|
44
|
+
handler: async (request, response) => {
|
|
45
|
+
const page = request.page;
|
|
46
|
+
const devtoolsPage = await page.getDevToolsPage();
|
|
47
|
+
if (!devtoolsPage) {
|
|
48
|
+
response.appendResponseLine('DevTools window is not open for this page. Call open_devtools first to open DevTools.');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const bridge = await page.ensureDevToolsCommentBridge(devtoolsPage);
|
|
52
|
+
const threads = await bridge.getComments(devtoolsPage);
|
|
53
|
+
response.setDevToolsComments(threads);
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
export const resolveDevtoolsComment = definePageTool(() => ({
|
|
57
|
+
name: 'resolve_devtools_comment',
|
|
58
|
+
description: 'Append an agent reply to a DevTools comment thread and mark it as resolved.',
|
|
59
|
+
annotations: {
|
|
60
|
+
category: ToolCategory.DEBUGGING,
|
|
61
|
+
readOnlyHint: false,
|
|
62
|
+
conditions: ['devtoolsComments'],
|
|
63
|
+
},
|
|
64
|
+
schema: {
|
|
65
|
+
threadId: zod
|
|
66
|
+
.string()
|
|
67
|
+
.describe('The unique identifier of the comment thread to resolve (e.g. "comment-1").'),
|
|
68
|
+
replyText: zod
|
|
69
|
+
.string()
|
|
70
|
+
.optional()
|
|
71
|
+
.describe('Optional reply explanation from the AI agent to append to the resolved comment thread.'),
|
|
72
|
+
},
|
|
73
|
+
blockedByDialog: false,
|
|
74
|
+
verifyFilesSchema: {},
|
|
75
|
+
handler: async (request, response) => {
|
|
76
|
+
const page = request.page;
|
|
77
|
+
const devtoolsPage = await page.getDevToolsPage();
|
|
78
|
+
if (!devtoolsPage) {
|
|
79
|
+
response.appendResponseLine('DevTools window is not open for this page. Call open_devtools first to open DevTools.');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const { threadId, replyText } = request.params;
|
|
83
|
+
const success = await devtoolsPage.evaluate((id, reply) => {
|
|
84
|
+
return (window.universe?.cd4aBridge?.resolveCommentThread(id, reply) ?? false);
|
|
85
|
+
}, threadId, replyText);
|
|
86
|
+
if (success) {
|
|
87
|
+
response.appendResponseLine(`Comment thread ${threadId} resolved successfully.`);
|
|
88
|
+
if (replyText) {
|
|
89
|
+
response.appendResponseLine(`Agent reply added: "${replyText}"`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
response.appendResponseLine(`Failed to resolve comment thread "${threadId}". Thread not found.`);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
}));
|
|
97
|
+
export const revealInDevtools = definePageTool(() => ({
|
|
98
|
+
name: 'reveal_in_devtools',
|
|
99
|
+
description: 'Navigate DevTools to a specified panel and highlight a target DOM node or network request. The parameters uid and reqid are mutually exclusive.',
|
|
100
|
+
annotations: {
|
|
101
|
+
category: ToolCategory.DEBUGGING,
|
|
102
|
+
readOnlyHint: true,
|
|
103
|
+
conditions: ['devtoolsComments'],
|
|
104
|
+
},
|
|
105
|
+
schema: {
|
|
106
|
+
panelName: zod
|
|
107
|
+
.string()
|
|
108
|
+
.optional()
|
|
109
|
+
.describe('The target DevTools panel (e.g. "elements", "network", "sources", "console").'),
|
|
110
|
+
uid: zod
|
|
111
|
+
.string()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe('Optional snapshot element UID to reveal in the Elements panel.'),
|
|
114
|
+
reqid: zod
|
|
115
|
+
.number()
|
|
116
|
+
.optional()
|
|
117
|
+
.describe('Optional network request ID to reveal in the Network panel.'),
|
|
118
|
+
},
|
|
119
|
+
blockedByDialog: false,
|
|
120
|
+
verifyFilesSchema: {},
|
|
121
|
+
handler: async (request, response) => {
|
|
122
|
+
const page = request.page;
|
|
123
|
+
const devtoolsPage = await page.getDevToolsPage();
|
|
124
|
+
if (!devtoolsPage) {
|
|
125
|
+
response.appendResponseLine('DevTools window is not open for this page. Call open_devtools first to open DevTools.');
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const { panelName, uid, reqid } = request.params;
|
|
129
|
+
let backendNodeId;
|
|
130
|
+
let targetId;
|
|
131
|
+
let networkRequestId;
|
|
132
|
+
if (uid) {
|
|
133
|
+
const resolved = await page.resolveUidToBackendNodeId(uid);
|
|
134
|
+
if (resolved) {
|
|
135
|
+
backendNodeId = resolved.backendNodeId;
|
|
136
|
+
targetId = resolved.targetId;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
response.appendResponseLine(`Warning: Could not resolve snapshot UID "${uid}" to a backend DOM node ID.`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (reqid !== undefined) {
|
|
143
|
+
const resolvedCdpRequestId = page.resolveReqidToCdpRequestId(reqid);
|
|
144
|
+
if (resolvedCdpRequestId !== undefined) {
|
|
145
|
+
networkRequestId = resolvedCdpRequestId;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
response.appendResponseLine(`Warning: Could not resolve network request ID ${reqid} to a CDP request ID.`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
await devtoolsPage.evaluate(async (panel, target) => {
|
|
152
|
+
await window.universe?.cd4aBridge?.reveal(panel, target);
|
|
153
|
+
}, panelName, { backendNodeId, targetId, networkRequestId });
|
|
154
|
+
let targetDesc = '';
|
|
155
|
+
if (uid && backendNodeId !== undefined) {
|
|
156
|
+
targetDesc = ` (revealing element ${uid} [backend node ${backendNodeId}])`;
|
|
157
|
+
}
|
|
158
|
+
else if (reqid !== undefined && networkRequestId) {
|
|
159
|
+
targetDesc = ` (revealing network request ${reqid} [${networkRequestId}])`;
|
|
160
|
+
}
|
|
161
|
+
if (panelName) {
|
|
162
|
+
response.appendResponseLine(`Navigated to ${panelName} panel${targetDesc} in DevTools.`);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
response.appendResponseLine(`Revealed target${targetDesc} in DevTools.`);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
}));
|
|
169
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -29,7 +29,7 @@ const FILTERABLE_MESSAGE_TYPES = [
|
|
|
29
29
|
'issue',
|
|
30
30
|
];
|
|
31
31
|
const LIST_CONSOLE_MESSAGES_TOOL_NAME = 'list_console_messages';
|
|
32
|
-
export const listConsoleMessages = definePageTool(cliArgs => {
|
|
32
|
+
export const listConsoleMessages = definePageTool((cliArgs) => {
|
|
33
33
|
return {
|
|
34
34
|
name: LIST_CONSOLE_MESSAGES_TOOL_NAME,
|
|
35
35
|
description: `List all console messages for the target page since the last navigation.${cliArgs?.categoryExtensions ? ' This includes console messages originating from extensions content scripts.' : ''}`,
|
|
@@ -83,7 +83,7 @@ export const listConsoleMessages = definePageTool(cliArgs => {
|
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
|
-
export const getConsoleMessage = definePageTool({
|
|
86
|
+
export const getConsoleMessage = definePageTool(() => ({
|
|
87
87
|
name: 'get_console_message',
|
|
88
88
|
description: `Gets a console message by its ID. You can get all messages by calling ${LIST_CONSOLE_MESSAGES_TOOL_NAME}.`,
|
|
89
89
|
annotations: {
|
|
@@ -100,5 +100,5 @@ export const getConsoleMessage = definePageTool({
|
|
|
100
100
|
handler: async (request, response) => {
|
|
101
101
|
response.attachConsoleMessage(request.params.msgid);
|
|
102
102
|
},
|
|
103
|
-
});
|
|
103
|
+
}));
|
|
104
104
|
//# sourceMappingURL=console.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { zod } from '../third_party/index.js';
|
|
7
|
+
import { ToolCategory } from './categories.js';
|
|
8
|
+
import { definePageTool } from './ToolDefinition.js';
|
|
9
|
+
export const getCssStyles = definePageTool(() => ({
|
|
10
|
+
name: 'get_css_styles',
|
|
11
|
+
description: `Retrieve matched CSS rules, inline styles, inherited styles, and cascade information for an element identified by its UID.
|
|
12
|
+
Use this tool to debug why specific CSS properties are applied, overridden, or conflicting. Results are paginated and return 10 rules per page by default; use pageIdx to page through the remaining rules. Requires a UID from take_snapshot.`,
|
|
13
|
+
annotations: {
|
|
14
|
+
category: ToolCategory.DEBUGGING,
|
|
15
|
+
readOnlyHint: true,
|
|
16
|
+
},
|
|
17
|
+
schema: {
|
|
18
|
+
uid: zod
|
|
19
|
+
.string()
|
|
20
|
+
.describe('The uid of the element on the page from the page content snapshot to inspect CSS styles for'),
|
|
21
|
+
pageSize: zod
|
|
22
|
+
.number()
|
|
23
|
+
.int()
|
|
24
|
+
.positive()
|
|
25
|
+
.default(10)
|
|
26
|
+
.describe('Maximum number of CSS rules to return per page. Defaults to 10.'),
|
|
27
|
+
pageIdx: zod
|
|
28
|
+
.number()
|
|
29
|
+
.int()
|
|
30
|
+
.min(0)
|
|
31
|
+
.default(0)
|
|
32
|
+
.describe('Page number to return (0-based). Defaults to 0 (the first page).'),
|
|
33
|
+
},
|
|
34
|
+
blockedByDialog: true,
|
|
35
|
+
verifyFilesSchema: {},
|
|
36
|
+
handler: async (request, response) => {
|
|
37
|
+
const matchedStyles = await request.page.getMatchedStylesForUid(request.params.uid);
|
|
38
|
+
response.setIncludeCssStyles(matchedStyles, {
|
|
39
|
+
uid: request.params.uid,
|
|
40
|
+
pageSize: request.params.pageSize,
|
|
41
|
+
pageIdx: request.params.pageIdx,
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
}));
|
|
45
|
+
//# sourceMappingURL=css.js.map
|
|
@@ -31,7 +31,7 @@ const throttlingOptions = [
|
|
|
31
31
|
'Offline',
|
|
32
32
|
...Object.keys(PredefinedNetworkConditions),
|
|
33
33
|
];
|
|
34
|
-
export const emulate = definePageTool({
|
|
34
|
+
export const emulate = definePageTool(() => ({
|
|
35
35
|
name: 'emulate',
|
|
36
36
|
description: `Emulates various features on the target page.`,
|
|
37
37
|
annotations: {
|
|
@@ -51,8 +51,8 @@ export const emulate = definePageTool({
|
|
|
51
51
|
.describe('Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling'),
|
|
52
52
|
geolocation: zod
|
|
53
53
|
.string()
|
|
54
|
-
.optional()
|
|
55
54
|
.transform(geolocationTransform)
|
|
55
|
+
.optional()
|
|
56
56
|
.describe('Geolocation (`<latitude>,<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override.'),
|
|
57
57
|
userAgent: zod
|
|
58
58
|
.string()
|
|
@@ -64,13 +64,13 @@ export const emulate = definePageTool({
|
|
|
64
64
|
.describe('Emulate the dark or the light mode. Set to "auto" to reset to the default.'),
|
|
65
65
|
viewport: zod
|
|
66
66
|
.string()
|
|
67
|
-
.optional()
|
|
68
67
|
.transform(viewportTransform)
|
|
68
|
+
.optional()
|
|
69
69
|
.describe(`Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.`),
|
|
70
70
|
extraHttpHeaders: zod
|
|
71
71
|
.string()
|
|
72
|
-
.optional()
|
|
73
72
|
.transform(headerStringTransform)
|
|
73
|
+
.optional()
|
|
74
74
|
.describe('Extra HTTP headers as a JSON string object, e.g. {"X-Custom": "value", "Authorization": "Bearer token"}. Headers are included into every HTTP request originating from the page and persist across navigations until cleared. Pass an empty string to clear all extra headers.'),
|
|
75
75
|
},
|
|
76
76
|
blockedByDialog: true,
|
|
@@ -80,5 +80,5 @@ export const emulate = definePageTool({
|
|
|
80
80
|
await page.emulate(request.params);
|
|
81
81
|
response.appendResponseLine('Emulation configured successfully');
|
|
82
82
|
},
|
|
83
|
-
});
|
|
83
|
+
}));
|
|
84
84
|
//# sourceMappingURL=emulation.js.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { zod } from '../third_party/index.js';
|
|
7
7
|
import { ToolCategory } from './categories.js';
|
|
8
8
|
import { defineTool } from './ToolDefinition.js';
|
|
9
|
-
export const installExtension = defineTool({
|
|
9
|
+
export const installExtension = defineTool(() => ({
|
|
10
10
|
name: 'install_extension',
|
|
11
11
|
description: 'Installs a Chrome extension from the given path.',
|
|
12
12
|
annotations: {
|
|
@@ -27,8 +27,8 @@ export const installExtension = defineTool({
|
|
|
27
27
|
const id = await context.installExtension(path);
|
|
28
28
|
response.appendResponseLine(`Extension installed. Id: ${id}`);
|
|
29
29
|
},
|
|
30
|
-
});
|
|
31
|
-
export const uninstallExtension = defineTool({
|
|
30
|
+
}));
|
|
31
|
+
export const uninstallExtension = defineTool(() => ({
|
|
32
32
|
name: 'uninstall_extension',
|
|
33
33
|
description: 'Uninstalls a Chrome extension by its ID.',
|
|
34
34
|
annotations: {
|
|
@@ -45,8 +45,8 @@ export const uninstallExtension = defineTool({
|
|
|
45
45
|
await context.uninstallExtension(id);
|
|
46
46
|
response.appendResponseLine(`Extension uninstalled. Id: ${id}`);
|
|
47
47
|
},
|
|
48
|
-
});
|
|
49
|
-
export const listExtensions = defineTool({
|
|
48
|
+
}));
|
|
49
|
+
export const listExtensions = defineTool(() => ({
|
|
50
50
|
name: 'list_extensions',
|
|
51
51
|
description: 'Lists all the Chrome extensions installed in the browser. This includes their name, ID, version, and enabled status.',
|
|
52
52
|
annotations: {
|
|
@@ -59,8 +59,8 @@ export const listExtensions = defineTool({
|
|
|
59
59
|
handler: async (_request, response) => {
|
|
60
60
|
response.setListExtensions();
|
|
61
61
|
},
|
|
62
|
-
});
|
|
63
|
-
export const reloadExtension = defineTool({
|
|
62
|
+
}));
|
|
63
|
+
export const reloadExtension = defineTool(() => ({
|
|
64
64
|
name: 'reload_extension',
|
|
65
65
|
description: 'Reloads an unpacked Chrome extension by its ID.',
|
|
66
66
|
annotations: {
|
|
@@ -81,8 +81,8 @@ export const reloadExtension = defineTool({
|
|
|
81
81
|
await context.installExtension(extension.path);
|
|
82
82
|
response.appendResponseLine('Extension reloaded.');
|
|
83
83
|
},
|
|
84
|
-
});
|
|
85
|
-
export const triggerExtensionAction = defineTool({
|
|
84
|
+
}));
|
|
85
|
+
export const triggerExtensionAction = defineTool(() => ({
|
|
86
86
|
name: 'trigger_extension_action',
|
|
87
87
|
description: 'Triggers the default action of an extension by its ID.',
|
|
88
88
|
annotations: {
|
|
@@ -99,5 +99,5 @@ export const triggerExtensionAction = defineTool({
|
|
|
99
99
|
await context.triggerExtensionAction(id);
|
|
100
100
|
response.appendResponseLine(`Extension action triggered for ID ${id}`);
|
|
101
101
|
},
|
|
102
|
-
});
|
|
102
|
+
}));
|
|
103
103
|
//# sourceMappingURL=extensions.js.map
|