Skip to main content
Glama

attach_browser

Attach to your current Chrome or Edge tab over CDP loopback, or list open tabs to pick one by index or URL. Acts only on the selected tab with your explicit consent.

Instructions

Connect to your CURRENT Chrome/Edge tab via CDP (loopback only).

Requires Chrome/Edge running with --remote-debugging-port (launch: python -m body_mcp.cdp_launch). Requires your acknowledged consent + a scoped reflex_ask approval for exactly this action.

Without tab: lists your real tabs (index, title, url) and keeps the session open. With tab: attaches directly to that tab (index, or unique url/title substring). DevTools windows are never candidates; unselected tabs are never touched. The CDP port is unauthenticated-loopback: detach when done and restart the browser normally.

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": {
      "endpoint": "<endpoint>"
    },
    "name": "attach_browser"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNo
endpointYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/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 well: it discloses the unauthenticated-loopback security posture, that DevTools windows are never candidates, that unselected tabs are never touched, that the session stays open in list mode, and that consent plus a scoped approval is required. These are exactly the behavioral traits an agent needs before mutating a real browser session.

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 core action and mode split, then prerequisites, then safety notes. Each line carries information, though the consent/approval sentence is slightly split into fragments that could be tightened.

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?

Behavior, modes, prerequisites and security caveats are covered well for a two-parameter tool with no annotations and no output schema. The unexplained required `endpoint` is the one real completeness gap.

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 0%, so the description must compensate. It explains `tab` thoroughly (index or unique url/title substring, null means list), but the required `endpoint` parameter is never mentioned anywhere in the description or schema, leaving a required input semantically opaque.

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 your CURRENT Chrome/Edge tab via CDP') and immediately scopes it with 'loopback only'. An agent can tell this apart from detach_browser and browser_bridge without opening any 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 splits the two modes: 'Without tab: lists your real tabs... and keeps the session open' versus 'With tab: attaches directly to that tab'. It also names prerequisites (--remote-debugging-port with a launch command) and the required reflex_ask approval, and tells the agent to detach when done.

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