Skip to content

Tools reference

BrowserControl exposes 39 MCP tools organized into seven categories. Every tool that touches the page returns an annotated screenshot plus a textual element map, so the model always has the latest visual context.

Element IDs are fresh on every response

The [1], [2], … numbers you see in a tool's response are only valid until the next screenshot. After any navigation, click, or state change, read the new IDs from the latest screenshot/map. The tools re-screenshot automatically — your agent just needs to look at the response.

Categories

  • Navigation


    Navigate the browser: open URLs, history, scroll.

  • Interaction


    Click, type, hover, press keys, wait.

  • Tabs


    Open, switch, close, and list browser tabs.

  • Forms


    Dropdowns, checkboxes, file uploads.

  • Content


    Read the page: text, markdown, JS evaluation, screenshots.

  • DevTools


    Console, network, errors, performance, cookies, viewport.

  • Recording


    Capture Playwright traces and DOM snapshots for debugging.

Quick index

Tool Description
navigate_to(url) Open a URL. Auto-falls back to 127.0.0.1 for localhost if the proxy blocks it.
go_back() Browser history back.
go_forward() Browser history forward.
refresh_page() Reload the current page.
scroll(direction, amount) Scroll the viewport.

Interaction

Tool Description
click(element_id) Click by SoM number. Resolves the actual DOM element first, so overlays don't fool it.
click_at(x, y) Click raw coordinates.
type_text(element_id, text) Atomic element.fill() — reliable for forms.
press_key(key) Any keyboard key: Enter, Tab, Escape, arrows, etc.
hover(element_id) Hover for tooltips/menus.
scroll_to_element(element_id) Scroll the element into view.
wait(seconds) Sleep — for animations or lazy-loaded content.

Tabs

Tool Description
create_tab(url=None) Open a new tab.
switch_tab(index) Switch by 0-based index.
close_tab(index) Close a tab.
list_tabs() List all tabs with title, URL, active marker.

Forms

Tool Description
select_option(element_id, option) Pick from a <select> dropdown.
check_checkbox(element_id, check=True) Toggle a checkbox.
upload_file(element_id, file_path) Native file upload via set_input_files.

Content

Tool Description
get_page_content() Whole page as Markdown (script/style stripped).
get_text(element_id) Read text from a specific element.
get_page_info() Current URL + title.
run_javascript(script) Run JS, return serialized result + screenshot.
screenshot(annotate, full_page) Annotated viewport, clean viewport, or clean full-page.

DevTools

Tool Description
get_console_logs(clear=False) Last 50 captured console messages.
get_network_requests(num_requests, clear=False) Method, URL, status, duration (ms).
get_page_errors() Uncaught JS exceptions with stack traces.
run_in_console(code) Eval JS with structured error handling.
inspect_element(element_id) Computed styles, dimensions, attributes.
get_page_performance() TTFB, FCP, DOMContentLoaded, load time.
get_cookies() All cookies in the current context.
set_cookie(name, value, domain, path) Set a cookie (domain auto-inferred).
delete_cookie(name) Delete cookies by name.
clear_cookies() Wipe all cookies.
set_viewport(width, height) Resize the viewport on the fly.

Recording

Tool Description
start_recording(name="") Begin a Playwright trace.
stop_recording() Save the trace.
take_snapshot(name="") Save PNG + HTML + URL triplet.
list_recordings() List recent recordings and snapshots.