Elements

Elements — MCP tools exposed to agents.

34 tools in this group.

browser_find

Find an element and return its info (tag, text, bounding box). Use a CSS selector or a semantic locator (role, text, label, placeholder, testid, xpath, alt, title). Combine role with text or other locators to narrow results.

ParameterTypeRequiredDefaultDescription
altstringnoFind element by alt attribute
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
labelstringnoFind input by associated label text or aria-label
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
placeholderstringnoFind element by placeholder attribute
rolestringnoARIA role to match (e.g., "button", "link", "textbox", "heading", "checkbox")
selectorstringnoCSS selector for the element to find
sessionstringnoOptional: named session to run this call in (default: current session).
testidstringnoFind element by data-testid attribute
textstringnoFind element containing this text
timeoutintegerno30000Timeout in milliseconds (default: 30000)
titlestringnoFind element by title attribute
xpathstringnoFind element by XPath expression

browser_find_all

Find all elements matching a CSS selector and return their info (tag, text, bounding box)

ParameterTypeRequiredDefaultDescription
limitintegerno10Maximum number of elements to return (default: 10)
selectorstringyesCSS selector to match elements
sessionstringnoOptional: named session to run this call in (default: current session).

browser_map

Map interactive page elements with @refs for targeting. Returns a list of interactive elements (buttons, links, inputs, etc.) each with a short @ref like @e1, @e2. Use these refs as selectors in other commands (click, fill, etc.).

ParameterTypeRequiredDefaultDescription
selectorstringnoCSS selector to scope element discovery to a subtree (e.g. "nav", "#sidebar")
sessionstringnoOptional: named session to run this call in (default: current session).

browser_get_attribute

Get the value of an HTML attribute on an element

ParameterTypeRequiredDefaultDescription
attributestringyesAttribute name to retrieve (e.g., "href", "src", "class", "data-id")
selectorstringyesCSS selector for the element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_get_value

Get the current value of an input, textarea, or select element

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector for the form element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_count

Count the number of elements matching a CSS selector

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector to count matches for
sessionstringnoOptional: named session to run this call in (default: current session).

browser_is_visible

Check if an element is visible on the page. Returns true/false; an element that does not exist is false. Errors only when the check itself cannot run (invalid selector, lost browser connection).

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector for the element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_is_enabled

Check if an element is enabled (not disabled). Returns true/false.

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector or @ref for the element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_is_checked

Check if a checkbox or radio button is checked. Returns true/false.

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector or @ref for the checkbox/radio element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_expect

Assert a condition about the current page (URL, title, text, element state, count, or a JS expression). Returns a PASS message when the assertion holds; fails with the actual value otherwise. Use this to verify a browser flow reached the expected state.

ParameterTypeRequiredDefaultDescription
expectedstring | number | booleannoExpected value: the string/substring for url, title, text, and value targets, or the element count for the count target
expressionstringnoJavaScript expression for the "js" target; the assertion passes when it evaluates to a truthy value (false, null, empty string, 0, and errors fail)
negatebooleannofalseInvert the assertion (e.g. target "checked" with negate asserts the box is unchecked). Default: false
operatorstringnoHow to compare the actual value with "expected" for the url, title, text, and value targets (default: "contains") (one of: contains, equals)
selectorstringnoCSS selector or @ref: required for visible, hidden, enabled, checked, value, and count targets; optional for text (defaults to full page text)
sessionstringnoOptional: named session to run this call in (default: current session).
targetstringyesWhat to assert on: "url", "title", "text" (page or element text), "visible", "hidden" (absent or not visible), "enabled", "checked" (element state), "value" (form element value), "count" (matching-element count), or "js" (expression truthiness) (one of: url, title, text, visible, hidden, enabled, checked, value, count, js)

browser_click

Click an element by CSS selector. Waits for element to be visible, stable, and enabled.

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the element to click
sessionstringnoOptional: named session to run this call in (default: current session).
timeoutintegerno30000Timeout in milliseconds (default: 30000)

browser_dblclick

Double-click an element by CSS selector or @ref

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector or @ref for the element to double-click
sessionstringnoOptional: named session to run this call in (default: current session).

browser_hover

Hover over an element by CSS selector

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the element to hover over
sessionstringnoOptional: named session to run this call in (default: current session).

browser_type

Type text into an element by CSS selector. Waits for element to be visible, stable, enabled, and editable.

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the element to type into
sessionstringnoOptional: named session to run this call in (default: current session).
textstringyesThe text to type
timeoutintegerno30000Timeout in milliseconds (default: 30000)

browser_fill

Clear an input field and type new text. Waits for element to be editable, clears existing value, then types. Use this instead of browser_type when you want to replace the field contents.

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the input element
sessionstringnoOptional: named session to run this call in (default: current session).
textstringyesThe text to fill in

browser_press

Press a key or key combination on a specific element or the focused element. If selector is given, clicks the element first to focus it, then presses the key.

