Skip to main content
Glama

setup_browser

Prepare Chrome or Edge for automated agent use by creating a dedicated profile and copying cookies, so the agent opens the browser with your sites logged in.

Instructions

Set up Chrome or Edge for agent use (macOS and Windows).

Run this ONCE (with your browser closed). It:

  1. Creates a dedicated agent profile at ~/.webspeed/chrome-debug/ (macOS) or %LOCALAPPDATA%\WebSpeedAgent\chrome-debug\ (Windows) — a non-default user data directory, which is required by Chrome before it will open the remote debugging port.

  2. Copies your existing Chrome cookies into that profile so you are already logged into all your sites when the agent opens the browser.

  3. macOS: installs ~/bin/chrome-agent and adds a shell alias in ~/.zshrc. Windows: writes chrome-agent.bat to your Desktop.

After setup:

  • macOS: type 'chrome-agent' in Terminal to open Chrome

  • Windows: double-click chrome-agent.bat on your Desktop

  • Tell the agent: open_browser(browser="chrome", cdp_url="http://localhost:9222")

  • The agent opens a new tab in your real Chrome with all your logins active

Re-run setup_browser() any time you want to sync fresh cookies from your main Chrome profile into the agent profile (close Chrome first).

Args: browser: "chrome" (default) or "edge".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserNochrome

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses all significant side effects: creation of a non-default user data directory, copying cookies, installing shell aliases or .bat files, and modifying .zshrc. It also warns that the browser must be closed, which is critical behavioral context. No annotations are present, so the description carries the full burden and does so comprehensively.

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?

The description is relatively long but every sentence earns its place. It is well-structured with clear sections: purpose, step-by-step actions, post-setup usage, re-run instructions, and argument explanation. Information is front-loaded with the core purpose and key requirement (browser closed).

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?

Given the tool's complexity (setup with side effects), the description covers prerequisites, exact steps, post-conditions, re-run scenarios, and the parameter. It also references the subsequent open_browser call, tying it into the broader workflow. An output schema exists, so the lack of return value discussion is acceptable.

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 0%, so the description must compensate. It does add meaning by stating the allowed values and default: 'browser: "chrome" (default) or "edge"'. However, it does not explain any behavioral differences between the two options, leaving some nuance undocumented.

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 states a specific verb+resource: 'Set up Chrome or Edge for agent use (macOS and Windows)'. It clearly distinguishes this setup tool from siblings like open_browser and navigate by explaining it creates a dedicated profile and copies cookies.

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?

Explicit usage guidance is provided: 'Run this ONCE (with your browser closed)' and 'Re-run setup_browser() any time you want to sync fresh cookies'. It also instructs the agent to use open_browser afterward with specific parameters, effectively indicating when this tool is a prerequisite.

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/Dominic-Pi-Sunyer/web-speed-agent'

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