> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/microsoft/playwright-mcp/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool Capabilities

> Configure which automation features are enabled

Tool capabilities allow you to control which automation features are enabled in the Playwright MCP server. By specifying capabilities, you can enable or restrict access to different tool groups.

## ToolCapability Type

The `ToolCapability` type defines all available capability values:

```typescript theme={null}
type ToolCapability =
  | 'config'
  | 'core'
  | 'core-navigation'
  | 'core-tabs'
  | 'core-input'
  | 'core-install'
  | 'network'
  | 'pdf'
  | 'storage'
  | 'testing'
  | 'vision'
  | 'devtools';
```

## Configuration

Specify capabilities in your configuration:

```typescript theme={null}
import { createConnection } from '@playwright/mcp';

const server = await createConnection({
  capabilities: ['core', 'pdf', 'vision', 'testing']
});
```

Or via CLI:

```bash theme={null}
npx @playwright/mcp@latest --caps=vision,pdf,devtools
```

## Capability Groups

### config

Configuration and management tools.

**Included Tools:**

* Server configuration management

***

### core

Core browser automation features. This is the primary capability group for standard browser interactions.

**Included Tools:**

* `browser_click` - Click on elements
* `browser_close` - Close the browser
* `browser_console_messages` - Get console messages
* `browser_drag` - Drag and drop
* `browser_evaluate` - Execute JavaScript
* `browser_file_upload` - Upload files
* `browser_fill_form` - Fill form fields
* `browser_handle_dialog` - Handle dialogs
* `browser_hover` - Hover over elements
* `browser_press_key` - Press keyboard keys
* `browser_resize` - Resize browser window
* `browser_run_code` - Run Playwright code snippets
* `browser_select_option` - Select dropdown options
* `browser_snapshot` - Capture accessibility snapshots
* `browser_take_screenshot` - Take screenshots
* `browser_type` - Type text into elements
* `browser_wait_for` - Wait for conditions

**When to Enable:** Always enable for basic browser automation tasks.

***

### core-navigation

Navigation-specific tools.

**Included Tools:**

* `browser_navigate` - Navigate to URLs
* `browser_navigate_back` - Go back in history

**When to Enable:** Enable when you need page navigation capabilities.

***

### core-tabs

Tab management functionality.

**Included Tools:**

* `browser_tabs` - List, create, close, or select tabs

**When to Enable:** Enable when working with multiple browser tabs.

***

### core-input

Input and interaction tools.

**Included Tools:**

* Text input tools
* Form interaction tools
* Click and interaction handlers

**When to Enable:** Enable for user input simulation.

***

### core-install

Browser installation tools.

**Included Tools:**

* `browser_install` - Install the browser specified in config

**When to Enable:** Enable if you need to install browsers programmatically.

***

### network

Network request inspection and monitoring.

**Included Tools:**

* `browser_network_requests` - List all network requests

**When to Enable:** Enable when you need to inspect network traffic, debug API calls, or verify requests.

***

### pdf

PDF generation and manipulation.

**Included Tools:**

* `browser_pdf_save` - Save page as PDF

**When to Enable:** Enable when you need to generate PDFs from web pages.

**Note:** This is an opt-in capability. Include `'pdf'` in your capabilities array to enable.

***

### storage

Browser storage management (cookies, localStorage, sessionStorage).

**Included Tools:**

* Storage state management
* Cookie manipulation

**When to Enable:** Enable when working with browser storage and authentication states.

***

### testing

Test assertions and verification tools.

**Included Tools:**

* `browser_generate_locator` - Generate test locators
* `browser_verify_element_visible` - Verify element visibility
* `browser_verify_list_visible` - Verify list items
* `browser_verify_text_visible` - Verify text presence
* `browser_verify_value` - Verify element values

**When to Enable:** Enable when writing or running automated tests, or when you need to verify page state.

**Note:** This is an opt-in capability. Include `'testing'` in your capabilities array to enable.

***

### vision

Coordinate-based interactions using pixel coordinates.

**Included Tools:**

* `browser_mouse_click_xy` - Click at coordinates
* `browser_mouse_down` - Press mouse button down
* `browser_mouse_drag_xy` - Drag between coordinates
* `browser_mouse_move_xy` - Move mouse to coordinates
* `browser_mouse_up` - Release mouse button
* `browser_mouse_wheel` - Scroll mouse wheel

**When to Enable:** Enable when you need pixel-perfect interactions, canvas manipulation, or working with elements that don't have accessible selectors.

**Note:** This is an opt-in capability. Include `'vision'` in your capabilities array to enable.

**Warning:** Coordinate-based interactions are less reliable than accessibility-based interactions and may break with viewport changes.

***

### devtools

Developer tools features and advanced debugging capabilities.

**Included Tools:**

* DevTools protocol access
* Performance profiling
* Coverage analysis

**When to Enable:** Enable when you need advanced debugging features or DevTools Protocol access.

**Note:** This is an opt-in capability. Include `'devtools'` in your capabilities array to enable.

***

## Default Capabilities

If no capabilities are specified, the following are enabled by default:

* `core`
* `core-navigation`
* `core-tabs`
* `core-input`
* `core-install`
* `network`
* `storage`
* `config`

Opt-in capabilities (`pdf`, `vision`, `devtools`, `testing`) must be explicitly enabled.

## Configuration Examples

### Minimal Core Automation

```typescript theme={null}
const server = await createConnection({
  capabilities: ['core', 'core-navigation']
});
```

### Web Scraping with Network Monitoring

```typescript theme={null}
const server = await createConnection({
  capabilities: ['core', 'core-navigation', 'network', 'pdf']
});
```

### Testing and Verification

```typescript theme={null}
const server = await createConnection({
  capabilities: ['core', 'core-navigation', 'testing']
});
```

### Full-Featured with All Capabilities

```typescript theme={null}
const server = await createConnection({
  capabilities: [
    'config',
    'core',
    'core-navigation',
    'core-tabs',
    'core-input',
    'core-install',
    'network',
    'pdf',
    'storage',
    'testing',
    'vision',
    'devtools'
  ]
});
```

### Vision-Based Automation

```typescript theme={null}
const server = await createConnection({
  capabilities: ['core', 'vision']
});
```

## CLI Usage

Enable specific capabilities via command line:

```bash theme={null}
# Enable vision and PDF capabilities
npx @playwright/mcp@latest --caps=vision,pdf

# Enable testing capabilities
npx @playwright/mcp@latest --caps=testing

# Enable multiple opt-in capabilities
npx @playwright/mcp@latest --caps=vision,pdf,devtools,testing
```

## Related

* [Configuration Schema](/api/configuration) - Full configuration options
* [createConnection](/api/create-connection) - Main API function
* [Tools Reference](/tools/overview) - Detailed tool documentation
