Skip to main content
Glama
kamkozlowski

dev-browser-mcp

by kamkozlowski

Run browser script

dev_browser_run

Execute sandboxed JavaScript in a persistent Chromium browser to automate multi-step web tasks, interact with pages, capture screenshots, and manage browser state without Node.js dependencies.

Instructions

Run a sandboxed JavaScript script against a persistent browser (SawyerHood/dev-browser).

This is the main tool. Prefer it whenever you need more than a single navigation/click/fill.

Sandbox is QuickJS, not Node.js: no require/import/fs/fetch/process. Available: browser.getPage(nameOrId), browser.newPage(), browser.listPages(), browser.closePage(name) saveScreenshot(buf, name), writeFile(name, data), readFile(name), console.*, setTimeout Pages are Playwright Page objects (goto, click, fill, locator, evaluate, screenshot, snapshotForAI, getByRef, getByRole, waitForSelector, waitForURL, cua, domCua).

Write small scripts. Named pages persist. End with console.log of the next-decision state. On local dev servers use { waitUntil: "domcontentloaded" }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript to run in the QuickJS sandbox.
browserNoNamed daemon-managed browser instance. Default: DEV_BROWSER_BROWSER or 'default'.
connectNoAttach to a running Chrome instance. true/auto-discover, or a CDP URL like http://localhost:9222.
headlessNoLaunch daemon Chromium without a window.
timeoutSecondsNoScript execution timeout in seconds. Default: 30.
ignoreHttpsErrorsNoIgnore HTTPS certificate errors for daemon-launched Chromium.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the sandbox (QuickJS vs Node.js), lists unavailable capabilities (require/import/fs/fetch/process), enumerates available globals and Page methods, explains that named pages persist, and advises on script output (console.log next-decision state). Missing details include error handling behavior, timeout consequences (though timeoutSeconds parameter exists), and session lifecycle, but overall it provides substantial behavioral context beyond a minimal description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately long but well-structured. It opens with the core purpose, immediately gives usage prioritization, then systematically covers sandbox limitations, available APIs, page object methods, and best practices. Each sentence contributes necessary information. A slight reduction in bullet-like listing could improve conciseness, but the structure effectively front-loads critical guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (script execution, persistent browser, no output schema), the description covers usage context, sandbox constraints, and scripting tips well. However, it does not explicitly state the return value format (e.g., does it return the console output, the script result, or an execution status?). It also omits error scenarios and default timeout behavior. While the tips partially compensate, the missing return information leaves an agent uncertain about output handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description does not add new information about the parameters themselves beyond what the schema already provides (e.g., script content, browser name, connect options, headless, timeout, HTTPS errors). The added value comes from the execution context (sandbox, APIs), which is not parameter-specific. Thus the description meets but does not exceed the baseline for parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a sandboxed JavaScript script against a persistent browser. It explicitly labels itself as 'the main tool' and advises to prefer it 'whenever you need more than a single navigation/click/fill,' which distinguishes it from the long list of sibling single-action tools. The specific mention of QuickJS sandbox and available APIs solidifies its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance: 'Prefer it whenever you need more than a single navigation/click/fill.' It also provides practical tips like 'Write small scripts,' 'End with console.log of the next-decision state,' and using waitUntil for local dev servers. It lacks an explicit 'when not to use' statement but the preference direction is clear enough. An explicit mention of simpler sibling alternatives would elevate it to a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/kamkozlowski/dev-browser-mcp'

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