Skip to content

Commit 569e306

Browse files
committed
docs: regenerate tool reference for style/diff tools
1 parent 4744fbb commit 569e306

2 files changed

Lines changed: 114 additions & 6 deletions

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,19 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles
504504
- **Network** (2 tools)
505505
- [`get_network_request`](docs/tool-reference.md#get_network_request)
506506
- [`list_network_requests`](docs/tool-reference.md#list_network_requests)
507-
- **Debugging** (6 tools)
507+
- **Debugging** (14 tools)
508+
- [`diff_computed_styles`](docs/tool-reference.md#diff_computed_styles)
509+
- [`diff_computed_styles_snapshot`](docs/tool-reference.md#diff_computed_styles_snapshot)
508510
- [`evaluate_script`](docs/tool-reference.md#evaluate_script)
511+
- [`get_box_model`](docs/tool-reference.md#get_box_model)
512+
- [`get_computed_styles`](docs/tool-reference.md#get_computed_styles)
513+
- [`get_computed_styles_batch`](docs/tool-reference.md#get_computed_styles_batch)
509514
- [`get_console_message`](docs/tool-reference.md#get_console_message)
515+
- [`get_visibility`](docs/tool-reference.md#get_visibility)
516+
- [`highlight_elements_for_styles`](docs/tool-reference.md#highlight_elements_for_styles)
510517
- [`lighthouse_audit`](docs/tool-reference.md#lighthouse_audit)
511518
- [`list_console_messages`](docs/tool-reference.md#list_console_messages)
519+
- [`save_computed_styles_snapshot`](docs/tool-reference.md#save_computed_styles_snapshot)
512520
- [`take_screenshot`](docs/tool-reference.md#take_screenshot)
513521
- [`take_snapshot`](docs/tool-reference.md#take_snapshot)
514522

docs/tool-reference.md

Lines changed: 105 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->
22

3-
# Chrome DevTools MCP Tool Reference (~6951 cl100k_base tokens)
3+
# Chrome DevTools MCP Tool Reference (~8663 cl100k_base tokens)
44

55
- **[Input automation](#input-automation)** (9 tools)
66
- [`click`](#click)
@@ -30,11 +30,19 @@
3030
- **[Network](#network)** (2 tools)
3131
- [`get_network_request`](#get_network_request)
3232
- [`list_network_requests`](#list_network_requests)
33-
- **[Debugging](#debugging)** (6 tools)
33+
- **[Debugging](#debugging)** (14 tools)
34+
- [`diff_computed_styles`](#diff_computed_styles)
35+
- [`diff_computed_styles_snapshot`](#diff_computed_styles_snapshot)
3436
- [`evaluate_script`](#evaluate_script)
37+
- [`get_box_model`](#get_box_model)
38+
- [`get_computed_styles`](#get_computed_styles)
39+
- [`get_computed_styles_batch`](#get_computed_styles_batch)
3540
- [`get_console_message`](#get_console_message)
41+
- [`get_visibility`](#get_visibility)
42+
- [`highlight_elements_for_styles`](#highlight_elements_for_styles)
3643
- [`lighthouse_audit`](#lighthouse_audit)
3744
- [`list_console_messages`](#list_console_messages)
45+
- [`save_computed_styles_snapshot`](#save_computed_styles_snapshot)
3846
- [`take_screenshot`](#take_screenshot)
3947
- [`take_snapshot`](#take_snapshot)
4048

@@ -157,7 +165,7 @@
157165

158166
### `list_pages`
159167

160-
**Description:** Get a list of pages open in the browser.
168+
**Description:** Get a list of pages open in the browser.
161169

162170
**Parameters:** None
163171

@@ -315,6 +323,33 @@
315323

316324
## Debugging
317325

326+
### `diff_computed_styles`
327+
328+
**Description:** Return the changed computed properties between two elements (A vs B).
329+
330+
**Parameters:**
331+
332+
- **uidA** (string) **(required)**: First element uid
333+
- **uidB** (string) **(required)**: Second element uid
334+
- **compareGeometry** (boolean) _(optional)_: If true, compare border-box geometry and classify effective layout change.
335+
- **properties** (array) _(optional)_: Optional filter list
336+
337+
---
338+
339+
### `diff_computed_styles_snapshot`
340+
341+
**Description:** Diff current computed styles (and optional geometry) vs a saved snapshot. Use domPath to match when a11y uids drift between captures.
342+
343+
**Parameters:**
344+
345+
- **name** (string) **(required)**: Snapshot name
346+
- **uid** (string) **(required)**: Element uid for the live node (from current snapshot)
347+
- **compareGeometry** (boolean) _(optional)_: Compare border-box rects to detect effective layout change.
348+
- **domPath** (string) _(optional)_: If baseline uid differs, match saved element by domPath from v1 snapshot.
349+
- **properties** (array) _(optional)_: Optional filter list
350+
351+
---
352+
318353
### `evaluate_script`
319354

320355
**Description:** Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,
@@ -323,19 +358,52 @@ so returned values have to be JSON-serializable.
323358
**Parameters:**
324359

325360
- **function** (string) **(required)**: A JavaScript function declaration to be executed by the tool in the currently selected page.
326-
Example without arguments: `() => {
361+
Example without arguments: `() => {
327362
return document.title
328363
}` or `async () => {
329364
return await fetch("example.com")
330365
}`.
331-
Example with arguments: `(el) => {
366+
Example with arguments: `(el) => {
332367
return el.innerText;
333368
}`
334369

335370
- **args** (array) _(optional)_: An optional list of arguments to pass to the function.
336371

337372
---
338373

374+
### `get_box_model`
375+
376+
**Description:** Return box model for an element (content/padding/border/margin) and rects (content, padding, border, margin, client, bounding).
377+
378+
**Parameters:**
379+
380+
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
381+
382+
---
383+
384+
### `get_computed_styles`
385+
386+
**Description:** Return CSS computed styles for an element. Optionally filter properties and include rule origins.
387+
388+
**Parameters:**
389+
390+
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
391+
- **includeSources** (boolean) _(optional)_: If true, include best-effort winning rule origins
392+
- **properties** (array) _(optional)_: Optional filter list
393+
394+
---
395+
396+
### `get_computed_styles_batch`
397+
398+
**Description:** Return CSS computed styles for multiple elements. Optionally filter properties.
399+
400+
**Parameters:**
401+
402+
- **uids** (array) **(required)**: The uids of elements on the page from the page content snapshot
403+
- **properties** (array) _(optional)_: Optional filter list
404+
405+
---
406+
339407
### `get_console_message`
340408

341409
**Description:** Gets a console message by its ID. You can get all messages by calling [`list_console_messages`](#list_console_messages).
@@ -346,6 +414,26 @@ so returned values have to be JSON-serializable.
346414

347415
---
348416

417+
### `get_visibility`
418+
419+
**Description:** Return visibility diagnostics for an element: isVisible and reasons.
420+
421+
**Parameters:**
422+
423+
- **uid** (string) **(required)**: The uid of an element on the page from the page content snapshot
424+
425+
---
426+
427+
### `highlight_elements_for_styles`
428+
429+
**Description:** Enable CDP overlay highlights on elements (last uid wins in DevTools; response lists all border quads for external overlays).
430+
431+
**Parameters:**
432+
433+
- **uids** (array) **(required)**: Element uids from the current page snapshot
434+
435+
---
436+
349437
### `lighthouse_audit`
350438

351439
**Description:** Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run [`performance_start_trace`](#performance_start_trace)
@@ -371,6 +459,18 @@ so returned values have to be JSON-serializable.
371459

372460
---
373461

462+
### `save_computed_styles_snapshot`
463+
464+
**Description:** Save a named snapshot (schema v1): computed styles, optional border geometry, domPath, backendNodeId, and page meta for later diff/matching.
465+
466+
**Parameters:**
467+
468+
- **name** (string) **(required)**: Snapshot name
469+
- **uids** (array) **(required)**: The uids of elements on the page from the page content snapshot
470+
- **properties** (array) _(optional)_: Optional filter list
471+
472+
---
473+
374474
### `take_screenshot`
375475

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

0 commit comments

Comments
 (0)