Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,22 +230,24 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles

<!-- BEGIN AUTO GENERATED TOOLS -->

- **Input automation** (7 tools)
- [`click`](docs/tool-reference.md#click)
- [`drag`](docs/tool-reference.md#drag)
- [`fill`](docs/tool-reference.md#fill)
- [`fill_form`](docs/tool-reference.md#fill_form)
- [`handle_dialog`](docs/tool-reference.md#handle_dialog)
- [`hover`](docs/tool-reference.md#hover)
- [`upload_file`](docs/tool-reference.md#upload_file)
- **Navigation automation** (7 tools)
- **Core automation** (10 tools)
- [`close_page`](docs/tool-reference.md#close_page)
- [`handle_dialog`](docs/tool-reference.md#handle_dialog)
- [`list_pages`](docs/tool-reference.md#list_pages)
- [`navigate_page`](docs/tool-reference.md#navigate_page)
- [`navigate_page_history`](docs/tool-reference.md#navigate_page_history)
- [`new_page`](docs/tool-reference.md#new_page)
- [`select_page`](docs/tool-reference.md#select_page)
- [`take_screenshot`](docs/tool-reference.md#take_screenshot)
- [`take_snapshot`](docs/tool-reference.md#take_snapshot)
- [`wait_for`](docs/tool-reference.md#wait_for)
- **Input automation** (6 tools)
- [`click`](docs/tool-reference.md#click)
- [`drag`](docs/tool-reference.md#drag)
- [`fill`](docs/tool-reference.md#fill)
- [`fill_form`](docs/tool-reference.md#fill_form)
- [`hover`](docs/tool-reference.md#hover)
- [`upload_file`](docs/tool-reference.md#upload_file)
- **Emulation** (3 tools)
- [`emulate_cpu`](docs/tool-reference.md#emulate_cpu)
- [`emulate_network`](docs/tool-reference.md#emulate_network)
Expand All @@ -257,11 +259,9 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles
- **Network** (2 tools)
- [`get_network_request`](docs/tool-reference.md#get_network_request)
- [`list_network_requests`](docs/tool-reference.md#list_network_requests)
- **Debugging** (4 tools)
- **Debugging** (2 tools)
- [`evaluate_script`](docs/tool-reference.md#evaluate_script)
- [`list_console_messages`](docs/tool-reference.md#list_console_messages)
- [`take_screenshot`](docs/tool-reference.md#take_screenshot)
- [`take_snapshot`](docs/tool-reference.md#take_snapshot)

<!-- END AUTO GENERATED TOOLS -->

Expand Down Expand Up @@ -314,6 +314,11 @@ The Chrome DevTools MCP server supports the following configuration option:
Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
- **Type:** array

- **`--categories`**
Categories of tools to expose. The `core` category cannot be disabled.
- **Type:** string
- **Default:** `core,input,emulation,performance,network,debugging`

<!-- END AUTO GENERATED OPTIONS -->

Pass them via the `args` property in the JSON configuration. For example:
Expand Down
180 changes: 90 additions & 90 deletions docs/tool-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

# Chrome DevTools MCP Tool Reference

- **[Input automation](#input-automation)** (7 tools)
- [`click`](#click)
- [`drag`](#drag)
- [`fill`](#fill)
- [`fill_form`](#fill_form)
- [`handle_dialog`](#handle_dialog)
- [`hover`](#hover)
- [`upload_file`](#upload_file)
- **[Navigation automation](#navigation-automation)** (7 tools)
- **[Core automation](#core-automation)** (10 tools)
- [`close_page`](#close_page)
- [`handle_dialog`](#handle_dialog)
- [`list_pages`](#list_pages)
- [`navigate_page`](#navigate_page)
- [`navigate_page_history`](#navigate_page_history)
- [`new_page`](#new_page)
- [`select_page`](#select_page)
- [`take_screenshot`](#take_screenshot)
- [`take_snapshot`](#take_snapshot)
- [`wait_for`](#wait_for)
- **[Input automation](#input-automation)** (6 tools)
- [`click`](#click)
- [`drag`](#drag)
- [`fill`](#fill)
- [`fill_form`](#fill_form)
- [`hover`](#hover)
- [`upload_file`](#upload_file)
- **[Emulation](#emulation)** (3 tools)
- [`emulate_cpu`](#emulate_cpu)
- [`emulate_network`](#emulate_network)
Expand All @@ -29,160 +31,183 @@
- **[Network](#network)** (2 tools)
- [`get_network_request`](#get_network_request)
- [`list_network_requests`](#list_network_requests)
- **[Debugging](#debugging)** (4 tools)
- **[Debugging](#debugging)** (2 tools)
- [`evaluate_script`](#evaluate_script)
- [`list_console_messages`](#list_console_messages)
- [`take_screenshot`](#take_screenshot)
- [`take_snapshot`](#take_snapshot)

## Input automation
## Core automation

### `click`
### `close_page`

**Description:** Clicks on the provided element
**Description:** Closes the page by its index. The last open page cannot be closed.

**Parameters:**

- **dblClick** (boolean) _(optional)_: Set to true for double clicks. Default is false.
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
- **pageIdx** (number) **(required)**: The index of the page to close. Call [`list_pages`](#list_pages) to list pages.

---

### `drag`
### `handle_dialog`

**Description:** [`Drag`](#drag) an element onto another element
**Description:** If a browser dialog was opened, use this command to handle it

**Parameters:**

- **from_uid** (string) **(required)**: The uid of the element to [`drag`](#drag)
- **to_uid** (string) **(required)**: The uid of the element to drop into
- **action** (enum: "accept", "dismiss") **(required)**: Whether to dismiss or accept the dialog
- **promptText** (string) _(optional)_: Optional prompt text to enter into the dialog.

---

### `fill`
### `list_pages`

**Description:** Type text into a input, text area or select an option from a &lt;select&gt; element.
**Description:** Get a list of pages open in the browser.

**Parameters:** None

---

### `navigate_page`

**Description:** Navigates the currently selected page to a URL.

**Parameters:**

- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
- **value** (string) **(required)**: The value to [`fill`](#fill) in
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **url** (string) **(required)**: URL to navigate the page to

---

### `fill_form`
### `navigate_page_history`

**Description:** [`Fill`](#fill) out multiple form elements at once
**Description:** Navigates the currently selected page.

**Parameters:**

- **elements** (array) **(required)**: Elements from snapshot to [`fill`](#fill) out.
- **navigate** (enum: "back", "forward") **(required)**: Whether to navigate back or navigate forward in the selected pages history
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.

---

### `handle_dialog`
### `new_page`

**Description:** If a browser dialog was opened, use this command to handle it
**Description:** Creates a new page

**Parameters:**

- **action** (enum: "accept", "dismiss") **(required)**: Whether to dismiss or accept the dialog
- **promptText** (string) _(optional)_: Optional prompt text to enter into the dialog.
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **url** (string) **(required)**: URL to load in a new page.

---

### `hover`
### `select_page`

**Description:** [`Hover`](#hover) over the provided element
**Description:** Select a page as a context for future tool calls.

**Parameters:**

- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
- **pageIdx** (number) **(required)**: The index of the page to select. Call [`list_pages`](#list_pages) to list pages.

---

### `upload_file`
### `take_screenshot`

**Description:** Upload a file through a provided element.
**Description:** Take a screenshot of the page or element.

**Parameters:**

- **filePath** (string) **(required)**: The local path of the file to upload
- **uid** (string) **(required)**: The uid of the file input element or an element that will open file chooser on the page from the page content snapshot
- **filePath** (string) _(optional)_: The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.
- **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.

---

## Navigation automation
### `take_snapshot`

### `close_page`
**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.

**Description:** Closes the page by its index. The last open page cannot be closed.
**Parameters:**

- **verbose** (boolean) _(optional)_: Whether to include all possible information available in the full a11y tree. Default is false.

---

### `wait_for`

**Description:** Wait for the specified text to appear on the selected page.

**Parameters:**

- **pageIdx** (number) **(required)**: The index of the page to close. Call [`list_pages`](#list_pages) to list pages.
- **text** (string) **(required)**: Text to appear on the page
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.

---

### `list_pages`
## Input automation

**Description:** Get a list of pages open in the browser.
### `click`

**Parameters:** None
**Description:** Clicks on the provided element

**Parameters:**

- **dblClick** (boolean) _(optional)_: Set to true for double clicks. Default is false.
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot

---

### `navigate_page`
### `drag`

**Description:** Navigates the currently selected page to a URL.
**Description:** [`Drag`](#drag) an element onto another element

**Parameters:**

- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **url** (string) **(required)**: URL to navigate the page to
- **from_uid** (string) **(required)**: The uid of the element to [`drag`](#drag)
- **to_uid** (string) **(required)**: The uid of the element to drop into

---

### `navigate_page_history`
### `fill`

**Description:** Navigates the currently selected page.
**Description:** Type text into a input, text area or select an option from a &lt;select&gt; element.

**Parameters:**

- **navigate** (enum: "back", "forward") **(required)**: Whether to navigate back or navigate forward in the selected pages history
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
- **value** (string) **(required)**: The value to [`fill`](#fill) in

---

### `new_page`
### `fill_form`

**Description:** Creates a new page
**Description:** [`Fill`](#fill) out multiple form elements at once

**Parameters:**

- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **url** (string) **(required)**: URL to load in a new page.
- **elements** (array) **(required)**: Elements from snapshot to [`fill`](#fill) out.

---

### `select_page`
### `hover`

**Description:** Select a page as a context for future tool calls.
**Description:** [`Hover`](#hover) over the provided element

**Parameters:**

- **pageIdx** (number) **(required)**: The index of the page to select. Call [`list_pages`](#list_pages) to list pages.
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot

---

### `wait_for`
### `upload_file`

**Description:** Wait for the specified text to appear on the selected page.
**Description:** Upload a file through a provided element.

**Parameters:**

- **text** (string) **(required)**: Text to appear on the page
- **timeout** (integer) _(optional)_: Maximum wait time in milliseconds. If set to 0, the default timeout will be used.
- **filePath** (string) **(required)**: The local path of the file to upload
- **uid** (string) **(required)**: The uid of the file input element or an element that will open file chooser on the page from the page content snapshot

---

Expand Down Expand Up @@ -303,28 +328,3 @@ so returned values have to JSON-serializable.
**Parameters:** None

---

### `take_screenshot`

**Description:** Take a screenshot of the page or element.

**Parameters:**

- **filePath** (string) _(optional)_: The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.
- **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.

---

### `take_snapshot`

**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.

**Parameters:**

- **verbose** (boolean) _(optional)_: Whether to include all possible information available in the full a11y tree. Default is false.

---
Loading