Skip to main content
Glama

browser_open

Connects to Chrome/Edge via CDP, returns open tab IDs for targeting browser actions, and can launch a debug-mode browser when no endpoint is live.

Instructions

Connect to Chrome/Edge running with --remote-debugging-port and return open tab IDs — required before all other browser_* tools. Pass launch:{} (or with overrides) to auto-spawn a debug-mode browser when no CDP endpoint is live (idempotent: an already-running endpoint is preferred). Returns tabs[] with id, url, title, active — pass tabId to browser_* tools to target a specific tab. Caveats: CDP connection is per-process; if Chrome restarts, call browser_open again to get fresh tab IDs. A Chrome session started without --remote-debugging-port cannot be taken over — close it first or use a separate userDataDir. If the CDP endpoint is unreachable and launch is omitted, returns ok:false (code:'BrowserNotConnected' when nothing answers on the port; code:'UiaTimeout' when it does not answer in time — wait and retry; code:'ToolError' when something else answers on it); re-call with launch:{} (idempotent) to auto-spawn or start Chrome manually with --remote-debugging-port=9222.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_open"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoChrome/Edge CDP remote debugging port (default 9222; configurable via desktop-touch-config.json)
launchNoIf set, spawn a debug-mode browser when no CDP endpoint is live on the target port (idempotent: an already-running endpoint is preferred and the spawn step is skipped). Pass {} to use defaults (chrome, C:\tmp\cdp, no initial URL). Omit to perform pure connect.
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.3.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / launch / additionalProperties
      Removed value: -false
    • changedInput schema / properties / port / description
      Previous value: -"Chrome/Edge CDP remote debugging port."New value: +"Chrome/Edge CDP remote debugging port (default 9222; configurable via desktop-touch-config.json)"
  2. Addedv1.12.0
  3. Removedv1.10.4
  4. Addedv1.9.2
  5. Removedv1.8.0
  6. Addedv1.6.0
  7. Removedv1.5.1
  8. Addedv1.5.0
  9. Removedv1.4.3
  10. Addedv1.4.2
  11. Removedv1.4.0
  12. Changed1 schema field changedv1.2.1
    • addedInput schema / properties / include
      Added value: +{
      +  "description": "Optional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  13. Changed2 schema fields changedv1.1.1
    • addedInput schema / properties / launch / additionalProperties
      Added value: +false
    • addedInput schema / properties / launch / properties
      Added value: +{
      +  "browser": {
      +    "default": "auto",
      +    "description": "Which browser to spawn. 'auto' tries chrome → edge → brave. Ignored when a CDP endpoint is already live.",
      +    "enum": [
      +      "auto",
      +      "chrome",
      +      "edge",
      +      "brave"
      +    ],
      +    "type": "string"
      +  },
      +  "killExisting": {
      +    "default": false,
      +    "description": "When true, terminate existing browser processes before launch. Use when a browser is already running WITHOUT --remote-debugging-port. WARNING: unsaved input in the existing session will be lost.",
      +    "type": "boolean"
      +  },
      +  "url": {
      +    "description": "Optional URL to open in the new browser.",
      +    "type": "string"
      +  },
      +  "userDataDir": {
      +    "default": "C:\\tmp\\cdp",
      +    "description": "Path for --user-data-dir. A dedicated profile avoids conflicts with the main browser session.",
      +    "type": "string"
      +  },
      +  "waitMs": {
      +    "default": 10000,
      +    "description": "Max ms to wait for the CDP endpoint to become ready (default 10000).",
      +    "maximum": 30000,
      +    "minimum": 1000,
      +    "type": "integer"
      +  }
      +}
  14. Addedv1.0.3

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses idempotency semantics (an already-running endpoint is preferred), per-process CDP scoping, the need to re-call after a browser restart for fresh tab IDs, and that a non-debug session cannot be taken over. It also enumerates the exact failure codes (BrowserNotConnected, UiaTimeout, ToolError) with retry guidance.

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?

Front-loaded with the prerequisite statement, then scope, then return shape, then caveats and error handling — a sensible ordering with no filler sentences. It is dense to the point of being near run-on in the caveats/error-code passage, but each clause conveys distinct operational information.

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

Completeness5/5

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

For a connection-bootstrap tool with no output schema, the description still explains the return payload (tabs[] with id, url, title, active) and how tabId feeds downstream browser_* calls. Combined with the error-code taxonomy and lifecycle caveats, nothing an agent needs to call it correctly is missing.

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% and the nested launch object is fully documented in the schema (browser, userDataDir, waitMs, url, killExisting), so the schema does the heavy lifting. The description adds only a usage-level framing of launch:{} (auto-spawn when nothing is live, skipped when an endpoint exists), which largely restates the schema's own note.

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 action (connect to a CDP-enabled Chrome/Edge and return open tab IDs) on a specific resource, and explicitly positions itself as the prerequisite for all other browser_* tools. An agent can immediately distinguish this from browser_navigate or browser_overview.

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

Usage Guidelines5/5

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

Explicitly states when to use it (required before all other browser_* tools), when to pass launch:{} versus omit for pure connect, and what to do when the endpoint is unreachable (re-call with launch:{} or start Chrome manually with the flag). It also names the failure path when a session lacks --remote-debugging-port.

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