Skip to main content
Glama

browser_session_create

Create or reuse a named browser session with isolated context for multi-account testing. Manages cookies, localStorage, console, network, errors, and events, and supports Chrome extension loading.

Instructions

Create or reuse a named browser session with isolated context, cookies, localStorage, console, network, errors, and events. Supports Chrome extension loading via persistent context.

中文详情:

  • 用途:创建或复用一个命名浏览器会话,每个会话拥有独立的浏览器上下文、cookie、localStorage、console、network、errors 和 events

  • 何时使用:需要多账号/多角色并行测试时;测试需要不同浏览器上下文隔离时;加载 Chrome 扩展验证扩展行为时;验证不同会话状态(登录/未登录)时

  • 输出:{ ok: boolean, name: string, sessionId: string, url: string, created: boolean, headless: boolean, extensionLoaded: boolean }

  • 参数:

    • name (string, 必填):会话名称,如 free-user、pro-user

    • sessionName (string, 可选):会话名称别名

    • url (string, 可选):创建后打开的 URL

    • headless (boolean, 可选):是否无头模式,默认 false

    • extensionPath (string, 可选):要加载的 Chrome 扩展目录路径,提供后使用持久化上下文并强制 headless=false

    • loadExtensionPath (string, 可选):extensionPath 的别名

    • timeout (number, 可选):导航超时时间,默认 30000ms

  • 错误:name 为空抛出 'Session name is required';扩展路径不存在抛出 'Extension path not found';导航超时抛出 'Timeout XXXXms exceeded'

  • 示例:{"name":"pro-user","url":"https://example.com/dashboard","headless":false}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo创建后打开的 URL
nameYes会话名称,如 free-user、pro-user
timeoutNo导航超时时间,默认 30000ms
headlessNo是否无头模式,默认 false
sessionNameNo会话名称别名
extensionPathNo要加载的 Chrome 扩展目录路径。提供后使用持久化上下文并强制 headless=false
loadExtensionPathNoextensionPath 的别名,要加载的 Chrome 扩展目录路径
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses session creation/reuse, isolated context, extension loading, and lists output fields, parameters, and error conditions. It does not mention required permissions or potential side effects, but the behavior is well-explained.

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 well-structured with English summary, organized Chinese details, and clear sections for output, parameters, errors, and example. Each sentence is informative and not redundant. It is concise yet comprehensive.

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 7 parameters and no output schema, the description covers behavior, inputs, outputs (listing return fields), errors (with example messages), and an example. For a creation tool, this provides sufficient context for an AI agent to use it correctly.

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 description coverage is 100%, so baseline is 3. The description adds value by grouping parameters, noting aliases, indicating required status, and providing an example. It also explains the effects of extensionPath and the forced headless=false. This goes beyond the schema.

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 'Create or reuse a named browser session with isolated context', specifying the verb (create/reuse) and resource (browser session). It distinguishes from sibling tools by emphasizing isolated context and Chrome extension loading, which is unique among the many browser_* tools.

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?

The Chinese '何时使用' section explicitly lists four use cases: multi-account/role testing, context isolation, extension loading, and session state verification. This provides clear when-to-use guidance and implicitly excludes other scenarios, though it does not name alternative tools.

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/validpilot/ai-verify-mcp'

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