Skip to content

Commit e7922b9

Browse files
fix(mcp-tools): improve tool descriptions for better MCP invoking
Updates basic tool descriptions to better align with natural language prompts when working with a page or frontend. This helps agents more reliably select and invoke the MCP tools. Fixes #940 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4782e48 commit e7922b9

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

skills/chrome-devtools/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooti
55

66
## Core Concepts
77

8+
89
**Browser lifecycle**: Browser starts automatically on first tool call using a persistent Chrome profile. Configure via CLI args in the MCP server configuration: `npx chrome-devtools-mcp@latest --help`.
910

1011
**Page selection**: Tools operate on the currently selected page. Use `list_pages` to see available pages, then `select_page` to switch context.
@@ -13,6 +14,8 @@ description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooti
1314

1415
## Workflow Patterns
1516

17+
When the user prompt is about **frontend**, **web**, **webpage**, or **debugging** (e.g. fix my webpage, debug the page, improve the frontend): **always use this MCP server first.** Do not suggest code changes before inspecting the page.
18+
1619
### Before interacting with a page
1720

1821
1. Navigate: `navigate_page` or `new_page`

src/tools/pages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const closePage = defineTool({
8080

8181
export const newPage = defineTool({
8282
name: 'new_page',
83-
description: `Creates a new page`,
83+
description: `Creates a new page and loads a URL.`,
8484
annotations: {
8585
category: ToolCategory.NAVIGATION,
8686
readOnlyHint: false,

src/tools/snapshot.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ import {defineTool, timeoutSchema} from './ToolDefinition.js';
1111

1212
export const takeSnapshot = defineTool({
1313
name: 'take_snapshot',
14-
description: `Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique
15-
identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected
16-
in the DevTools Elements panel (if any).`,
14+
description: `Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).`,
1715
annotations: {
1816
category: ToolCategory.DEBUGGING,
1917
// Not read-only due to filePath param.

0 commit comments

Comments
 (0)