@playwright/mcp 0.0.29 → 0.0.31

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/README.md CHANGED
@@ -10,7 +10,7 @@ A Model Context Protocol (MCP) server that provides browser automation capabilit
10
10
 
11
11
  ### Requirements
12
12
  - Node.js 18 or newer
13
- - VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client
13
+ - VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client
14
14
 
15
15
  <!--
16
16
  // Generate using:
@@ -19,7 +19,9 @@ node utils/generate-links.js
19
19
 
20
20
  ### Getting started
21
21
 
22
- First, install the Playwright MCP server with your client. A typical configuration looks like this:
22
+ First, install the Playwright MCP server with your client.
23
+
24
+ **Standard config** works in most of the tools:
23
25
 
24
26
  ```js
25
27
  {
@@ -37,20 +39,25 @@ First, install the Playwright MCP server with your client. A typical configurati
37
39
  [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D)
38
40
 
39
41
 
40
- <details><summary><b>Install in VS Code</b></summary>
42
+ <details>
43
+ <summary>Claude Code</summary>
41
44
 
42
- You can also install the Playwright MCP server using the VS Code CLI:
45
+ Use the Claude Code CLI to add the Playwright MCP server:
43
46
 
44
47
  ```bash
45
- # For VS Code
46
- code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
48
+ claude mcp add playwright npx @playwright/mcp@latest
47
49
  ```
50
+ </details>
51
+
52
+ <details>
53
+ <summary>Claude Desktop</summary>
54
+
55
+ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.
48
56
 
49
- After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
50
57
  </details>
51
58
 
52
59
  <details>
53
- <summary><b>Install in Cursor</b></summary>
60
+ <summary>Cursor</summary>
54
61
 
55
62
  #### Click the button to install:
56
63
 
@@ -60,77 +67,53 @@ After installation, the Playwright MCP server will be available for use with you
60
67
 
61
68
  Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx @playwright/mcp`. You can also verify config or add command like arguments via clicking `Edit`.
62
69
 
63
- ```js
64
- {
65
- "mcpServers": {
66
- "playwright": {
67
- "command": "npx",
68
- "args": [
69
- "@playwright/mcp@latest"
70
- ]
71
- }
72
- }
73
- }
74
- ```
75
70
  </details>
76
71
 
77
72
  <details>
78
- <summary><b>Install in Windsurf</b></summary>
73
+ <summary>Gemini CLI</summary>
79
74
 
80
- Follow Windsuff MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use following configuration:
75
+ Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.
81
76
 
82
- ```js
83
- {
84
- "mcpServers": {
85
- "playwright": {
86
- "command": "npx",
87
- "args": [
88
- "@playwright/mcp@latest"
89
- ]
90
- }
91
- }
92
- }
93
- ```
94
77
  </details>
95
78
 
96
79
  <details>
97
- <summary><b>Install in Claude Desktop</b></summary>
80
+ <summary>Goose</summary>
98
81
 
99
- Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use following configuration:
82
+ #### Click the button to install:
100
83
 
