Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
transportNoTransport protocol (only stdio currently)stdio
browser-pathNoPath to a specific Chrome binary

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
start_browserC

Start the browser with configuration options.

stop_browserA

Stop the browser and clean up all resources.

get_browser_statusA

Return browser running state plus a list of open tabs.

navigateC

Navigate to a URL.

go_backA

Navigate back in browser history.

go_forwardA

Navigate forward in browser history.

reload_pageA

Reload the current page.

get_page_infoA

Return the current tab's URL and title.

    Reads ``document.title`` and ``location.href`` via ``page.evaluate``
    instead of trusting zendriver's cached ``tab.target`` metadata,
    which can be stale right after navigation - and on some zendriver
    versions ``tab.title`` is a coroutine method, so ``getattr`` would
    return the bound method repr string.
    
new_tabC

Open a new browser tab.

list_tabsA

List all open tabs with their URLs.

switch_tabB

Switch to a specific tab.

close_tabC

Close a specific tab.

clickA

Click a visible element.

    Accepts a CSS selector, the numeric id from ``get_interaction_tree``
    (e.g. ``"12"`` -> ``[data-zendriver-id="12"]``), or ``text`` to find
    by visible text content.
    
click_shadowA

Click the deepest interactive element inside a custom element's shadow DOM.

    Use when a page wraps a real ``<button>`` / ``[role="radio"]`` /
    ``[role="checkbox"]`` in one or more open shadow roots
    (``<nes-button>``, ``<sds-radio>``, ``<lion-input>`` and friends).
    ``selector`` should match the outer custom element in the light
    DOM; this tool then recurses through every nested ``shadowRoot``
    up to ``max_depth`` levels and dispatches a composed click
    sequence on the first interactive descendant it finds.

    Returns an error when the host isn't found or no inner interactive
    element lives inside its shadow tree.
    
describe_shadowA

Dump a custom element's nested shadow-DOM tree for debugging.

    Returns a condensed JSON tree - each node has ``tag``, ``id``,
    ``role``, ``type``, ``text``, a ``light`` array of light-DOM
    children and a ``shadow`` array for the element's shadowRoot
    children (when open). Use this when ``find_buttons`` /
    ``find_inputs`` aren't surfacing a control you can see on the
    page; the result tells you the exact nested-host path so you
    can target ``click_shadow`` or chain custom queries.
    
type_textA

Focus an element and type text via CDP Input.insertText.

    By default the field is cleared first (``replace=True``). Set
    ``replace=False`` to append to the existing value.
    
clear_inputA

Clear an input or contenteditable element via the native setter.

    Uses the same technique React's synthetic-event system expects so
    controlled components actually see the change. Previously we called
    ``document.execCommand`` which is deprecated and invisible to
    React/Vue/Angular state.
    
focus_elementC

Focus on an element.

select_optionC

Select an option from a dropdown.

upload_fileC

Upload a file to a file input.

find_elementC

Find an element and return information about it.

Provides helpful suggestions if element is not found.

find_all_elementsA

Find all elements matching a selector. Returns quickly on no match.

    ``limit`` caps the number of summary rows; the total count is always
    accurate. Zendriver's ``select_all`` raises ``TimeoutError`` after
    ~10s on zero matches, which we catch and translate to a clean
    "no elements found" message.
    
get_element_textC

Get the text content of an element.

get_element_attributeC

Get an attribute value from an element.

find_buttonsA

Find all clickable elements on the page - including shadow DOM.

    Walks both the light DOM and every open shadow root, so buttons
    hidden inside custom elements like ``<nes-button>`` or
    ``<sds-cta>`` show up. Recognises native tags (button, a, input,
    summary) plus ARIA roles (button, link, checkbox, radio, switch,
    menuitem, tab, option, treeitem) and cursor=pointer elements
    with an onclick handler. Each entry shows the host's CSS
    selector; for shadow-wrapped buttons use ``click_shadow`` to
    reach the inner interactive element.
    
