Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

browser_navigate

Navigate to specified web pages using browser automation within Windows systems. This tool directs browsers to URLs for automated testing, data extraction, or workflow automation.

Instructions

导航到网页

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes网页 URL
sessionIdNo会话 ID(可选)

Implementation Reference

  • Core handler function that navigates to the specified URL using Puppeteer page.goto(), waits for network idle, retrieves page title, and returns structured result.
    async navigate(url, sessionId = 'default') {
      try {
        const page = this.pages.get(sessionId);
        if (!page) {
          return { success: false, error: '浏览器未启动,请先调用 browser_launch' };
        }
    
        await page.goto(url, { waitUntil: 'networkidle2' });
        const title = await page.title();
    
        return { success: true, url, title, message: '导航成功' };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Input schema definition for the browser_navigate tool, specifying required 'url' parameter and optional 'sessionId'.
    {
      name: 'browser_navigate',
      description: '导航到网页',
      inputSchema: {
        type: 'object',
        properties: {
          url: { type: 'string', description: '网页 URL' },
          sessionId: { type: 'string', description: '会话 ID(可选)' },
        },
        required: ['url'],
      },
    },
  • Registers browser_navigate in the canHandle method for tool routing in the server.
    canHandle(toolName) {
      const tools = ['browser_launch', 'browser_navigate', 'browser_click', 
                     'browser_type', 'browser_screenshot', 'browser_get_text', 'browser_close'];
      return tools.includes(toolName);
    }
  • executeTool method with switch case that registers and dispatches browser_navigate to its handler.
    async executeTool(name, args) {
      if (!this.puppeteerAvailable) {
        return { 
          success: false, 
          error: 'puppeteer 未安装。请运行: npm install puppeteer' 
        };
      }
    
      switch (name) {
        case 'browser_launch':
          return await this.launchBrowser(args.headless, args.sessionId);
        case 'browser_navigate':
          return await this.navigate(args.url, args.sessionId);
        case 'browser_click':
          return await this.click(args.selector, args.sessionId);
        case 'browser_type':
          return await this.type(args.selector, args.text, args.sessionId);
        case 'browser_screenshot':
          return await this.screenshot(args.path, args.fullPage, args.sessionId);
        case 'browser_get_text':
          return await this.getText(args.selector, args.sessionId);
        case 'browser_close':
          return await this.closeBrowser(args.sessionId);
        default:
          throw new Error(`未知工具: ${name}`);
      }
    }
  • src/server.js:43-52 (registration)
    Instantiates and registers BrowserTools instance in the MCP server's tools collection for discovery and execution.
    this.tools = {
      filesystem: new FileSystemTools(),
      process: new ProcessTools(),
      mouseKeyboard: new MouseKeyboardTools(),
      window: new WindowTools(),
      screen: new ScreenTools(),
      clipboard: new ClipboardTools(),
      powershell: new PowerShellTools(),
      browser: new BrowserTools(),
    };
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. '导航到网页' implies a navigation action but doesn't specify whether this opens a new tab/window, requires an existing browser instance, handles errors (e.g., invalid URLs), or has side effects like loading time. For a tool with potential dependencies and no annotation coverage, this is a significant gap in transparency.

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?

The description is a single phrase ('导航到网页'), which is extremely concise and front-loaded. It wastes no words, though it might be overly brief for a tool with potential complexity. This efficiency earns a high score, but it's not a perfect 5 due to possible under-specification in other dimensions.

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 complexity of a browser navigation tool (which may involve session management, error handling, and dependencies), the description is incomplete. No annotations exist to cover behavioral traits, and there's no output schema to explain return values. The description alone is insufficient for an agent to fully understand how to use this tool effectively in context with its siblings.

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?

The input schema has 100% description coverage, with clear documentation for both parameters (url and optional sessionId). The description adds no additional meaning beyond what the schema provides, such as URL format examples or sessionId usage context. Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 '导航到网页' (navigate to web page) states a clear verb+resource combination, indicating this tool opens a URL in a browser. However, it doesn't distinguish itself from potential sibling tools like browser_launch (which might initiate a browser) or differentiate navigation from other browser operations. The purpose is understandable but lacks specificity about how it relates to other browser tools in the server.

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. It doesn't mention prerequisites (e.g., needing an active browser session), exclusions, or comparisons to siblings like browser_launch or browser_click. Without such context, an agent might struggle to choose between this and other browser-related tools in the list.

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