docs: fix skill and reference documentation issues (#1249)
## Summary This PR fixes several documentation and skill-reference issues across the repo to improve accuracy and reduce confusion in implementation and troubleshooting workflows. ## Changes - corrected CLI examples in skill docs - fixed the documented argument order for `performance_analyze_insight` - updated the memory leak fallback script path - corrected generated tool reference wording by updating the source-of-truth tool descriptions --------- Co-authored-by: ojonesjr <50652264+ojonesjr@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ Avoid sharing sensitive or personal information that you don't want to share wit
|
||||
MCP clients.
|
||||
|
||||
`chrome-devtools-mcp` officially supports Google Chrome and [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) only.
|
||||
Other Chromium-based browser may work, but this is not guaranteed, and you may encounter unexpected behavior. Use at your own discretion.
|
||||
Other Chromium-based browsers may work, but this is not guaranteed, and you may encounter unexpected behavior. Use at your own discretion.
|
||||
We are committed to providing fixes and support for the latest version of [Extended Stable Chrome](https://chromiumdash.appspot.com/schedule).
|
||||
|
||||
Performance tools may send trace URLs to the Google CrUX API to fetch real-user
|
||||
@@ -506,7 +506,7 @@ The Chrome DevTools MCP server supports the following configuration option:
|
||||
<!-- BEGIN AUTO GENERATED OPTIONS -->
|
||||
|
||||
- **`--autoConnect`/ `--auto-connect`**
|
||||
If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.
|
||||
If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remote debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.
|
||||
- **Type:** boolean
|
||||
- **Default:** `false`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->
|
||||
|
||||
# Chrome DevTools MCP Tool Reference (~6949 cl100k_base tokens)
|
||||
# Chrome DevTools MCP Tool Reference (~6951 cl100k_base tokens)
|
||||
|
||||
- **[Input automation](#input-automation)** (9 tools)
|
||||
- [`click`](#click)
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
### `fill`
|
||||
|
||||
**Description:** Type text into a input, text area or select an option from a <select> element.
|
||||
**Description:** Type text into an input, text area or select an option from a <select> element.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
- **colorScheme** (enum: "dark", "light", "auto") _(optional)_: [`Emulate`](#emulate) the dark or the light mode. Set to "auto" to reset to the default.
|
||||
- **cpuThrottlingRate** (number) _(optional)_: Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling
|
||||
- **geolocation** (string) _(optional)_: Geolocation (`<latitude>x<longitude>`) to [`emulate`](#emulate). Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.
|
||||
- **geolocation** (string) _(optional)_: Geolocation (`<latitude>x<longitude>`) to [`emulate`](#emulate). Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override.
|
||||
- **networkConditions** (enum: "Offline", "Slow 3G", "Fast 3G", "Slow 4G", "Fast 4G") _(optional)_: Throttle network. Omit to disable throttling.
|
||||
- **userAgent** (string) _(optional)_: User agent to [`emulate`](#emulate). Set to empty string to clear the user agent override.
|
||||
- **viewport** (string) _(optional)_: [`Emulate`](#emulate) device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to [`emulate`](#emulate) mobile devices. 'landscape' to [`emulate`](#emulate) landscape mode.
|
||||
@@ -366,7 +366,7 @@ so returned values have to be JSON-serializable.
|
||||
|
||||
- **includePreservedMessages** (boolean) _(optional)_: Set to true to return the preserved messages over the last 3 navigations.
|
||||
- **pageIdx** (integer) _(optional)_: Page number to return (0-based). When omitted, returns the first page.
|
||||
- **pageSize** (integer) _(optional)_: Maximum number of messages to return. When omitted, returns all requests.
|
||||
- **pageSize** (integer) _(optional)_: Maximum number of messages to return. When omitted, returns all messages.
|
||||
- **types** (array) _(optional)_: Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages.
|
||||
|
||||
---
|
||||
@@ -381,7 +381,7 @@ so returned values have to be JSON-serializable.
|
||||
- **format** (enum: "png", "jpeg", "webp") _(optional)_: Type of format to save the screenshot as. Default is "png"
|
||||
- **fullPage** (boolean) _(optional)_: If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid.
|
||||
- **quality** (number) _(optional)_: Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format.
|
||||
- **uid** (string) _(optional)_: The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.
|
||||
- **uid** (string) _(optional)_: The uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ Possible workarounds include:
|
||||
3. Start `chrome-devtools-mcp` with:
|
||||
`npx chrome-devtools-mcp --browser-url http://127.0.0.1:9222`
|
||||
|
||||
- **Use Powershell or Git Bash** instead of WSL.
|
||||
- **Use PowerShell or Git Bash** instead of WSL.
|
||||
|
||||
### Windows 10: Error during discovery for MCP server 'chrome-devtools': MCP error -32000: Connection closed
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: chrome-devtools-cli
|
||||
description: Use this to skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
|
||||
description: Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.
|
||||
---
|
||||
|
||||
The `chrome-devtools-mcp` CLI lets you interact with the browser from your terminal.
|
||||
@@ -74,7 +74,7 @@ chrome-devtools select_page 1 --bringToFront true # Select a page and bring it t
|
||||
|
||||
```bash
|
||||
chrome-devtools emulate --networkConditions "Offline" # Emulate network conditions
|
||||
chrome-devtools emulate --cpuThrottlingRate 4 --geolocation "0,0" # Emulate CPU throttling and geolocation
|
||||
chrome-devtools emulate --cpuThrottlingRate 4 --geolocation "0x0" # Emulate CPU throttling and geolocation
|
||||
chrome-devtools emulate --colorScheme "dark" --viewport "1920x1080" # Emulate color scheme and viewport
|
||||
chrome-devtools emulate --userAgent "Mozilla/5.0..." # Emulate user agent
|
||||
chrome-devtools resize_page 1920 1080 # Resizes the selected page's window
|
||||
@@ -107,7 +107,7 @@ chrome-devtools list_network_requests --includePreservedRequests true # Include
|
||||
|
||||
```bash
|
||||
chrome-devtools evaluate_script "() => document.title" # Evaluate a JavaScript function on the page
|
||||
evaluate_script "(a) => a.innerText" --args 1_4 # Evaluate JS with UID arguments
|
||||
chrome-devtools evaluate_script "(a) => a.innerText" --args 1_4 # Evaluate JS with UID arguments
|
||||
chrome-devtools get_console_message 1 # Gets a console message by its ID
|
||||
chrome-devtools lighthouse_audit --mode "navigation" # Run Lighthouse audit for navigation
|
||||
chrome-devtools lighthouse_audit --mode "snapshot" --device "mobile" # Run Lighthouse audit for a snapshot on mobile
|
||||
|
||||
@@ -50,7 +50,7 @@ Use `performance_analyze_insight` to drill into LCP-specific insights. Look for
|
||||
- **RenderBlocking** — Resources blocking the LCP element from rendering.
|
||||
- **LCPDiscovery** — Whether the LCP resource was discoverable early.
|
||||
|
||||
Call `performance_analyze_insight` with the insight name and the insight set ID from the trace results.
|
||||
Call `performance_analyze_insight` with the insight set ID and the insight name from the trace results.
|
||||
|
||||
### Step 3: Identify the LCP Element
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ If `memlab` is not available, you MUST use the fallback script in the references
|
||||
Run the script using Node.js:
|
||||
|
||||
```bash
|
||||
node compare_snapshots.js <baseline.heapsnapshot> <target.heapsnapshot>
|
||||
node skills/memory-leak-debugging/references/compare_snapshots.js <baseline.heapsnapshot> <target.heapsnapshot>
|
||||
```
|
||||
|
||||
The script will analyze and output the top growing objects by size and highlight the 3 most common types of memory leaks (e.g., Detached DOM nodes, closures, Contexts) if they are present.
|
||||
|
||||
@@ -11,7 +11,7 @@ export const cliOptions = {
|
||||
autoConnect: {
|
||||
type: 'boolean',
|
||||
description:
|
||||
'If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.',
|
||||
'If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remote debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.',
|
||||
conflicts: ['isolated', 'executablePath', 'categoryExtensions'],
|
||||
default: false,
|
||||
coerce: (value: boolean | undefined) => {
|
||||
|
||||
@@ -110,7 +110,7 @@ export const commands: Commands = {
|
||||
name: 'geolocation',
|
||||
type: 'string',
|
||||
description:
|
||||
'Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.',
|
||||
'Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override.',
|
||||
required: false,
|
||||
},
|
||||
userAgent: {
|
||||
@@ -159,7 +159,7 @@ export const commands: Commands = {
|
||||
},
|
||||
fill: {
|
||||
description:
|
||||
'Type text into a input, text area or select an option from a <select> element.',
|
||||
'Type text into an input, text area or select an option from a <select> element.',
|
||||
category: 'Input automation',
|
||||
args: {
|
||||
uid: {
|
||||
@@ -305,7 +305,7 @@ export const commands: Commands = {
|
||||
name: 'pageSize',
|
||||
type: 'integer',
|
||||
description:
|
||||
'Maximum number of messages to return. When omitted, returns all requests.',
|
||||
'Maximum number of messages to return. When omitted, returns all messages.',
|
||||
required: false,
|
||||
},
|
||||
pageIdx: {
|
||||
@@ -618,7 +618,7 @@ export const commands: Commands = {
|
||||
name: 'uid',
|
||||
type: 'string',
|
||||
description:
|
||||
'The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.',
|
||||
'The uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot.',
|
||||
required: false,
|
||||
},
|
||||
fullPage: {
|
||||
|
||||
@@ -52,7 +52,7 @@ export const listConsoleMessages = definePageTool({
|
||||
.positive()
|
||||
.optional()
|
||||
.describe(
|
||||
'Maximum number of messages to return. When omitted, returns all requests.',
|
||||
'Maximum number of messages to return. When omitted, returns all messages.',
|
||||
),
|
||||
pageIdx: zod
|
||||
.number()
|
||||
|
||||
@@ -44,7 +44,7 @@ export const emulate = definePageTool({
|
||||
.optional()
|
||||
.transform(geolocationTransform)
|
||||
.describe(
|
||||
'Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.',
|
||||
'Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override.',
|
||||
),
|
||||
userAgent: zod
|
||||
.string()
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ async function fillFormElement(
|
||||
|
||||
export const fill = definePageTool({
|
||||
name: 'fill',
|
||||
description: `Type text into a input, text area or select an option from a <select> element.`,
|
||||
description: `Type text into an input, text area or select an option from a <select> element.`,
|
||||
annotations: {
|
||||
category: ToolCategory.INPUT,
|
||||
readOnlyHint: false,
|
||||
|
||||
@@ -35,7 +35,7 @@ export const screenshot = definePageTool({
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.',
|
||||
'The uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot.',
|
||||
),
|
||||
fullPage: zod
|
||||
.boolean()
|
||||
|
||||
Reference in New Issue
Block a user