豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
50e813c
fix(mcp) : improve tool invocation reliability for agents
madhaviai Feb 14, 2026
42d30c2
fix(mcp): update Core Web Vitals references from FID to INP
madhaviai Feb 17, 2026
95b1d0a
chore(deps-dev): bump the dev-dependencies group with 4 updates (#983)
dependabot[bot] Feb 18, 2026
dcdd75c
chore(deps-dev): bump chrome-devtools-frontend from 1.0.1583146 to 1.…
dependabot[bot] Feb 18, 2026
f099549
refactor(network): de-duplicate String and JSON formatters (#985)
OrKoN Feb 18, 2026
bdfbf83
docs: update codex doc URL (#987)
OrKoN Feb 18, 2026
4826dbb
chore(deps-dev): bump puppeteer from 24.37.3 to 24.37.4 in the bundle…
dependabot[bot] Feb 18, 2026
c4fa168
refactor: remove text from the status code for Network requests (#778)
Lightning00Blade Feb 18, 2026
915b944
chore: clear in prepare (#988)
OrKoN Feb 18, 2026
5ed9d51
revert: "chore(deps-dev): bump chrome-devtools-frontend from 1.0.1583…
OrKoN Feb 18, 2026
5a169bf
test: fix missing sinon.restore (#989)
OrKoN Feb 18, 2026
7760d33
test(mcp): add eval scenarios for vague and URL-based webpage prompts…
madhaviai Feb 18, 2026
1b98206
Merge branch 'main' into fix/940-improve-mcp-invocation
OrKoN Feb 19, 2026
0bc270a
Merge branch 'main' into fix/940-improve-mcp-invocation
madhaviai Feb 19, 2026
d4da5d5
Merge branch 'main' into fix/940-improve-mcp-invocation
OrKoN Feb 20, 2026
5ed43e1
Merge branch 'main' into fix/940-improve-mcp-invocation
madhaviai Feb 24, 2026
7d8d21d
Merge branch 'main' into fix/940-improve-mcp-invocation
OrKoN Feb 26, 2026
11b6f88
Merge branch 'main' into fix/940-improve-mcp-invocation
madhaviai Feb 27, 2026
31e1a0f
fix(mcp): Updated file system args
madhaviai Feb 27, 2026
04d4473
Merge branch 'main' into fix/940-improve-mcp-invocation
madhaviai Mar 2, 2026
1c277a2
Merge branch 'main' into fix/940-improve-mcp-invocation
OrKoN Mar 4, 2026
dff4104
Update src/tools/pages.ts
OrKoN Mar 4, 2026
6b8f361
chore: fixes
OrKoN Mar 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/tool-reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run docs' to update-->

# Chrome DevTools MCP Tool Reference (~6915 cl100k_base tokens)
# Chrome DevTools MCP Tool Reference (~6927 cl100k_base tokens)

- **[Input automation](#input-automation)** (9 tools)
- [`click`](#click)
Expand Down Expand Up @@ -165,7 +165,7 @@

### `navigate_page`

**Description:** Navigates the currently selected page to a URL.
**Description:** Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.

**Parameters:**

Expand All @@ -180,7 +180,7 @@

### `new_page`

**Description:** Creates a new page
**Description:** Open a new tab and load a URL. Use project URL if not specified otherwise.

**Parameters:**

Expand Down Expand Up @@ -256,7 +256,7 @@

### `performance_start_trace`

**Description:** Starts a performance trace recording on the selected page. This can be used to look for performance problems and insights to improve the performance of the page. It will also report Core Web Vital (CWV) scores for the page.
**Description:** Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.

**Parameters:**

Expand All @@ -268,7 +268,7 @@

### `performance_stop_trace`

**Description:** Stops the active performance trace recording on the selected page.
**Description:** Stop the active performance trace recording on the selected webpage.

**Parameters:**

Expand Down
62 changes: 62 additions & 0 deletions scripts/eval_scenarios/fix_webpage_issues_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*
* Eval scenario: user asks to fix issues with their webpage (no URL given).
* When no URL is provided, the model should pick the current frontend and run
* and inspect it. Verifies the MCP server is invoked and the model opens the
* frontend and inspects it (snapshot, console, or network).
*
* Note: Tools like performance_start_trace, take_snapshot, list_console_messages,
* and list_network_requests do not require a URL in the prompt—they operate on
* the currently selected page. Only navigate_page/new_page need a URL to open
* a page; the eval runner injects the test URL when htmlRoute is set.
*/

import assert from 'node:assert';

import type {TestScenario} from '../eval_gemini.ts';

const INSPECTION_TOOLS = [
'take_snapshot',
'list_console_messages',
'list_network_requests',
];

export const scenario: TestScenario = {
prompt: 'Can you fix issues with my webpage?',
Comment thread
OrKoN marked this conversation as resolved.
maxTurns: 4,
htmlRoute: {
path: '/fix_issues_test.html',
htmlContent: `
<h1>Test Page</h1>
<p>Some content</p>
<script>
console.error('Intentional error for testing');
</script>
`,
},
expectations: calls => {
const NAVIGATION_TOOLS = ['navigate_page', 'new_page'];
assert.ok(
calls.length >= 2,
'Expected at least navigation and one inspection',
);
const navigationIndex = calls.findIndex(c =>
NAVIGATION_TOOLS.includes(c.name),
);
assert.ok(
navigationIndex !== -1,
`Expected a navigation call (${NAVIGATION_TOOLS.join(' or ')}), got: ${calls.map(c => c.name).join(', ')}`,
);
const afterNavigation = calls.slice(navigationIndex + 1);
const inspectionCalls = afterNavigation.filter(c =>
INSPECTION_TOOLS.includes(c.name),
);
assert.ok(
inspectionCalls.length >= 1,
`Expected at least one inspection tool (${INSPECTION_TOOLS.join(', ')}) after navigation, got: ${calls.map(c => c.name).join(', ')}`,
);
},
};
34 changes: 34 additions & 0 deletions scripts/eval_scenarios/frontend_snapshot_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*
* Eval scenario using "website"/"webpage" wording to verify the model invokes
* the right tools when users ask to open a site and read its content.
*/

import assert from 'node:assert';

import type {TestScenario} from '../eval_gemini.ts';

export const scenario: TestScenario = {
prompt:
'Open the website at <TEST_URL> and tell me what content is on the page.',
maxTurns: 3,
htmlRoute: {
path: '/frontend_snapshot.html',
htmlContent: '<h1>Frontend Test</h1><p>This is a test webpage.</p>',
},
expectations: calls => {
assert.strictEqual(calls.length, 2);
assert.ok(
calls[0].name === 'navigate_page' || calls[0].name === 'new_page',
'First call should be navigation',
);
assert.strictEqual(
calls[1].name,
'take_snapshot',
'Second call should be take_snapshot to read page content',
);
},
};
4 changes: 2 additions & 2 deletions src/tools/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const closePage = defineTool({

export const newPage = defineTool({
name: 'new_page',
description: `Creates a new page`,
description: `Open a new tab and load a URL. Use project URL if not specified otherwise.`,
annotations: {
category: ToolCategory.NAVIGATION,
readOnlyHint: false,
Expand Down Expand Up @@ -131,7 +131,7 @@ export const newPage = defineTool({

export const navigatePage = definePageTool({
name: 'navigate_page',
description: `Navigates the currently selected page to a URL.`,
description: `Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.`,
annotations: {
category: ToolCategory.NAVIGATION,
readOnlyHint: false,
Expand Down
4 changes: 2 additions & 2 deletions src/tools/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const filePathSchema = zod

export const startTrace = definePageTool({
name: 'performance_start_trace',
description: `Starts a performance trace recording on the selected page. This can be used to look for performance problems and insights to improve the performance of the page. It will also report Core Web Vital (CWV) scores for the page.`,
description: `Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.`,
annotations: {
category: ToolCategory.PERFORMANCE,
readOnlyHint: false,
Expand Down Expand Up @@ -117,7 +117,7 @@ export const startTrace = definePageTool({
export const stopTrace = definePageTool({
name: 'performance_stop_trace',
description:
'Stops the active performance trace recording on the selected page.',
'Stop the active performance trace recording on the selected webpage.',
annotations: {
category: ToolCategory.PERFORMANCE,
readOnlyHint: false,
Expand Down