find_inputsA

Find all input fields on the page - including shadow DOM.

    Walks both the light DOM and every open shadow root. Recognises
    ``<input>``, ``<textarea>``, ``role=textbox/searchbox/combobox``,
    ``[contenteditable="true"]`` and custom elements whose tag name
    suggests an input (contains "input" or "field"). ``filter_type``
    is a case-insensitive substring match against the input's type
    attribute or ARIA role.
    
get_contentB

Get the page HTML, max_chars chars from offset.

    The first line reports the slice, total size, and the next offset
    when more content is available.
    
get_text_contentC

Get visible page text; same pagination contract as get_content.

get_interaction_treeA

List interactive elements as compact JSON with numeric ids.

    The ids double as selectors for click/type tools. ``limit`` caps
    the element count.
    
scrollA

Scroll the page up or down by pixels (instant, not animated).

    Uses JavaScript ``window.scrollBy`` directly. The earlier implementation
    called zendriver's ``scroll_down`` which interprets its argument as a
    *percentage* of the viewport and animates via
    ``Input.synthesizeScrollGesture`` - turning e.g. 500 into five
    viewport-heights of smooth scrolling.
    
scroll_to_elementA

Scroll to bring an element into view, or raise if it's missing.

    Honest success / failure reporting: if no element matches the
    selector we raise ``ElementNotFoundError`` instead of silently
    no-op'ing with a fake "Scrolled to: ..." message.
    
get_cookiesA

Read document.cookie for the current origin only.

    Intentionally limited: HTTP-only and other-origin cookies are
    invisible here. For full-fidelity cookie access use
    ``list_all_cookies`` / ``export_cookies`` from the ``cookies``
    module instead.
    
set_cookieA

Set a cookie via document.cookie (limited to current origin).

    Cannot set HTTP-only or cross-origin cookies. Prefer
    ``import_cookies`` for restoring full sessions across origins.
    
get_local_storageA

Get all localStorage items.

set_local_storageC

Set a localStorage item.

clear_storageA

Clear localStorage and sessionStorage.

get_network_logsB

Get recent network request logs captured via CDP.

get_console_logsC

Get recent console logs captured via CDP.

clear_logsA

Clear all captured network and console logs.

wait_for_networkA

Wait for network activity to become idle.

    Useful after triggering actions that cause API calls.

    Args:
        timeout: Maximum time to wait in seconds
        idle_time: How long network must be idle to consider it done
    
wait_for_requestB

Wait for a matching request to complete (response received).

    Only log entries with a resolved status code are considered, so this
    returns after the server replied, not the moment Chrome sent the
    request. ``url_pattern`` is a case-insensitive substring of the full
    URL; ``method`` optionally filters on HTTP verb.
    
fill_formA

Fill multiple form fields. Pass JSON like {"#email": "x@y.com"}.

    Reports which selectors succeeded and which were missing so the
    caller can tell partial fills from full ones. Fields are cleared
    before typing so values don't concatenate with existing content.
    
submit_formA

Submit a form, honouring framework-level submit listeners.

    Uses ``form.requestSubmit()`` so React/Vue/Formik ``onSubmit``
    handlers fire and HTML validation runs, falling back to a bubbling
    ``submit`` event and finally ``form.submit()`` for ancient pages.
    Returns an error if the selector matches no form.
    
press_keyA

Press a keyboard key via CDP Input.dispatchKeyEvent.

    Uses real browser key events, not synthetic JS dispatch - so native
    form-submit semantics, browser shortcuts, and IME all behave as
    they would with a human keyboard. When ``selector`` is given we
    focus that element first.

    Recognised names: ``Enter``, ``Tab``, ``Escape``, ``Backspace``,
    ``Delete``, ``ArrowUp/Down/Left/Right``, ``Space``, ``Home``, ``End``,
    ``PageUp``, ``PageDown``. Any single character (e.g. ``"a"``) is also
    accepted.
    
