Skip to main content
Glama
Rainmen-xia

Chrome Debug MCP Server

by Rainmen-xia

close_browser

Closes the active browser connection to end debugging sessions and release resources in Chrome automation workflows.

Instructions

关闭浏览器连接

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implements the core logic to close or disconnect the browser session and reset internal state.
    async closeBrowser(): Promise<BrowserActionResult> {
    	if (this.browser || this.page) {
    		console.log("关闭浏览器连接...");
    
    		if (this.isUsingRemoteBrowser && this.browser) {
    			await this.browser.disconnect().catch(() => {});
    		} else {
    			await this.browser?.close().catch(() => {});
    		}
    		this.resetBrowserState();
    	}
    	return { success: true };
    }
  • Defines the tool schema with name, description, and empty input schema for the close_browser tool.
    {
    	name: "close_browser",
    	description: "关闭浏览器连接",
    	inputSchema: {
    		type: "object",
    		properties: {},
    	},
    },
  • src/index.ts:178-180 (registration)
    Registers the handler dispatch for close_browser tool calls in the MCP CallToolRequestSchema handler.
    case "close_browser":
    	result = await this.browserSession.closeBrowser();
    	break;
Behavior2/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 states the action ('close browser connection') but lacks behavioral details: it doesn't specify if this is destructive (e.g., terminates processes, loses data), requires specific states, has side effects, or what happens post-execution. This leaves gaps for safe agent operation.

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 a single, efficient phrase ('关闭浏览器连接') that directly states the purpose with zero waste. It's appropriately sized for a simple, parameterless tool and is front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple action but potentially destructive), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like what 'close' entails, return values, or error conditions, which are crucial for an agent to use it correctly in context with siblings like 'launch_browser'.

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?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to add parameter semantics, so a baseline of 4 is appropriate as it avoids redundancy. No additional parameter context is required or provided.

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

Purpose3/5

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

The description '关闭浏览器连接' (close browser connection) states a clear verb ('close') and resource ('browser connection'), but it's somewhat vague about what 'browser connection' entails compared to siblings like 'launch_browser' or 'resize_browser'. It doesn't explicitly differentiate itself from potential alternatives, such as whether this terminates a session or just disconnects.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., must have an active browser session from 'launch_browser'), exclusions, or related tools. The agent must infer usage from context alone.

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/Rainmen-xia/chrome-debug-mcp'

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