Skip to main content
Glama

attach_to_chrome

Attach to an existing Chrome instance via CDP to control your current browser session without launching a new one. Avoid profile lock conflicts by connecting to Chrome started with a remote debugging port.

Instructions

⭐ Attach to an existing Chrome instance via CDP — no new browser launch, no profile lock conflict. Target Chrome must have been started with --remote-debugging-port=<N>. Auto-detects port if omitted (picks lowest).

Use cases:
- Control your existing Chrome (e.g. Profile 21) without closing it.
- Drive a Chrome session you launched manually with custom flags.
- Connect to a remote/Docker Chrome via host=<remote> port=<N>.

To detach without closing Chrome, call detach(). Calling browser_close()
after attach DOES close the target Chrome — use detach() instead if you
want to keep it running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
hostNo127.0.0.1
instance_idNoattached

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations present, so description carries full burden. Discloses key behaviors: auto-detects port, requires Chrome to be started with --remote-debugging-port, warns that browser_close after attach closes Chrome. Minor omission: error handling if Chrome not found.

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

Conciseness5/5

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

Well-structured with emoji, clear sections, and front-loaded purpose. No unnecessary words; every sentence adds value.

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

Completeness4/5

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

Adequately covers the tool's complexity with three parameters and an output schema (not shown but exists). Could add brief description of instance_id parameter for full completeness.

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 0%, so description must add meaning. Explains port (auto-detects, defaults to lowest) and host (remote connections). However, instance_id parameter is not described beyond its default 'attached', leaving ambiguity about its purpose.

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 the tool attaches to an existing Chrome instance via CDP, distinguishing it from siblings like browser_launch (which launches new browser) and detach. It specifies the exact resource (Chrome instance) and action (attach).

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?

Provides explicit use cases: controlling existing Chrome, manually launched Chrome, remote/Docker Chrome. Also tells when not to use browser_close (use detach instead). References sibling tool detach() as alternative.

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/RobithYusuf/mcp-stealth-chrome'

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