Interaction
Click, type, select and scroll. Target by CSS selector, snapshot ref, or role and accessible name.
Generated from @mehmoodqureshi/chrome-mcp 0.9.11. 8 tools.
click
Click an element. Target by selector, a snapshot ref, or role+name (e.g. role:"button", name:"Sign in") - the locator needs no snapshot first. trusted=true uses real OS-level input.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or ref, or role+name) |
ref | string | no | Element ref from a snapshot |
role | string | no | ARIA role, e.g. button|link|textbox (pair with name) |
name | string | no | Accessible name / visible label (pair with role) |
nth | number | no | 0-based index when role+name is ambiguous |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
button | "left" | "right" | "middle" | no | |
clickCount | number | no | |
trusted | boolean | no | |
snapshotAfter | boolean | no | Return what CHANGED on the page after this action instead of making you re-read it |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
{
"tool": "click",
"args": {
"selector": "<selector>"
}
}type
Type text into an element (target by selector, ref, or role+name). trusted=true sends real keystrokes (works on React/Vue controlled inputs).
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or ref, or role+name) |
ref | string | no | Element ref from a snapshot |
role | string | no | ARIA role, e.g. button|link|textbox (pair with name) |
name | string | no | Accessible name / visible label (pair with role) |
nth | number | no | 0-based index when role+name is ambiguous |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
text | string | yes | |
tabId | string | no | Tab id (default: active tab) |
clear | boolean | no | |
pressEnter | boolean | no | |
keyEvents | boolean | no | |
trusted | boolean | no | |
snapshotAfter | boolean | no | Return what CHANGED on the page after this action instead of making you re-read it |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
{
"tool": "type",
"args": {
"text": "<text>"
}
}select_option
Select option(s) of a by value or visible label.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or ref, or role+name) |
ref | string | no | Element ref from a snapshot |
role | string | no | ARIA role, e.g. button|link|textbox (pair with name) |
name | string | no | Accessible name / visible label (pair with role) |
nth | number | no | 0-based index when role+name is ambiguous |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
values | string[] | yes | |
tabId | string | no | Tab id (default: active tab) |
snapshotAfter | boolean | no | Return what CHANGED on the page after this action instead of making you re-read it |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
{
"tool": "select_option",
"args": {
"values": []
}
}press
Press a key (with optional modifiers).
| Argument | Type | Required | Description |
|---|---|---|---|
key | string | yes | |
modifiers | string[] | no | |
tabId | string | no | Tab id (default: active tab) |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
{
"tool": "press",
"args": {
"key": "<key>"
}
}hover
Hover over an element.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or ref, or role+name) |
ref | string | no | Element ref from a snapshot |
role | string | no | ARIA role, e.g. button|link|textbox (pair with name) |
name | string | no | Accessible name / visible label (pair with role) |
nth | number | no | 0-based index when role+name is ambiguous |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
snapshotAfter | boolean | no | Return what CHANGED on the page after this action instead of making you re-read it |
{
"tool": "hover",
"args": {
"selector": "<selector>"
}
}scroll
Scroll the page or to an element.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or pass ref) |
ref | string | no | Element ref from a snapshot |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
x | number | no | |
y | number | no | |
deltaX | number | no | |
deltaY | number | no | |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "scroll",
"args": {
"selector": "<selector>"
}
}fill_form
Fill multiple fields (keyed by selector) and optionally submit.
| Argument | Type | Required | Description |
|---|---|---|---|
fields | Record<string, string | boolean> | yes | |
submitSelector | string | no | |
frameId | number | no | Frame id from frames_list |
allFrames | boolean | no | Act on the first match in ANY frame (the element may be in an iframe) |
tabId | string | no | Tab id (default: active tab) |
failOnAuthWall | boolean | no | Error with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session) |
{
"tool": "fill_form",
"args": {
"fields": {}
}
}upload_file
Set local file(s) on a file (target by selector or ref) — uploads without the OS dialog. Requires --enable-uploads. files are absolute local paths.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | string | no | CSS selector (or pass ref) |
ref | string | no | Element ref from a snapshot |
files | string[] | yes | |
tabId | string | no | Tab id (default: active tab) |
{
"tool": "upload_file",
"args": {
"files": []
}
}