Skip to main content
Glama

后台窗口与实时预览

browser_window
Idempotent

Controls Electron window mode—visible, background, minimized, hidden, or background-visual—and manages tab preview plus human takeover/release without changing the browser profile.

Instructions

Control the real Electron window mode without changing the browser profile: visible (normal foreground), background (shown without taking focus), minimized, hidden, or background-visual (background operation with an independent live preview). action=mode gets or sets the mode; action=monitor starts/stops preview for one explicit tab; action=takeover locks AI input for human control; action=release hands control back to AI. The preview captures only the selected tab and keeps a bounded screenshot history.

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": {
      "action": "<action>"
    },
    "name": "browser_window"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo(action=mode) real Electron window mode
tabIdNo(action=monitor) tab to preview; defaults to the active tab
actionYesWindow/monitor operation
monitorNo(action=mode) also start/stop the independent preview

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly=false, idempotent=true, destructive=false; the description adds real behavioral context beyond that: the browser profile is untouched, background mode shows without taking focus, background-visual runs an independent live preview, takeover transfers input control to a human, and the preview captures only the selected tab with a bounded screenshot history. These are the side effects and scoping constraints an agent needs before invoking a state-changing control tool.

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 is front-loaded before the action breakdown, and every clause carries information about a mode or action. It is somewhat densely packed with semicolons and parentheticals, which makes scanning slightly harder, but there is no filler.

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?

With no output schema, the description compensates by explaining what the preview produces (selected tab only, bounded screenshot history) and what each action does. It stops short of describing what action=mode returns when reading the current mode or how takeover/release are acknowledged, which leaves a small gap for a control-flow tool.

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% and both enums are documented, so the baseline is 3; the description earns above baseline by glossing the modes ('visible (normal foreground)', 'background (shown without taking focus)', 'background-visual ... with an independent live preview') and by clarifying that monitor also starts/stops the preview under action=mode. The tabId default is already in the schema, so no further credit there.

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?

Opens with a specific verb and resource: 'Control the real Electron window mode without changing the browser profile,' then enumerates the five modes and the four actions (mode, monitor, takeover, release). An agent can immediately tell this governs window/chrome state rather than page content, distinguishing it from page-level siblings like browser_page_state or browser_navigate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action is given a use condition: 'action=mode gets or sets the mode', 'action=monitor starts/stops preview for one explicit tab', 'action=takeover locks AI input for human control', 'action=release hands control back to AI'. This maps intent to action clearly, but there are no explicit exclusions or guidance on when not to use the tool versus alternatives.

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