Skip to content

Commit 6bdf5a7

Browse files
Unhide flag and run npm gen
1 parent cc9172f commit 6bdf5a7

6 files changed

Lines changed: 28 additions & 10 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,10 @@ The Chrome DevTools MCP server supports the following configuration option:
584584
Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH.
585585
- **Type:** boolean
586586

587+
- **`--experimentalWebmcp`/ `--experimental-webmcp`**
588+
Set to true to enable debugging WebMCP tools.
589+
- **Type:** boolean
590+
587591
- **`--chromeArg`/ `--chrome-arg`**
588592
Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
589593
- **Type:** array

src/bin/chrome-devtools-mcp-cli-options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ export const cliOptions = {
188188
experimentalWebmcp: {
189189
type: 'boolean',
190190
describe: 'Set to true to enable debugging WebMCP tools.',
191-
hidden: true,
192191
},
193192
chromeArg: {
194193
type: 'array',

src/telemetry/tool_call_metrics.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,5 +543,18 @@
543543
{
544544
"name": "list_webmcp_tools",
545545
"args": []
546+
},
547+
{
548+
"name": "execute_webmcp_tool",
549+
"args": [
550+
{
551+
"name": "tool_name_length",
552+
"argType": "number"
553+
},
554+
{
555+
"name": "input_length",
556+
"argType": "number"
557+
}
558+
]
546559
}
547560
]

src/tools/webmcp.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import {
8-
zod,
9-
} from '../third_party/index.js';
7+
import {zod} from '../third_party/index.js';
108

119
import {ToolCategory} from './categories.js';
1210
import {definePageTool} from './ToolDefinition.js';
@@ -64,7 +62,9 @@ export const executeWebMcpTool = definePageTool({
6462
throw new Error(`Tool ${toolName} not found`);
6563
}
6664

67-
const {status, output, errorText } = await tool.execute(input);
68-
response.appendResponseLine(JSON.stringify({status, output, errorText }, null, 2));
65+
const {status, output, errorText} = await tool.execute(input);
66+
response.appendResponseLine(
67+
JSON.stringify({status, output, errorText}, null, 2),
68+
);
6969
},
7070
});

tests/index.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ describe('e2e', () => {
168168
async client => {
169169
const {tools} = await client.listTools();
170170
const listWebMcpTools = tools.find(t => t.name === 'list_webmcp_tools');
171-
const executeWebMcpTool = tools.find(t => t.name === 'execute_webmcp_tool');
171+
const executeWebMcpTool = tools.find(
172+
t => t.name === 'execute_webmcp_tool',
173+
);
172174
assert.ok(listWebMcpTools);
173175
assert.ok(executeWebMcpTool);
174176
},

tests/tools/webmcp.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import assert from 'node:assert';
88
import {describe, it} from 'node:test';
99

10+
import type {ParsedArguments} from '../../src/bin/chrome-devtools-mcp-cli-options.js';
11+
import type {McpPage} from '../../src/McpPage.js';
1012
import {listPages, navigatePage, selectPage} from '../../src/tools/pages.js';
11-
import {html, withMcpContext} from '../utils.js';
1213
import {executeWebMcpTool} from '../../src/tools/webmcp.js';
13-
import {ParsedArguments} from '../../src/bin/chrome-devtools-mcp-cli-options.js';
14-
import {McpPage} from '../../src/McpPage.js';
14+
import {html, withMcpContext} from '../utils.js';
1515

1616
describe('webmcp', () => {
1717
describe('list_webmcp_tools', () => {

0 commit comments

Comments
 (0)