Skip to main content
Glama
mcp-browser-dev-tools

mcp-browser-dev-tools

by Hinaser

ensure_browser

Reuse an existing browser or launch one when none is reachable, optionally opening a URL in a new tab. Prevents duplicate launches on the same profile.

Instructions

Reuse a reachable browser or launch one (with the MCP_BROWSER_USER_DATA_DIR profile when set), optionally opening url in a new tab. It never launches twice on one profile (except from WSL).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "browserFamily": "<browserFamily>"
    },
    "name": "ensure_browser"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoOpen this in a new tab.
portNoDebugging port (default: the configured endpoint's, usually 9222).
waitMsNoms to wait for the endpoint after launch (default 5000).
addressNoChromium/Edge bind address; loopback unless MCP_BROWSER_ALLOW_REMOTE_ENDPOINTS=1.
createTabNoDefault: true when url is given.
skipDoctorNoReturn right after spawning, without waiting or a doctor report.
userDataDirNoProfile for a new launch (default MCP_BROWSER_USER_DATA_DIR).
browserFamilyYesRequired in auto mode.
launchIfMissingNoLaunch when none is reachable (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.4

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a non-obvious idempotency guarantee ('never launches twice on one profile') plus a WSL exception and the MCP_BROWSER_USER_DATA_DIR profile source. It does not say what happens on failure, whether a launch persists across sessions, or what the tool returns, which matters for a process-spawning side-effect operation.

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?

Two dense sentences, front-loaded with the core reuse-or-launch behavior, with the reuse constraint placed last. The parenthetical '(except from WSL)' is terse to the point of ambiguity but costs little space, keeping the definition tight overall.

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?

For a nine-parameter tool with rich schema coverage but no output schema, the description covers the launch/reuse decision well but leaves the return value and failure modes unexplained; an agent does not learn whether it receives a browser handle, endpoint, or doctor report to use in subsequent calls.

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 coverage is 100%, so all nine parameters are already documented in the input schema, establishing a baseline of 3. The description adds only marginal semantics beyond that, mostly restating the profile/env-var interaction and the default-on url tab behavior.

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?

States a specific pair of actions on a specific resource: reuse an existing reachable browser or launch one, optionally opening a url in a new tab. The lifecycle role (browser acquisition) is clearly distinguishable from sibling tools like new_tab, attach_tab, or navigate, which presume an already-managed browser.

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

Usage Guidelines3/5

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

Usage is implied rather than prescribed: the tool is the acquisition step, and launchIfMissing defaults to true, so an agent can infer it should call this before tab-level tools. However, it never explicitly says 'call this first' or contrasts itself with attach_tab/list_tabs, and the WSL caveat is stated without explaining when that matters.

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