chrometools-mcp 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.4.2] - 2026-01-05
6
+
7
+ ### Added
8
+ - **`analyzePage` - `includeAll` parameter** - New optional parameter to get ALL page elements, not just interactive ones
9
+ - Set `includeAll: true` to get complete page structure with selectors for all visible elements
10
+ - Returns new `allElements` array containing divs, spans, headings, and all other visible elements
11
+ - Each element includes: selector, tag, text, classes, id, and attributes (role, aria-label)
12
+ - Useful for layout work and styling - find any element, get its selector, then use `getComputedCss` or `setStyles`
13
+ - Example workflow: `analyzePage({ includeAll: true })` → find element → `getComputedCss({ selector })` or `setStyles({ selector })`
14
+ - Skips hidden elements and non-visual tags (SCRIPT, STYLE, META, etc.)
15
+ - Location: `index.js:1613-1751`, schemas in `tools/tool-schemas.js:215`, `server/tool-schemas.js:221`
16
+
17
+ ### Changed
18
+ - **Tool Groups reorganization** - Moved `executeScript` and `navigateTo` from `advanced` to `core` group
19
+ - These are fundamental navigation and scripting tools that should be available in basic configurations
20
+ - Core group now includes: `ping`, `openBrowser`, `executeScript`, `navigateTo` (4 tools)
21
+ - Advanced group now has: `setStyles`, `setViewport`, `getViewport`, `smartFindElement`, `analyzePage`, `getAllInteractiveElements`, `findElementsByText` (7 tools)
22
+ - Location: `server/tool-groups.js:8,21-29`
23
+
5
24
  ## [2.4.0] - 2025-12-29
6
25
 
7
26
  ### Added
package/README.md CHANGED
@@ -148,18 +148,27 @@ Get current page state and structure. Returns complete map of forms (with values
148
148
  - **After form submissions** (check results, errors)
149
149
  - **After AJAX updates** (dynamic content loaded)
150
150
  - When debugging (see actual form values, not just visual)
151
+ - **Layout/styling work** - use `includeAll: true` to get ALL page elements with selectors
151
152
  - **Parameters**:
152
153
  - `refresh` (optional): Force refresh cache to get CURRENT state after changes (default: false)
154
+ - `includeAll` (optional): Include ALL page elements, not just interactive ones (default: false). Useful for layout work - find any element, get its selector, then use `getComputedCss` or `setStyles` on it.
153
155
  - **Why better than screenshot**:
154
156
  - Shows actual data (form values, validation errors) not just visual
155
157
  - Uses 2-5k tokens vs screenshot 15-25k tokens
156
158
  - Returns structured data with selectors
157
- - **Returns**: Complete map of forms (with current values), inputs, buttons, links, navigation with selectors
159
+ - **Returns**:
160
+ - By default: Complete map of forms (with current values), inputs, buttons, links, navigation with selectors
161
+ - With `includeAll: true`: Also includes `allElements` array with ALL visible page elements (divs, spans, headings, etc.) - each with selector, tag, text, classes, id
158
162
  - **Example workflow**:
159
163
  1. `openBrowser({ url: "..." })`
160
164
  2. `analyzePage()` ← Initial analysis
161
165
  3. `click({ selector: "submit-btn" })`
162
166
  4. **`analyzePage({ refresh: true })`** ← See what changed after click!
167
+ - **Layout work example**:
168
+ 1. `analyzePage({ includeAll: true })` ← Get all elements
169
+ 2. Find element you want to style (e.g., `div.header`)
170
+ 3. `getComputedCss({ selector: "div.header" })` ← Get current styles
171
+ 4. `setStyles({ selector: "div.header", styles: [...] })` ← Apply new styles
163
172
 
164
173
  #### getAllInteractiveElements
165
174
  Get all clickable/fillable elements with their selectors.