chrome-mcp
Tools

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.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or ref, or role+name)
refstringnoElement ref from a snapshot
rolestringnoARIA role, e.g. button|link|textbox (pair with name)
namestringnoAccessible name / visible label (pair with role)
nthnumberno0-based index when role+name is ambiguous
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
button"left" | "right" | "middle"no
clickCountnumberno
trustedbooleanno
snapshotAfterbooleannoReturn what CHANGED on the page after this action instead of making you re-read it
failOnAuthWallbooleannoError 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).

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or ref, or role+name)
refstringnoElement ref from a snapshot
rolestringnoARIA role, e.g. button|link|textbox (pair with name)
namestringnoAccessible name / visible label (pair with role)
nthnumberno0-based index when role+name is ambiguous
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
textstringyes
tabIdstringnoTab id (default: active tab)
clearbooleanno
pressEnterbooleanno
keyEventsbooleanno
trustedbooleanno
snapshotAfterbooleannoReturn what CHANGED on the page after this action instead of making you re-read it
failOnAuthWallbooleannoError 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.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or ref, or role+name)
refstringnoElement ref from a snapshot
rolestringnoARIA role, e.g. button|link|textbox (pair with name)
namestringnoAccessible name / visible label (pair with role)
nthnumberno0-based index when role+name is ambiguous
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
valuesstring[]yes
tabIdstringnoTab id (default: active tab)
snapshotAfterbooleannoReturn what CHANGED on the page after this action instead of making you re-read it
failOnAuthWallbooleannoError 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).

ArgumentTypeRequiredDescription
keystringyes
modifiersstring[]no
tabIdstringnoTab id (default: active tab)
failOnAuthWallbooleannoError with [AUTH_REQUIRED] if this lands on a sign-in wall (expired session)
{
  "tool": "press",
  "args": {
    "key": "<key>"
  }
}

hover

Hover over an element.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or ref, or role+name)
refstringnoElement ref from a snapshot
rolestringnoARIA role, e.g. button|link|textbox (pair with name)
namestringnoAccessible name / visible label (pair with role)
nthnumberno0-based index when role+name is ambiguous
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
snapshotAfterbooleannoReturn 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.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or pass ref)
refstringnoElement ref from a snapshot
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
xnumberno
ynumberno
deltaXnumberno
deltaYnumberno
tabIdstringnoTab id (default: active tab)
{
  "tool": "scroll",
  "args": {
    "selector": "<selector>"
  }
}

fill_form

Fill multiple fields (keyed by selector) and optionally submit.

ArgumentTypeRequiredDescription
fieldsRecord<string, string | boolean>yes
submitSelectorstringno
frameIdnumbernoFrame id from frames_list
allFramesbooleannoAct on the first match in ANY frame (the element may be in an iframe)
tabIdstringnoTab id (default: active tab)
failOnAuthWallbooleannoError 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.

ArgumentTypeRequiredDescription
selectorstringnoCSS selector (or pass ref)
refstringnoElement ref from a snapshot
filesstring[]yes
tabIdstringnoTab id (default: active tab)
{
  "tool": "upload_file",
  "args": {
    "files": []
  }
}

On this page