Skip to main content
Glama

browser_open

Connect to Chrome/Edge via CDP to obtain tab IDs, optionally auto-launching 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 (typically code:'BrowserNotConnected' when the fetch surfaces ECONNREFUSED, otherwise code:'ToolError' with error 'Cannot reach Chrome/Edge CDP...'); re-call with launch:{} (idempotent) to auto-spawn or start Chrome manually with --remote-debugging-port=9222.

Input Schema

TableJSON 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.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses the per-process CDP lifetime, that restarts invalidate tab IDs, that a non-debug session cannot be taken over, idempotency of launch, and the concrete failure codes (BrowserNotConnected vs ToolError) with recovery steps. This is behavior far beyond what the schema declares.

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?

Purpose and prerequisite are front-loaded in the first sentence, and the caveat/error material is grouped at the end. It is dense and somewhat long, and portions of the launch-idempotency wording repeat the schema, but the length is largely justified by the missing annotations.

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?

With no output schema and no annotations, the description supplies the return shape (tabs[] with id/url/title/active), the failure shape (ok:false with code), and the lifecycle caveats. An agent has everything needed to call this correctly and to recover from an unreachable endpoint.

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

Parameters4/5

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

Schema coverage is 100%, so the structured fields already document port, launch sub-fields and include; baseline is 3. The description adds useful framing beyond that by explaining which launch mode is preferred when an endpoint is live and that omitting launch means pure connect, but it does not extend meaning much further than the schema already provides.

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 verb and resource ('Connect to Chrome/Edge running with --remote-debugging-port and return open tab IDs') and immediately distinguishes itself from siblings by declaring it is the prerequisite for all other browser_* tools. An agent can identify its role without opening the schema.

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 ({}) vs omit it (pure connect), and what to do in the failure path (re-call with launch:{} or start Chrome manually). The alternative-recovery guidance is unusually complete.

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