Skip to main content
Glama

Windows Automation MCP Server

mouse_click

Perform mouse clicks to automate Windows interactions, supporting left, right, or middle button clicks with optional double-click functionality.

Instructions

鼠标点击

Input Schema

NameRequiredDescriptionDefault
buttonNo按钮类型
doubleNo是否双击(可选)

Input Schema (JSON Schema)

{ "properties": { "button": { "description": "按钮类型", "enum": [ "left", "right", "middle" ], "type": "string" }, "double": { "description": "是否双击(可选)", "type": "boolean" } }, "type": "object" }

Implementation Reference

  • The `mouseClick` method implements the core logic for performing a mouse click (single or double) using the robotjs library.
    mouseClick(button = 'left', double = false) { try { this.robot.mouseClick(button, double); return { success: true, button, double, message: '点击完成' }; } catch (error) { return { success: false, error: error.message }; } }
  • Tool definition in `getToolDefinitions()` including the input schema for the 'mouse_click' tool.
    { name: 'mouse_click', description: '鼠标点击', inputSchema: { type: 'object', properties: { button: { type: 'string', enum: ['left', 'right', 'middle'], description: '按钮类型' }, double: { type: 'boolean', description: '是否双击(可选)' }, }, }, },
  • The dispatch case in `executeTool` method that routes 'mouse_click' calls to the handler.
    case 'mouse_click': return this.mouseClick(args.button, args.double);
  • The list of supported tools in `canHandle` method used for routing in the server.
    const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 'get_mouse_position', 'get_screen_size'];
  • src/server.js:46-46 (registration)
    Instantiation of MouseKeyboardTools class in the main server, enabling its tools.
    mouseKeyboard: new MouseKeyboardTools(),

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