Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

browser_close

Closes browser windows automatically to manage system resources and maintain workflow efficiency in Windows automation tasks.

Instructions

关闭浏览器

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNo会话 ID(可选)

Implementation Reference

  • The handler function that executes the browser_close tool logic: closes the Puppeteer browser for the given sessionId, cleans up storage, and returns status.
    async closeBrowser(sessionId = 'default') {
      try {
        const browser = this.browsers.get(sessionId);
        if (!browser) {
          return { success: false, error: '浏览器未找到' };
        }
    
        await browser.close();
        this.browsers.delete(sessionId);
        this.pages.delete(sessionId);
    
        return { success: true, message: '浏览器已关闭', sessionId };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Input schema and metadata definition for the browser_close tool.
    {
      name: 'browser_close',
      description: '关闭浏览器',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: { type: 'string', description: '会话 ID(可选)' },
        },
      },
    },
  • Registration of the browser_close handler in the central executeTool switch dispatcher.
    case 'browser_close':
      return await this.closeBrowser(args.sessionId);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While '关闭浏览器' implies a destructive action (closing), it does not specify critical details such as whether this action is reversible, if it requires confirmation, what happens to unsaved data, or if it affects all browser windows. This is a significant gap for a tool with potential side effects.

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 phrase ('关闭浏览器'), which is extremely concise and front-loaded with the core action. There is no wasted language or unnecessary elaboration, making it efficient for quick comprehension.

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 potential complexity (closing a browser may have side effects), lack of annotations, and no output schema, the description is insufficient. It does not explain what happens upon execution (e.g., success/failure indicators, error conditions) or behavioral nuances, leaving the agent with incomplete context for safe and effective use.

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 input schema has 100% description coverage for its single optional parameter 'sessionId', documented as '会话 ID(可选)' (session ID, optional). The description adds no additional parameter information, but with high schema coverage and zero required parameters, the baseline is high. A score of 4 reflects that the schema adequately handles parameter semantics without needing description support.

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 '关闭浏览器' (close browser) clearly states the verb ('close') and resource ('browser'), making the purpose immediately understandable. However, it does not distinguish this tool from sibling tools like 'close_window' or specify whether it closes a specific browser instance or all browsers, which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'close_window' or 'browser_launch'. It lacks context about prerequisites (e.g., whether a browser must be open) or exclusions, leaving the agent to infer usage from the tool name 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/eva-wanxin-git/windows-automation-mcp'

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