Tools Reference
All 51 tools are discovered dynamically —webrain_guide lists them for the
LLM. This page is the authoritative reference; descriptions match
webrain-mcp/src/tools.rs. Every browser tool also accepts an optional
session_id to route to a webrain_open_session pool.
Navigate & Observe
webrain_guide
webrain_guide
challenge field after webrain_navigate; run scripts/stealth_solve.py for gated pages), and the extraction tool matrix. Call FIRST when unsure which webrain tool/browser to use.webrain_snapshot
webrain_snapshot
webrain_eval
webrain_eval
webrain_page_info
webrain_page_info
webrain_a11y
webrain_a11y
[{role, name, value, css_path}]. Read-only — understand structure, then interact via webrain_navigate/webrain_snapshot element indices. Filters: role, filter (substring on name OR value OR css_path), max_nodes.ARIA cheat-sheet: combobox (dropdown), option (menu item), tab, radio (segmented control), textbox, button. If role=<x> returns [], drop the role filter and filter on the label text.webrain_semantic_tree
webrain_semantic_tree
role "name" lines for the LLM, plus the raw AX JSON.webrain_get_html
webrain_get_html
webrain_snapshot/clean/eval/extract_json return text/structure cheaper. Only when the task explicitly asks for HTML markup.webrain_console
webrain_console
webrain_screenshot
webrain_screenshot
full_page captures the full scrollable page.Interact
webrain_click
webrain_click
webrain_navigate elements list).webrain_type
webrain_type
webrain_press
webrain_press
webrain_type to submit forms.webrain_scroll
webrain_scroll
direction: up | down.webrain_tab
webrain_tab
new (url, returns id, becomes active) | switch (id) | close (id) | list.webrain_dismiss_overlays
webrain_dismiss_overlays
Extract
webrain_autoschema
webrain_autoschema
webrain_extract_json schema. Zero LLM. min_occurrences (default 3).webrain_extract_json
webrain_extract_json
type: text | attr | html | xpath. adaptive: true auto-relocates the container when the base selector matches nothing (site redesigned).webrain_extract_regex
webrain_extract_regex
[{label, re}]. Scans page HTML (catches href/mailto).webrain_table
webrain_table
{header: cell} row objects per <table>. Zero LLM.webrain_get_jsonld
webrain_get_jsonld
<script type="application/ld+json"> blocks — schema.org product/article/organization data. Zero LLM, zero cost.webrain_bm25
webrain_bm25
webrain_clean
webrain_clean
Crawl & Batch
webrain_batch
webrain_batch
op: fetch (read text) | extract (CSS/XPath schema) | interact (async JS interaction, then optional extract) | screenshot (save PNGs to dir).cdp_urls fans out across N CDP backends round-robin (per-proxy isolation). output persists the full payload to disk. Optional disable_resources, network_idle, wait_selector shared with navigate.webrain_spider
webrain_spider
allow/deny URL-regex filters, retry, delay_ms, autothrottle (adaptive backoff), crawldir checkpoint/resume, crawl_timeout_secs.webrain_sitemap
webrain_sitemap
Sitemap: → index → leaf sitemaps → every <loc>. Pure HTTP, no browser. Returns {urls, count, sources}.webrain_scan
webrain_scan
{scrolls, height}. Run before extraction on SPA feeds.webrain_validate_urls
webrain_validate_urls
webrain_fetch_http
webrain_fetch_http
{url, status, text}. 10–100× faster than browser navigation, zero memory — but no JS/SPA/auth. Use for static pages.Search
webrain_search
webrain_search
duckduckgo is HTML-lite and scrape-friendly (default); google and bing return plain HTML via HTTP; brave returns an SPA shell — use webrain_navigate to Brave’s URL instead for real results.Vision
webrain_pixel
webrain_pixel
tile_width/tile_height (800), max_tiles (16).webrain_vision_index
webrain_vision_index
EMBED_URL (Qwen3-VL-Embedding-2B / vLLM), and add to a cosine index persisted to vision/{tag}.jsonl. Requires EMBED_URL set to a running /embeddings endpoint.webrain_vision_retrieve
webrain_vision_retrieve
tag, query, k (5).PDF & Media
webrain_pdf
webrain_pdf
webrain_pdf_extract
webrain_pdf_extract
pdf_type (TextBased/Scanned/Mixed), confidence, layout (is_complex, pages with tables/columns), full markdown, and per-page texts. Proper ToUnicode CMap decoding fixes LaTeX/CID-font PDFs. Single path or batch paths.webrain_pdf_render
webrain_pdf_render
--features pdfium. Optional tile_size splits pages into square tiles.webrain_pdf_images
webrain_pdf_images
webrain_pdf_render for those). Works in the default build.webrain_download
webrain_download
engine http (plain streaming, optional filter_extension) or ytdlp (HLS/DASH/.m3u8, playlists, age/cookie-bound media — full yt-dlp passthrough via args).webrain_media
webrain_media
url: CDP Network capture of the full load — catches JS-loaded .m3u8/.mp4/manifest/player-API requests. Without: Performance API + <video>/<audio>/<source> scan of the current page.webrain_get_images
webrain_get_images
[{src, alt, width, height}]. Useful for product/photo URLs.Auth & Sessions
webrain_login
webrain_login
WEBRAIN_USER/WEBRAIN_PASS): the server decrypts the secret in-process and injects it via CDP — the value never passes through the model. Auto-discovers login fields; on a 2FA gate it TOTP-injects if a seed is stored and returns waiting_for_human: true. Reply is status-only.webrain_profiles
webrain_profiles
webrain_save_state
webrain_save_state
<profiles_dir>/<service>/<profile>/state.json so a login follows you across machines.webrain_restore_state
webrain_restore_state
<profiles_dir>/<service>/<profile>/state.json into the current browser. Navigate to the target site first — localStorage is origin-scoped.webrain_open_session
webrain_open_session
webrain_batch/webrain_navigate calls to it via session_id — use different sessions to isolate tasks or browsers (e.g. one per CDP_URL for parallel subagents).webrain_close_session
webrain_close_session
default session cannot be closed.webrain_list_sessions
webrain_list_sessions
webrain_close_launch
webrain_close_launch
webrain launch (kills the browser process; the persistent profile + cookies remain for the next launch).