press_enterA

Press Enter key - convenience wrapper for press_key('Enter').

mouse_clickC

Click at specific coordinates.

screenshotA

Screenshot the page as JPEG, downscaled to max 1024px wide.

    Args:
        save_path: Optional path to also save to disk at full
            resolution (format from the extension).
        full_resolution: Return the image without downscaling.
    
execute_jsA

Execute JavaScript code on the page and return the result.

    IMPORTANT: Do NOT use 'return' statements directly in your script.
    The script is automatically wrapped to capture the result.

    Examples:
        Good: document.title
        Good: (function() { const x = 1 + 1; return x; })()
        Bad:  return document.title  // SyntaxError!

    For complex scripts, wrap in an IIFE:
        (function() {
            const data = [];
            // ... your code ...
            return data;
        })()
    
waitB

Wait for specified seconds.

wait_for_elementA

Wait for an element to appear on the page.

    Args:
        selector: CSS selector to wait for
        timeout: Maximum time to wait in seconds (default: 30s for SPAs)
        visible: If True, also checks element is visible (not hidden)
    
run_security_auditA

Run a comprehensive security audit on the current page.

    Checks for: HTTPS, CSRF protection, password security, mixed content,
    inline scripts, SRI (Subresource Integrity), forms, sensitive data exposure,
    and JavaScript security patterns.
    
bypass_cloudflareA

Solve a Cloudflare interactive (Turnstile) challenge on the current page.

    Waits up to ``timeout`` seconds for the challenge iframe and then clicks
    the checkbox every ``click_delay`` seconds until the input disappears
    or gets a value. Raises TimeoutError if the challenge cannot be solved
    in time.
    
is_cloudflare_challenge_presentA

Report whether a Cloudflare interactive challenge is visible.

    Fast probe - use before ``bypass_cloudflare`` to skip the click cycle
    when the page already passed.
    
set_user_agentA

Override User-Agent, Accept-Language, and navigator.platform.

    Applies to every subsequent request on the current tab until
    ``clear_user_agent`` is called or the tab closes. ``platform`` should
    match the UA (e.g. ``"Win32"`` for a Windows UA).
    
clear_user_agentA

Remove the override and restore the browser's real User-Agent.

    CDP ``setUserAgentOverride`` has no explicit "clear" command - and
    sending an empty string makes Chrome actually send ``User-Agent:``
    (empty), which is *more* fingerprintable than the real UA. Instead
    we query ``navigator.userAgent`` from a fresh evaluation (Chrome
    returns the real UA there, not the override) and set that back.
    
set_localeA

Override the browser locale (ICU C-style, e.g. nl_NL, en_US).

    Affects navigator.language, Intl APIs, and Accept-Language defaults.
    Pass an empty string to restore the system locale.
    
set_timezoneA

Override the IANA timezone (e.g. Europe/Amsterdam, America/New_York).

    Pass an empty string to restore the system timezone.
    
set_geolocationC

Override the browser's geolocation. Accuracy is in metres.

human_clickA

Click an element with a humanish cursor path.

    Accepts a CSS selector, the numeric ID from ``get_interaction_tree``,
    or visible text. ``move_duration`` is how long the mouse takes to
    reach the target (default 0.4s). Text-mode is shadow-DOM aware:
    the walker finds the tightest interactive element matching the
    text (descending into nested shadowRoots when needed) and aims
    the cursor at its composed viewport rect, so clicks land on the
    real handler inside custom elements like ``<nes-button>``.
    
human_typeA

Type text with per-keystroke delays modelling wpm.

    If ``selector`` is provided the element is focused first via a
    human click. 220 wpm is a fast but plausible adult typist.
    
estimated_typing_durationA

Return the expected seconds to type char_count chars at wpm.

    Useful for scheduling follow-up actions without guessing.
    