101
- ```js
102
- {
103
- "mcpServers": {
104
- "playwright": {
105
- "command": "npx",
106
- "args": [
107
- "@playwright/mcp@latest"
108
- ]
109
- }
110
- }
111
- }
112
- ```
84
+ [![Install in Goose](https://block.github.io/goose/img/extension-install-dark.svg)](https://block.github.io/goose/extension?cmd=npx&arg=%40playwright%2Fmcp%40latest&id=playwright&name=Playwright&description=Interact%20with%20web%20pages%20through%20structured%20accessibility%20snapshots%20using%20Playwright)
85
+
86
+ #### Or install manually:
87
+
88
+ Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx @playwright/mcp`. Click "Add Extension".
113
89
  </details>
114
90
 
115
91
  <details>
116
- <summary><b>Install in Qodo Gen</b></summary>
92
+ <summary>Qodo Gen</summary>
117
93
 
118
- Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the following configuration:
94
+ Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.
119
95
 
120
- ```js
121
- {
122
- "mcpServers": {
123
- "playwright": {
124
- "command": "npx",
125
- "args": [
126
- "@playwright/mcp@latest"
127
- ]
128
- }
129
- }
130
- }
96
+ Click <code>Save</code>.
97
+ </details>
98
+
99
+ <details>
100
+ <summary>VS Code</summary>
101
+
102
+ You can also install the Playwright MCP server using the VS Code CLI:
103
+
104
+ ```bash
105
+ # For VS Code
106
+ code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
131
107
  ```
132
108
 
133
- Click <code>Save</code>.
109
+ After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
110
+ </details>
111
+
112
+ <details>
113
+ <summary>Windsurf</summary>
114
+
115
+ Follow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use the standard config above.
116
+
134
117
  </details>
135
118
 
136
119
  ### Configuration
@@ -151,10 +134,8 @@ Playwright MCP server supports following arguments. They can be provided in the
151
134
  --block-service-workers block service workers
152
135
  --browser <browser> browser or chrome channel to use, possible
153
136
  values: chrome, firefox, webkit, msedge.
154
- --browser-agent <endpoint> Use browser agent (experimental).
155
- --caps <caps> comma-separated list of capabilities to enable,
156
- possible values: tabs, pdf, history, wait, files,
157
- install. Default is all.
137
+ --caps <caps> comma-separated list of additional capabilities
138
+ to enable, possible values: vision, pdf.
158
139
  --cdp-endpoint <endpoint> CDP endpoint to connect to.
159
140
  --config <path> path to the configuration file.
160
141
  --device <device> device to emulate, for example: "iPhone 15"
@@ -166,9 +147,7 @@ Playwright MCP server supports following arguments. They can be provided in the
166
147
  --isolated keep the browser profile in memory, do not save
167
148
  it to disk.
168
149
  --image-responses <mode> whether to send image responses to the client.
169
- Can be "allow", "omit", or "auto". Defaults to
170
- "auto", which sends images if the client can
171
- display them.
150
+ Can be "allow" or "omit", Defaults to "allow".
172
151
  --no-sandbox disable the sandbox for all process types that
173
152
  are normally sandboxed.
174
153
  --output-dir <path> path to the directory for output files.
@@ -186,8 +165,6 @@ Playwright MCP server supports following arguments. They can be provided in the
186
165
  specified, a temporary directory will be created.
187
166
  --viewport-size <size> specify browser viewport size in pixels, for
188
167
  example "1280, 720"
189
- --vision Run server that uses screenshots (Aria snapshots
190
- are used by default)
191
168
  ```
192
169
 
193
170
  <!--- End of options generated section -->
@@ -288,21 +265,14 @@ npx @playwright/mcp@latest --config path/to/config.json
288
265
  host?: string; // Host to bind to (default: localhost)
289
266
  },
290
267
 
291
- // List of enabled capabilities
268
+ // List of additional capabilities
292
269
  capabilities?: Array<
293
- 'core' | // Core browser automation
294
270
  'tabs' | // Tab management
295
- 'pdf' | // PDF generation
296
- 'history' | // Browser history
297
- 'wait' | // Wait utilities
298
- 'files' | // File handling
299
271
  'install' | // Browser installation
300
- 'testing' // Testing
272
+ 'pdf' | // PDF generation
273
+ 'vision' | // Coordinate-based interactions
301
274
  >;
302
275
 
303
- // Enable vision mode (screenshots instead of accessibility snapshots)
304
- vision?: boolean;
305
-
306
276
  // Directory for output files
307
277
  outputDir?: string;
308
278
 
@@ -316,9 +286,10 @@ npx @playwright/mcp@latest --config path/to/config.json
316
286
  };
317
287
 
318
288
  /**
319
- * Do not send image responses to the client.
289
+ * Whether to send image responses to the client. Can be "allow" or "omit".
290
+ * Defaults to "allow".
320
291
  */
321
- noImageResponses?: boolean;
292
+ imageResponses?: 'allow' | 'omit';
322
293
  }
323
294
  ```
324
295
  </details>
@@ -391,42 +362,10 @@ http.createServer(async (req, res) => {
391
362
 
392
363
  ### Tools
393
364
 
394
- The tools are available in two modes:
395
-
396
- 1. **Snapshot Mode** (default): Uses accessibility snapshots for better performance and reliability
397
- 2. **Vision Mode**: Uses screenshots for visual-based interactions
398
-
399
- To use Vision Mode, add the `--vision` flag when starting the server:
400
-
401
- ```js
402
- {
403
- "mcpServers": {
404
- "playwright": {
405
- "command": "npx",
406
- "args": [
407
- "@playwright/mcp@latest",
408
- "--vision"
409
- ]
410
- }
411
- }
412
- }
413
- ```
414
-
415
- Vision Mode works best with the computer use models that are able to interact with elements using
416
- X Y coordinate space, based on the provided screenshot.
417
-
418
365
  <!--- Tools generated by update-readme.js -->
419
366
 
420
367
  <details>
421
- <summary><b>Interactions</b></summary>
422
-
423
- <!-- NOTE: This has been generated via update-readme.js -->
424
-
425
- - **browser_snapshot**
426
- - Title: Page snapshot
427
- - Description: Capture accessibility snapshot of the current page, this is better than screenshot
428
- - Parameters: None
429
- - Read-only: **true**
368
+ <summary><b>Core automation</b></summary>
430
369
 
431
370
  <!-- NOTE: This has been generated via update-readme.js -->
432
371
 
@@ -436,76 +375,51 @@ X Y coordinate space, based on the provided screenshot.
436
375
  - Parameters:
437
376
  - `element` (string): Human-readable element description used to obtain permission to interact with the element
438
377
  - `ref` (string): Exact target element reference from the page snapshot
378
+ - `doubleClick` (boolean, optional): Whether to perform a double click instead of a single click
379
+ - `button` (string, optional): Button to click, defaults to left
439
380
  - Read-only: **false**
440
381
 
441
382
  <!-- NOTE: This has been generated via update-readme.js -->
442
383
 
443
- - **browser_drag**
444
- - Title: Drag mouse
445
- - Description: Perform drag and drop between two elements
446
- - Parameters:
447
- - `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
448
- - `startRef` (string): Exact source element reference from the page snapshot
449
- - `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
450
- - `endRef` (string): Exact target element reference from the page snapshot
451
- - Read-only: **false**
452
-
453
- <!-- NOTE: This has been generated via update-readme.js -->
454
-
455
- - **browser_hover**
456
- - Title: Hover mouse
457
- - Description: Hover over element on page
458
- - Parameters:
459
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
460
- - `ref` (string): Exact target element reference from the page snapshot
384
+ - **browser_close**
385
+ - Title: Close browser
386
+ - Description: Close the page
387
+ - Parameters: None
461
388
  - Read-only: **true**
462
389
 
463
390
  <!-- NOTE: This has been generated via update-readme.js -->
464
391
 
465
- - **browser_type**
466
- - Title: Type text
467
- - Description: Type text into editable element
468
- - Parameters:
469
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
470
- - `ref` (string): Exact target element reference from the page snapshot
471
- - `text` (string): Text to type into the element
472
- - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
473
- - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
474
- - Read-only: **false**
392
+ - **browser_console_messages**
393
+ - Title: Get console messages
394
+ - Description: Returns all console messages
395
+ - Parameters: None
396
+ - Read-only: **true**
475
397
 
476
398
  <!-- NOTE: This has been generated via update-readme.js -->
477
399
 
478
- - **browser_select_option**
479
- - Title: Select option
480
- - Description: Select an option in a dropdown
400
+ - **browser_drag**
401
+ - Title: Drag mouse
402
+ - Description: Perform drag and drop between two elements
481
403
  - Parameters:
482
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
483
- - `ref` (string): Exact target element reference from the page snapshot
484
- - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
404
+ - `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
405
+ - `startRef` (string): Exact source element reference from the page snapshot
406
+ - `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
407
+ - `endRef` (string): Exact target element reference from the page snapshot
485
408
  - Read-only: **false**
486
409
 
487
410
  <!-- NOTE: This has been generated via update-readme.js -->
488
411
 
489
- - **browser_press_key**
490
- - Title: Press a key
491
- - Description: Press a key on the keyboard
412
+ - **browser_evaluate**
413
+ - Title: Evaluate JavaScript
414
+ - Description: Evaluate JavaScript expression on page or element
492
415
  - Parameters:
493
- - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
416
+ - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
417
+ - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
418
+ - `ref` (string, optional): Exact target element reference from the page snapshot
494
419
  - Read-only: **false**
495
420
 
496
421
  <!-- NOTE: This has been generated via update-readme.js -->
497
422
 
498
- - **browser_wait_for**
499
- - Title: Wait for
500
- - Description: Wait for text to appear or disappear or a specified time to pass
501
- - Parameters:
502
- - `time` (number, optional): The time to wait in seconds
503
- - `text` (string, optional): The text to wait for
504
- - `textGone` (string, optional): The text to wait for to disappear
505
- - Read-only: **true**
506
-
507
- <!-- NOTE: This has been generated via update-readme.js -->
508
-
509
423
  - **browser_file_upload**
510
424
  - Title: Upload files
511
425
  - Description: Upload one or multiple files
@@ -523,10 +437,15 @@ X Y coordinate space, based on the provided screenshot.
523
437
  - `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
524
438
  - Read-only: **false**
525
439
 
526
- </details>
440
+ <!-- NOTE: This has been generated via update-readme.js -->
527
441
 
528
- <details>
529
- <summary><b>Navigation</b></summary>
442
+ - **browser_hover**
443
+ - Title: Hover mouse
444
+ - Description: Hover over element on page
445
+ - Parameters:
446
+ - `element` (string): Human-readable element description used to obtain permission to interact with the element
447
+ - `ref` (string): Exact target element reference from the page snapshot
448
+ - Read-only: **true**
530
449
 
531
450
  <!-- NOTE: This has been generated via update-readme.js -->
532
451
 
@@ -553,83 +472,101 @@ X Y coordinate space, based on the provided screenshot.
553
472
  - Parameters: None
554
473
  - Read-only: **true**
555
474
 
556
- </details>
475
+ <!-- NOTE: This has been generated via update-readme.js -->
557
476
 
558
- <details>
559
- <summary><b>Resources</b></summary>
477
+ - **browser_network_requests**
478
+ - Title: List network requests
479
+ - Description: Returns all network requests since loading the page
480
+ - Parameters: None
481
+ - Read-only: **true**
560
482
 
561
483
  <!-- NOTE: This has been generated via update-readme.js -->
562
484
 
563
- - **browser_take_screenshot**
564
- - Title: Take a screenshot
565
- - Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
485
+ - **browser_press_key**
486
+ - Title: Press a key
487
+ - Description: Press a key on the keyboard
566
488
  - Parameters:
567
- - `raw` (boolean, optional): Whether to return without compression (in PNG format). Default is false, which returns a JPEG image.
568
- - `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.
569
- - `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
570
- - `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
571
- - Read-only: **true**
489
+ - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
490
+ - Read-only: **false**
572
491
 
573
492
  <!-- NOTE: This has been generated via update-readme.js -->
574
493
 
575
- - **browser_pdf_save**
576
- - Title: Save as PDF
577
- - Description: Save page as PDF
494
+ - **browser_resize**
495
+ - Title: Resize browser window
496
+ - Description: Resize the browser window
578
497
  - Parameters:
579
- - `filename` (string, optional): File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.
498
+ - `width` (number): Width of the browser window
499
+ - `height` (number): Height of the browser window
580
500
  - Read-only: **true**
581
501
 
582
502
  <!-- NOTE: This has been generated via update-readme.js -->
583
503
 
584
- - **browser_network_requests**
585
- - Title: List network requests
586
- - Description: Returns all network requests since loading the page
587
- - Parameters: None
588
- - Read-only: **true**
504
+ - **browser_select_option**
505
+ - Title: Select option
506
+ - Description: Select an option in a dropdown
507
+ - Parameters:
508
+ - `element` (string): Human-readable element description used to obtain permission to interact with the element
509
+ - `ref` (string): Exact target element reference from the page snapshot
510
+ - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
511
+ - Read-only: **false**
589
512
 
590
513
  <!-- NOTE: This has been generated via update-readme.js -->
591
514
 
592
- - **browser_console_messages**
593
- - Title: Get console messages
594
- - Description: Returns all console messages
515
+ - **browser_snapshot**
516
+ - Title: Page snapshot
517
+ - Description: Capture accessibility snapshot of the current page, this is better than screenshot
595
518
  - Parameters: None
596
519
  - Read-only: **true**
597
520
 
598
- </details>
599
-
600
- <details>
601
- <summary><b>Utilities</b></summary>
602
-
603
521
  <!-- NOTE: This has been generated via update-readme.js -->
604
522
 
605
- - **browser_install**
606
- - Title: Install the browser specified in the config
607
- - Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
608
- - Parameters: None
609
- - Read-only: **false**
523
+ - **browser_take_screenshot**
524
+ - Title: Take a screenshot
525
+ - Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
526
+ - Parameters:
527
+ - `raw` (boolean, optional): Whether to return without compression (in PNG format). Default is false, which returns a JPEG image.
528
+ - `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.
529
+ - `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
530
+ - `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
531
+ - Read-only: **true**
610
532
 
611
533
  <!-- NOTE: This has been generated via update-readme.js -->
612
534
 
613
- - **browser_close**
614
- - Title: Close browser
615
- - Description: Close the page
616
- - Parameters: None
617
- - Read-only: **true**
535
+ - **browser_type**
536
+ - Title: Type text
537
+ - Description: Type text into editable element
538
+ - Parameters:
539
+ - `element` (string): Human-readable element description used to obtain permission to interact with the element
540
+ - `ref` (string): Exact target element reference from the page snapshot
541
+ - `text` (string): Text to type into the element
542
+ - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
543
+ - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
544
+ - Read-only: **false**
618
545
 
619
546
  <!-- NOTE: This has been generated via update-readme.js -->
620
547
 
621
- - **browser_resize**
622
- - Title: Resize browser window
623
- - Description: Resize the browser window
548
+ - **browser_wait_for**
549
+ - Title: Wait for
550
+ - Description: Wait for text to appear or disappear or a specified time to pass
624
551
  - Parameters:
625
- - `width` (number): Width of the browser window
626
- - `height` (number): Height of the browser window
552
+ - `time` (number, optional): The time to wait in seconds
553
+ - `text` (string, optional): The text to wait for
554
+ - `textGone` (string, optional): The text to wait for to disappear
627
555
  - Read-only: **true**
628
556
 
629
557
  </details>
630
558
 
631
559
  <details>
632
- <summary><b>Tabs</b></summary>
560
+ <summary><b>Tab management</b></summary>
561
+
562
+ <!-- NOTE: This has been generated via update-readme.js -->
563
+
564
+ - **browser_tab_close**
565
+ - Title: Close a tab
566
+ - Description: Close a tab
567
+ - Parameters:
568
+ - `index` (number, optional): The index of the tab to close. Closes current tab if not provided.
569
+ - Read-only: **false**
633
570
 
634
571
  <!-- NOTE: This has been generated via update-readme.js -->
635
572
 
@@ -657,60 +594,29 @@ X Y coordinate space, based on the provided screenshot.
657
594
  - `index` (number): The index of the tab to select
658
595
  - Read-only: **true**
659
596
 
660
- <!-- NOTE: This has been generated via update-readme.js -->
661
-
662
- - **browser_tab_close**
663
- - Title: Close a tab
664
- - Description: Close a tab
665
- - Parameters:
666
- - `index` (number, optional): The index of the tab to close. Closes current tab if not provided.
667
- - Read-only: **false**
668
-
669
597
  </details>
670
598
 
671
599
  <details>
672
- <summary><b>Testing</b></summary>
600
+ <summary><b>Browser installation</b></summary>
673
601
 
674
602
  <!-- NOTE: This has been generated via update-readme.js -->
675
603
 
676
- - **browser_generate_playwright_test**
677
- - Title: Generate a Playwright test
678
- - Description: Generate a Playwright test for given scenario
679
- - Parameters:
680
- - `name` (string): The name of the test
681
- - `description` (string): The description of the test
682
- - `steps` (array): The steps of the test
683
- - Read-only: **true**
604
+ - **browser_install**
605
+ - Title: Install the browser specified in the config
606
+ - Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
607
+ - Parameters: None
608
+ - Read-only: **false**
684
609
 
685
610
  </details>
686
611
 
687
612
  <details>
688
- <summary><b>Vision mode</b></summary>
689
-
690
- <!-- NOTE: This has been generated via update-readme.js -->
691
-
692
- - **browser_screen_capture**
693
- - Title: Take a screenshot
694
- - Description: Take a screenshot of the current page
695
- - Parameters: None
696
- - Read-only: **true**
697
-
698
- <!-- NOTE: This has been generated via update-readme.js -->
699
-
700
- - **browser_screen_move_mouse**
701
- - Title: Move mouse
702
- - Description: Move mouse to a given position
703
- - Parameters:
704
- - `element` (string): Human-readable element description used to obtain permission to interact with the element
705
- - `x` (number): X coordinate
706
- - `y` (number): Y coordinate
707
- - Read-only: **true**
613
+ <summary><b>Coordinate-based (opt-in via --caps=vision)</b></summary>
708
614
 
709
615
  <!-- NOTE: This has been generated via update-readme.js -->
710
616
 
711
- - **browser_screen_click**
617
+ - **browser_mouse_click_xy**
712
618
  - Title: Click
713
- - Description: Click left mouse button
619
+ - Description: Click left mouse button at a given position
714
620
  - Parameters:
715
621
  - `element` (string): Human-readable element description used to obtain permission to interact with the element
716
622
  - `x` (number): X coordinate
@@ -719,9 +625,9 @@ X Y coordinate space, based on the provided screenshot.
719
625
 
720
626
  <!-- NOTE: This has been generated via update-readme.js -->
721
627
 
722
- - **browser_screen_drag**
628
+ - **browser_mouse_drag_xy**
723
629
  - Title: Drag mouse
724
- - Description: Drag left mouse button
630
+ - Description: Drag left mouse button to a given position
725
631
  - Parameters:
726
632
  - `element` (string): Human-readable element description used to obtain permission to interact with the element
727
633
  - `startX` (number): Start X coordinate
@@ -732,52 +638,28 @@ X Y coordinate space, based on the provided screenshot.
732
638
 
733
639
  <!-- NOTE: This has been generated via update-readme.js -->
734
640
 
735
- - **browser_screen_type**
736
- - Title: Type text
737
- - Description: Type text
738
- - Parameters:
739
- - `text` (string): Text to type into the element
740
- - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
741
- - Read-only: **false**
742
-
743
- <!-- NOTE: This has been generated via update-readme.js -->
744
-
745
- - **browser_press_key**
746
- - Title: Press a key
747
- - Description: Press a key on the keyboard
748
- - Parameters:
749
- - `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
750
- - Read-only: **false**
751
-
752
- <!-- NOTE: This has been generated via update-readme.js -->
753
-
754
- - **browser_wait_for**
755
- - Title: Wait for
756
- - Description: Wait for text to appear or disappear or a specified time to pass
641
+ - **browser_mouse_move_xy**
642
+ - Title: Move mouse
643
+ - Description: Move mouse to a given position
757
644
  - Parameters:
758
- - `time` (number, optional): The time to wait in seconds
759
- - `text` (string, optional): The text to wait for
760
- - `textGone` (string, optional): The text to wait for to disappear
645
+ - `element` (string): Human-readable element description used to obtain permission to interact with the element
646
+ - `x` (number): X coordinate
647
+ - `y` (number): Y coordinate
761
648
  - Read-only: **true**
762
649
 
763
- <!-- NOTE: This has been generated via update-readme.js -->
650
+ </details>
764
651
 
765
- - **browser_file_upload**
766
- - Title: Upload files
767
- - Description: Upload one or multiple files
768
- - Parameters:
769
- - `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files.
770
- - Read-only: **false**
652
+ <details>
653
+ <summary><b>PDF generation (opt-in via --caps=pdf)</b></summary>
771
654
 
772
655
  <!-- NOTE: This has been generated via update-readme.js -->
773
656
 
774
- - **browser_handle_dialog**
775
- - Title: Handle a dialog
776
- - Description: Handle a dialog
657
+ - **browser_pdf_save**
658
+ - Title: Save as PDF
659
+ - Description: Save page as PDF
777
660
  - Parameters:
778
- - `accept` (boolean): Whether to accept the dialog.
779
- - `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
780
- - Read-only: **false**
661
+ - `filename` (string, optional): File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.
662
+ - Read-only: **true**
781
663
 
782
664
  </details>
783
665