DOMShell
Drive Chrome with filesystem commands (ls, cd, grep, click, type). One MCP tool, multi-agent.
Versions
No versions found.
Tools 38
domshell_tabs List all open browser tabs with their IDs, titles, URLs, and window info. Use this to find the right tab before switching. Equivalent to
domshell_here Jump to the active tab in the last focused Chrome window. Use this to quickly enter whichever tab the user is currently looking at, without needing to know the tab ID.
domshell_for Iterate over command output lines. Runs a source command, splits output into lines, and for each line replaces {} in the action template and executes it. Capped at 50 items and 120 seconds.\n\nSeparator is
domshell_ls List children of the current directory. In the DOM tree: shows elements as files and directories. At the browser level (~): shows tabs/windows.\n\nFlags:\n -l Long format (more detail per element)\n --meta Show DOM properties (href, src, id) inline — great for extracting links\n --text Show visible text preview per element\n -r Recursive listing\n -n N Limit to N results\n --offset N Skip first N children (pagination)\n --type ROLE Filter by AX role (link, heading, button, etc.)\n --count Just count children\n --textlen N Max chars for text preview (default 80)\n --after NAME Show only children after the named element (sibling navigation)\n --before NAME Show only children before the named element (sibling navigation)\n\nSibling navigation: Use --after/--before to find content relative to a landmark. Example: ls --after See_also_heading -n 3 --text shows the 3 elements after a heading. Combines with --type: ls --after intro --type link --meta.\n\nPipe support: ls output can be piped into grep for filtering: ls --text | grep keyword.\n\nBest for: viewing immediate children of the current element.\nNOT recommended for: searching deep in the tree — use domshell_find or domshell_grep instead.
domshell_cd Change directory — sets your scope for all subsequent commands (ls, find, grep, text all operate relative to current directory).\n\nPaths:
domshell_pwd Print the current working directory path in the DOM tree.
domshell_cat Read detailed metadata about a DOM element: role, type, AX ID, DOM backend ID, value, child count, text content (textContent), visible text (innerText — only rendered text, respects CSS visibility), and outerHTML snippet.
domshell_find Deep recursive search from the CURRENT DIRECTORY downward. Scope matters: cd into a section first, then find, to get only that section
domshell_grep Search for elements matching a pattern. Matches against name, role, and value. Case-insensitive.\n\nBy default, searches only IMMEDIATE children. Use recursive: true to search all descendants — this is almost always what you want for finding sections or elements by name.\n\ngrep is the primary section-discovery tool. Its output gives you element names and paths that you then use with cd, text, find, and other commands. This is how you chain commands together efficiently.\n\nCommon patterns:\n grep
domshell_tree Show a tree view of the current directory in the DOM, displaying the hierarchy of elements with type prefixes [d]=directory, [x]=interactive, [-]=static.
domshell_text Extract ALL text content from the current directory or a named child, including every descendant. Returns full textContent in a single call.\n\nThe name parameter lets you read any child without cd
domshell_read Structured subtree extraction — returns the hierarchy of elements under the current directory or a named child, with roles, names, and values in one call. Think of it as
domshell_refresh Force re-fetch the Accessibility Tree. Use after page navigation or significant DOM changes. Note: the tree also auto-refreshes when changes are detected.
domshell_diff Compare the current AX tree against the snapshot taken before the last write/navigate action (click, type, submit, select, navigate, open, back, forward, scroll). Shows added, removed, and changed elements. Use after a click or form submission to see exactly what changed on the page instead of re-exploring with ls/find.
domshell_eval Evaluate a JavaScript expression in the tab context. Returns the result. WRITE TIER as of 2.0.8 — the expression runs via CDP Runtime.evaluate with no side-effect gate, so any JavaScript can mutate DOM/window/global state. Requires --allow-write, same as domshell_js. Use for one-off expressions (property reads, single-value extractions); prefer domshell_js for multi-statement scripts.\n\nExamples:\n eval document.title\n eval window.location.href\n eval document.querySelectorAll(
domshell_functions List callable global JavaScript functions on the current page. Shows function name, arity (parameter count), and parameter names. Useful for discovering page APIs (e.g. MediaWiki
domshell_watch Re-run a command periodically and collect results. Useful for monitoring dynamic content changes within a single tool call instead of making N separate calls.\n\nOptions:\n --interval N Seconds between runs (default: 2, min: 0.5)\n --times N Number of iterations (default: 5, max: 100)\n --until-change Stop early when output differs from previous iteration\n\nTotal runtime capped at 120 seconds.\n\nExamples:\n watch ls --times 3 --interval 1\n watch \
domshell_script Save and run multi-command scripts. Scripts persist across service worker restarts.\n\nSubcommands:\n script list List saved scripts\n script save <name> cmd1 ; cmd2 Save commands (separated by
domshell_each Run a command across multiple open tabs. Iterates over all non-chrome tabs (optionally filtered by title/URL pattern), switches into each, runs the command, and collects results. Restores the original tab when done.\n\nOptions:\n --pattern FILTER Only tabs whose title or URL contains FILTER\n --limit N Process at most N matching tabs\n\nExamples:\n each eval document.title Title from every tab\n each --pattern wiki eval document.title Only Wikipedia tabs\n each --pattern wiki --limit 3 eval document.title First 3 Wikipedia tabs
domshell_extract_links Extract all links under the current directory or a named child as a clean numbered list in [text](url) format. Purpose-built for link extraction — returns display text and URLs in one call.\n\nExamples:\n extract_links All links under current directory\n extract_links main -n 20 First 20 links in
domshell_extract_table Extract a table element as structured markdown or CSV. Reads all rows and cells, returns formatted output. First row is treated as the header.\n\nExamples:\n extract_table table_1234 Markdown table\n extract_table table_1234 --format csv CSV format\n extract_table table_1234 -n 10 First 10 rows only
domshell_click Click a DOM element. May trigger navigation, form submission, or page changes. The DOM tree auto-refreshes on the next command.\n\nAfter clicking: use domshell_ls or domshell_pwd to verify the page actually changed. Some clicks (like search buttons) may need a domshell_refresh to see updated content. If clicking a search/submit button doesn
domshell_focus Focus an input element. Use before
domshell_scroll Scroll the page or scroll a specific element into view. Use this when content is below the fold or when you need to reach elements not currently visible.\n\nModes:\n scroll down [N] Scroll page down by N viewport heights (default: 1)\n scroll up [N] Scroll page up by N viewport heights (default: 1)\n scroll element_name Scroll a specific element into the center of the viewport\n\nReturns current scroll position as percentage. Use after scrolling to verify position.\n\nCommon patterns:\n scroll down → ls --text (see what
domshell_js Execute arbitrary JavaScript in the current tab and return the result. Use this for complex DOM queries, CSS selector extraction, or any operation that would take multiple DOMShell commands.\n\nThe code runs in the page context with full DOM access. Promises are automatically awaited. Results are JSON-serialized (truncated at 10000 chars).\n\nCommon patterns:\n js document.title\n js document.querySelectorAll(
domshell_type Type text into the currently focused element. Use domshell_focus first to target an input field.\n\nFor search forms: after typing, you may need to either:\n 1. click the submit/search button, OR\n 2. type
domshell_navigate Navigate the current tab to a URL. Automatically rebuilds the accessibility tree after navigation completes. Requires a tab context (cd into a tab first). Use this to go to a specific website without opening a new tab.
domshell_open Open a URL in a new tab and enter it (path becomes ~/tabs/<id>). Automatically builds the accessibility tree after page loads. Works from any location.\n\nAfter opening a page, a typical extraction workflow is:\n 1. open URL\n 2. find the section you need (find --type heading, or grep section_name with recursive: true)\n 3. cd into the container\n 4. text (for content) or find --type link --meta (for links)
domshell_submit Atomic form submission — focuses input, clears existing value, types new value, then submits (clicks button or presses Enter). Replaces the 3-step focus → type → click pattern in one reliable call.\n\nExamples:\n submit search_input
domshell_back Navigate back in browser history. Equivalent to the browser back button. Automatically refreshes the AX tree after navigation. Use this instead of domshell_navigate when returning to a previously visited page — it
domshell_forward Navigate forward in browser history. Only works after a
domshell_close Close a tab. With no arguments, closes the current tab and returns to browser root. With a tab ID, closes that specific tab. Use after extracting data from a page to keep the tab count manageable.
domshell_select Select an option from a <select> dropdown element. Matches by option value first, then by visible text (case-insensitive). Dispatches change and input events to trigger form updates.\n\nExamples:\n select language_dropdown en\n select country_select United States
domshell_screenshot Capture a PNG screenshot of the current tab. Returns the image for visual inspection. Useful for understanding page layout on unfamiliar sites — one screenshot can replace multiple exploration calls (tree, ls, find) by showing you exactly what the page looks like.
domshell_wait Wait for an element to appear in the AX tree. Polls the tree every 500ms until the element is found or timeout is reached. Use after clicks or navigation that trigger async content loading (SPAs, AJAX).\n\nExamples:\n wait results_list Wait for search results\n wait submit_btn --type button Wait for a button to appear\n wait loading_spinner --timeout 10 Wait up to 10 seconds
domshell_call Call a global JavaScript function by name. Arguments are auto-parsed as JSON if valid, otherwise passed as strings. Write-tier — requires --allow-write.\n\nExamples:\n call getCount\n call getMessage Agent\n call resetCount\n call setConfig {\
domshell_whoami Check authentication status by examining cookies for the current page. Shows session cookies and expiry.
domshell_about Report DOMShell runtime identity: MCP server version, bridged extension version (from HELLO handshake), whether an extension is currently connected, and connection timestamp. Use this at drive startup to pin-verify what you
Permissions 3
network medium filesystem low env_vars low