set_viewportA

Override the visible viewport dimensions.

    ``width`` / ``height`` in CSS pixels. ``device_scale_factor`` is DPR
    (1.0 for standard, 2.0 for Retina, etc.). ``mobile`` toggles the
    meta-viewport / overlay-scrollbar behaviour.
    
restore_viewportA

Restore the real device's viewport by clearing the override.

set_deviceA

Emulate a preset device.

    Call ``list_devices`` to see available profile keys
    (e.g. ``iphone-15-pro``, ``pixel-8``, ``ipad-pro``, ``desktop-1080p``).
    Also sets a matching User-Agent when the profile provides one.
    
list_devicesA

Return the list of available device profile keys.

set_cpu_throttleA

Slow the CPU by a multiplier.

    ``1.0`` disables throttling, ``4.0`` is DevTools' "4x slowdown",
    ``20.0`` roughly emulates a low-end phone.
    
set_network_conditionsA

Apply a named network-throttling preset.

    Options: ``offline``, ``slow-3g``, ``fast-3g``, ``4g``,
    ``no-throttling``. See ``list_network_profiles`` for the numeric
    values.
    
list_network_profilesA

Return the mapping of profile name -> CDP parameters.

emulate_mediaB

Force a CSS media type and/or prefers-color-scheme.

    ``media`` is typically ``""`` (default), ``"screen"``, or ``"print"``.
    ``prefers_color_scheme`` is ``""`` (default), ``"light"``, or ``"dark"``.
    
start_traceA

Begin recording a performance trace on the current tab.

    ``categories`` is a comma-separated CDP category filter; empty string
    uses the DevTools Performance-panel default profile. Only one trace
    can be active per tool instance at a time.
    
stop_traceA

Stop the active trace and write it to disk as JSON.

    Returns the absolute file path. If ``file_path`` is empty, writes to
    a timestamped file in the system temp directory. The output matches
    the format that Chrome DevTools' "Load profile" accepts.

    Handlers and state are cleared via ``finally`` so a failed
    ``tracing.end()`` or a late ``tracingComplete`` never leaves the
    tool stuck on "a trace is already in progress" for the rest of the
    process.
    
take_heap_snapshotB

Capture a V8 heap snapshot and write it to disk.

    The output is the same ``.heapsnapshot`` format Chrome DevTools saves,
    loadable via DevTools > Memory > Load.
    
run_lighthouseA

Audit url with Lighthouse and return scores + report path.

    - ``categories``: subset of ``performance``, ``accessibility``,
      ``best-practices``, ``seo``, ``pwa``. Defaults to the first four.
    - ``form_factor``: ``"mobile"`` or ``"desktop"``.
    - ``output_path``: where to save the JSON report. Empty => temp file.

    The browser must have been started with remote-debugging exposed,
    which zendriver does by default.
    
check_lighthouse_availableA

Report whether the lighthouse CLI is installed and its version.

    Use this before ``run_lighthouse`` if you want to prompt the user to
    install it.
    
start_screencastB

Begin recording screencast frames to output_dir.

    - ``fmt``: ``"jpeg"`` (smaller) or ``"png"`` (lossless).
    - ``quality``: 0-100, JPEG only.
    - ``max_width``: frames are downscaled to this width if larger.
    - ``every_nth_frame``: skip frames between captures (1 = every frame).
    
stop_screencastA

Stop the active screencast and return the frame directory + count.

export_screencast_mp4A

Stitch screencast frames in frames_dir into an mp4.

    Uses the default ``frame-%06d.jpg`` / ``frame-%06d.png`` pattern that
    ``start_screencast`` writes. ``fps`` is the playback rate (not the
    capture rate). Requires ffmpeg.
    
check_ffmpeg_availableA

Report whether the ffmpeg CLI is installed. Required for export_screencast_mp4.

get_accessibility_snapshotA

