Skip to main content
Glama

desktop_cdp_close

Closes CDP sessions and kills browser processes started by desktop_browser_launch, preventing headless browsers from staying in the background. Use it to clean up specific or all sessions.

Instructions

关闭 CDP 会话,并杀掉由 desktop_browser_launch 启动的浏览器进程。 用完记得调用,否则无头浏览器会留在后台。

Input Schema

NameRequiredDescriptionDefault
sessionNo只关指定会话;省略则关全部
killBrowserNo是否连浏览器进程一起杀,默认 true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4.4/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 disclose the destructive side effect (killing the launched browser process) and the leak risk of not calling it. It does not say whether the kill is unconditional, what happens if the session is already gone/dangling, or what the call returns on partial failure.

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?

Two sentences, both earning their place: the first defines behavior, the second is a front-loaded obligation with a stated consequence. No redundancy with the title or restated field names.

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 2-parameter, no-output-schema, no-annotation cleanup tool this is largely sufficient — purpose, side effects, and the imperative to call it are all present. The residual gap is failure-mode behavior (dead session, browser already closed) which an agent would have to probe empirically.

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%, so the baseline is 3; the description earns a bump by identifying whose browser process gets killed ('由 desktop_browser_launch 启动的'), which is what an agent needs to reason about setting killBrowser=false. The 'session' parameter's 'omit = close all' behavior is left entirely to 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?

States a specific verb+resource ('关闭 CDP 会话') and the additional effect of killing the browser process, explicitly tying it to the counterpart launcher 'desktop_browser_launch'. An agent can distinguish this cleanup tool from desktop_cdp_open/desktop_cdp_* siblings and from desktop_browser_launch 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 Guidelines4/5

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

'用完记得调用,否则无头浏览器会留在后台' gives explicit when-to-use guidance plus the consequence of skipping it, which is strong for a cleanup tool. It stops short of naming alternatives (e.g. what to do if you want to keep the session alive) or stating any preconditions about which session must be active.

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