|
22 | 22 | - [`emulate_cpu`](#emulate_cpu) |
23 | 23 | - [`emulate_network`](#emulate_network) |
24 | 24 | - [`resize_page`](#resize_page) |
25 | | -- **[Performance](#performance)** (3 tools) |
| 25 | +- **[Performance](#performance)** (4 tools) |
26 | 26 | - [`performance_analyze_insight`](#performance_analyze_insight) |
| 27 | + - [`performance_query_chrome_ux_report`](#performance_query_chrome_ux_report) |
27 | 28 | - [`performance_start_trace`](#performance_start_trace) |
28 | 29 | - [`performance_stop_trace`](#performance_stop_trace) |
29 | 30 | - **[Network](#network)** (2 tools) |
|
232 | 233 |
|
233 | 234 | --- |
234 | 235 |
|
| 236 | +### `performance_query_chrome_ux_report` |
| 237 | + |
| 238 | +**Description:** Queries the Chrome UX Report (CrUX) API to get real-user experience metrics (like Core Web Vitals) for a given URL or origin. You must provide EITHER "origin" OR "url", but not both. You can optionally filter by "formFactor". |
| 239 | + |
| 240 | +**Parameters:** |
| 241 | + |
| 242 | +- **formFactor** (enum: "DESKTOP", "PHONE", "TABLET") _(optional)_: The form factor to filter by. If omitted, data for all form factors is aggregated. |
| 243 | +- **origin** (string) _(optional)_: The origin to query, e.g., "https://www.google.com". Do not provide this if "url" is specified. |
| 244 | +- **url** (string) _(optional)_: The specific page URL to query, e.g., "https://www.google.com/search?q=puppies". Do not provide this if "origin" is specified. |
| 245 | + |
| 246 | +--- |
| 247 | + |
235 | 248 | ### `performance_start_trace` |
236 | 249 |
|
237 | 250 | **Description:** Starts a performance trace recording on the selected page. This can be used to look for performance problems and insights to improve the performance of the page. It will also report Core Web Vital (CWV) scores for the page. |
@@ -288,15 +301,16 @@ so returned values have to JSON-serializable. |
288 | 301 |
|
289 | 302 | - **args** (array) _(optional)_: An optional list of arguments to pass to the function. |
290 | 303 | - **function** (string) **(required)**: A JavaScript function declaration to be executed by the tool in the currently selected page. |
291 | | - Example without arguments: `() => { |
| 304 | +Example without arguments: `() => { |
292 | 305 | return document.title |
293 | 306 | }` or `async () => { |
294 | 307 | return await fetch("example.com") |
295 | 308 | }`. |
296 | | - Example with arguments: `(el) => { |
| 309 | +Example with arguments: `(el) => { |
297 | 310 | return el.innerText; |
298 | 311 | }` |
299 | 312 |
|
| 313 | + |
300 | 314 | --- |
301 | 315 |
|
302 | 316 | ### `get_console_message` |
|
0 commit comments