Skip to main content
Glama

关闭连接或浏览器

browser_close

Disconnects the current CDP session and optionally closes browser instances started by the service by port, all instances, or the current connection.

Instructions

断开当前 CDP 会话;可选按端口关闭由本服务启动的浏览器实例,或全部关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo要关闭的已启动实例端口
closeAllNo关闭本服务启动的所有实例
killBrowserNo同时关闭当前连接对应的已启动实例

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it scopes which instances can be closed ('由本服务启动的浏览器实例') and distinguishes session teardown from process termination. It omits reversibility/auth/error behavior, which keeps it out of the top band.

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?

One compact sentence with the primary action (session disconnect) front-loaded and the optional closings trailing. No filler, though the branching could be marginally clearer.

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?

For a no-annotation, no-output-schema teardown tool with three optional flags, the description covers the main behavior and the scope limitation adequately. Only precondition/irreversibility information is missing.

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 100%, so the baseline is 3; the description restates the three optional branches (port / closeAll / killBrowser) without adding format or precedence detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource: it disconnects the current CDP session and can optionally close browser instances launched by the service. This separates it from siblings like browser_launch/browser_connect, though it does not name them explicitly.

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

Usage Guidelines3/5

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

It implies usage through the optional branches (disconnect only, close by port, or close all), but never states when to prefer this over leaving sessions open or how it relates to browser_connect. Usage is inferable rather than explicit.

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