Return the page's accessibility tree with stable uids.

    Each node looks like ``{"uid": "ax_1b2c", "role": "button",
    "name": "Submit", "children": [...]}``. The uid can be passed to
    ``click_by_uid`` for deterministic interaction.

    - ``max_nodes``: cap the node count to keep the response small.
    - ``interesting_only``: skip ignored/structural nodes (``none``,
      ``generic``, ``InlineTextBox``, ``StaticText``) while keeping
      their children, so the tree stays compact without losing content.
    
click_by_uidB

Click the DOM node behind an accessibility uid.

    Resolves the cached ``backend_node_id`` to a remote object, then
    dispatches a native element click. Raises ``AccessibilityUidError``
    if the uid is unknown or the node was removed since the snapshot.
    
describe_uidA

Return the cached role + name for a uid, or raise if unknown.

export_cookiesA

Dump all cookies to a JSON file.

    Compatible with the "Edit This Cookie" Chrome extension export format
    and Playwright's storage state shape (just the cookies slice).
    Use ``import_cookies`` on another session to restore.
    
import_cookiesA

Load cookies from a JSON file produced by export_cookies.

    Silently skips entries that fail the ``CookieParam`` schema so a
    partial restore still works. Existing cookies with the same
    (name, domain, path) triple are overwritten by Chrome.
    
clear_all_cookiesA

Delete every cookie in the current browser context.

list_all_cookiesA

Return every cookie the browser is holding, across all origins.

block_urlsA

Block subsequent requests whose URL matches one of the patterns.

    Patterns use Chrome's wildcard syntax: ``*googletagmanager.com*``,
    ``*.png``, ``https://analytics.example.com/*``. Pass an empty list
    or call ``unblock_all_urls`` to remove all blocks.
    
unblock_all_urlsA

Remove every URL-pattern block.

set_extra_headersA

Add headers to every outgoing request on the current tab.

Useful for API keys, tenant overrides, tracing ids. Pass an empty dict to clear.

bypass_service_workerC

Skip the service worker and always go to the network.

grant_permissionsB

Grant permissions to origin (or all origins if omitted).

    Accepted names are listed by ``list_permission_names``. Any name
    that resolves to a full CDP enum key is also accepted (e.g.
    ``VIDEO_CAPTURE`` or ``videoCapture``).
    
reset_permissionsA

Reset every permission override in the current browser context.

list_permission_namesA

Return the short permission names we accept in grant_permissions.

configure_proxyA

Restart the browser so it routes traffic through proxy_url.

    Accepts ``http://host:port``, ``socks5://host:port``, or Chrome's
    full proxy rule syntax. Pass a ``user_data_dir`` to preserve the
    logged-in session across the restart - without it you start fresh.
    
clear_proxyC

Restart the browser without a proxy.

mock_responseA

Return a mocked response for every request matching url_pattern.

    ``url_pattern`` uses Unix glob syntax (``*``, ``?``), matched against
    the full request URL. ``body`` is UTF-8 text (cap: 10 MiB to prevent
    RAM exhaustion). Returns a rule id; pass it to
    ``stop_interception(rule_id)`` or call with no args to clear all.
    
fail_requestsA

Fail every request matching url_pattern with error_reason.

    ``error_reason`` must match a CDP ``Network.ErrorReason`` member
    (``Failed``, ``Aborted``, ``TimedOut``, ``AccessDenied``,
    ``ConnectionClosed``, ``ConnectionReset``, ``ConnectionRefused``,
    ``ConnectionAborted``, ``ConnectionFailed``, ``NameNotResolved``,
    ``InternetDisconnected``, ``AddressUnreachable``, ``BlockedByClient``,
    ``BlockedByResponse``).
    
list_interceptionsB

Return the active interception rules with their match counts.

stop_interceptionA

Remove one rule by id, or all rules when rule_id is omitted.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bituq/zendriver-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server