Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

browser_click

Automate browser interactions by clicking elements using CSS selectors to streamline web testing and repetitive tasks.

Instructions

点击元素

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS 选择器
sessionIdNo会话 ID(可选)

Implementation Reference

  • The handler function that executes the browser_click tool logic: retrieves the page for the session, waits for the CSS selector, clicks the element, and returns success/error status.
    async click(selector, sessionId = 'default') {
      try {
        const page = this.pages.get(sessionId);
        if (!page) {
          return { success: false, error: '浏览器未启动' };
        }
    
        await page.waitForSelector(selector, { timeout: 5000 });
        await page.click(selector);
    
        return { success: true, selector, message: '点击成功' };
      } catch (error) {
        return { success: false, error: error.message };
      }
    }
  • Tool definition including name, description, and input schema for browser_click, defining required 'selector' parameter.
    {
      name: 'browser_click',
      description: '点击元素',
      inputSchema: {
        type: 'object',
        properties: {
          selector: { type: 'string', description: 'CSS 选择器' },
          sessionId: { type: 'string', description: '会话 ID(可选)' },
        },
        required: ['selector'],
      },
    },
  • Registration of the browser_click handler in the executeTool switch statement, mapping tool calls to the click method.
    case 'browser_click':
      return await this.click(args.selector, args.sessionId);
Behavior1/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. '点击元素' only states the action without explaining what happens (e.g., whether it simulates a user click, requires a browser to be open, handles errors if the selector isn't found, or affects browser state). This leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is overly concise to the point of under-specification—it's a single phrase with no structure or elaboration. While brief, it fails to convey necessary information, making it inefficient rather than appropriately concise.

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

Completeness1/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 interaction tool with no annotations and no output schema, the description is severely incomplete. It doesn't cover behavioral aspects, usage context, or expected outcomes, leaving the agent with insufficient information to invoke the tool correctly.

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 description coverage is 100%, with clear parameter descriptions in the schema (e.g., 'selector' as CSS selector, 'sessionId' as optional session ID). The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

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

Purpose2/5

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

The description '点击元素' (click element) is a tautology that essentially restates the tool name 'browser_click' in Chinese. While it indicates the action involves clicking, it doesn't specify what kind of element (e.g., UI element in a browser) or provide any distinguishing details from sibling tools like 'mouse_click'.

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

Usage Guidelines1/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 context (e.g., browser automation vs. system-level interaction), prerequisites like needing an active browser session, or how it differs from similar tools such as 'mouse_click' or 'activate_window'.

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