ParameterTypeRequiredDefaultDescription
keystringyesKey or key combination to press (e.g., "Enter", "Control+a", "Escape")
selectorstringnoCSS selector for the element to focus before pressing (optional, defaults to currently focused element)
sessionstringnoOptional: named session to run this call in (default: current session).

browser_keys

Press a key or key combination (e.g., "Enter", "Control+a", "Shift+Tab")

ParameterTypeRequiredDefaultDescription
keysstringyesKey or key combination to press (e.g., "Enter", "Control+a", "Shift+ArrowDown")
sessionstringnoOptional: named session to run this call in (default: current session).

browser_keyboard_type

Type text at the current focus, generating real key events. No selector — acts on the focused element.

ParameterTypeRequiredDefaultDescription
sessionstringnoOptional: named session to run this call in (default: current session).
textstringyesText to type at the focused element

browser_keyboard_inserttext

Insert text at the current focus WITHOUT synthesizing key events (IME/paste-like). No selector.

ParameterTypeRequiredDefaultDescription
sessionstringnoOptional: named session to run this call in (default: current session).
textstringyesText to insert at the focused element

browser_keydown

Press and hold a key without releasing it (pair with browser_keyup for held-modifier sequences).

ParameterTypeRequiredDefaultDescription
keystringyesKey to hold down (e.g., "Shift", "Control", "a")
sessionstringnoOptional: named session to run this call in (default: current session).

browser_keyup

Release a held key (pair with browser_keydown).

ParameterTypeRequiredDefaultDescription
keystringyesKey to release (e.g., "Shift", "Control", "a")
sessionstringnoOptional: named session to run this call in (default: current session).

browser_select

Select an option in a <select> element by value

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the <select> element
sessionstringnoOptional: named session to run this call in (default: current session).
valuestringyesThe value to select

browser_check

Check a checkbox or radio button. Idempotent — does nothing if already checked.

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the checkbox or radio button
sessionstringnoOptional: named session to run this call in (default: current session).

browser_uncheck

Uncheck a checkbox. Idempotent — does nothing if already unchecked.

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector for the checkbox
sessionstringnoOptional: named session to run this call in (default: current session).

browser_focus

Focus an element by CSS selector or @ref

ParameterTypeRequiredDefaultDescription
indexintegerno0-based positional index: select the Nth match of the CSS selector (default: the first match). Mutually exclusive with last.
lastbooleannoSelect the last match of the CSS selector. Mutually exclusive with index.
selectorstringyesCSS selector or @ref for the element to focus
sessionstringnoOptional: named session to run this call in (default: current session).

browser_scroll

Scroll the page or a specific element

ParameterTypeRequiredDefaultDescription
amountintegerno3Number of scroll increments (default: 3)
directionstringno"down"Scroll direction: up, down, left, right (default: down) (one of: up, down, left, right)
selectorstringnoCSS selector for element to scroll to (optional, defaults to viewport center)
sessionstringnoOptional: named session to run this call in (default: current session).

browser_scroll_into_view

Scroll an element into view, centering it on screen

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector for the element to scroll into view
sessionstringnoOptional: named session to run this call in (default: current session).

browser_mouse_click

Click at coordinates or at the current mouse position. If x and y are provided, moves the mouse there first.

ParameterTypeRequiredDefaultDescription
buttonintegerno0Mouse button (0=left, 1=middle, 2=right). Default: 0
sessionstringnoOptional: named session to run this call in (default: current session).
xnumbernoX coordinate to click at
ynumbernoY coordinate to click at

browser_mouse_move

Move the mouse to specific coordinates

ParameterTypeRequiredDefaultDescription
sessionstringnoOptional: named session to run this call in (default: current session).
xnumberyesX coordinate
ynumberyesY coordinate

browser_mouse_down

Press a mouse button down at the current position

ParameterTypeRequiredDefaultDescription
buttonintegerno0Mouse button (0=left, 1=middle, 2=right). Default: 0
sessionstringnoOptional: named session to run this call in (default: current session).

browser_mouse_up

Release a mouse button at the current position

ParameterTypeRequiredDefaultDescription
buttonintegerno0Mouse button (0=left, 1=middle, 2=right). Default: 0
sessionstringnoOptional: named session to run this call in (default: current session).

browser_drag

Drag from one element to another

ParameterTypeRequiredDefaultDescription
sessionstringnoOptional: named session to run this call in (default: current session).
sourcestringyesCSS selector or @ref for the source element
targetstringyesCSS selector or @ref for the target element

browser_upload

Set files on an input[type=file] element

ParameterTypeRequiredDefaultDescription
filesarrayyesArray of absolute file paths to upload
selectorstringyesCSS selector for the file input element
sessionstringnoOptional: named session to run this call in (default: current session).

browser_highlight

Highlight an element with a red outline for 3 seconds. Useful for visual debugging.

ParameterTypeRequiredDefaultDescription
selectorstringyesCSS selector or @ref for the element to highlight
sessionstringnoOptional: named session to run this call in (default: current session).

On this page