mouse_click
Perform mouse clicks on Windows systems to automate interactions. Choose left, right, or middle button clicks with optional double-click functionality for streamlined control.
Instructions
鼠标点击
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| button | No | 按钮类型 | |
| double | No | 是否双击(可选) |
Implementation Reference
- src/tools/mouse-keyboard.js:138-145 (handler)Core implementation of the mouse_click tool. Performs the mouse click operation using the robotjs library, handling button type and double-click option, with success/error response.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 }; } }
- src/tools/mouse-keyboard.js:39-49 (schema)Input schema definition for the mouse_click tool, specifying optional button ('left', 'right', 'middle') and double-click boolean.{ name: 'mouse_click', description: '鼠标点击', inputSchema: { type: 'object', properties: { button: { type: 'string', enum: ['left', 'right', 'middle'], description: '按钮类型' }, double: { type: 'boolean', description: '是否双击(可选)' }, }, }, },
- src/tools/mouse-keyboard.js:94-95 (registration)Registers 'mouse_click' as a supported tool in the canHandle method's tools list.const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 'get_mouse_position', 'get_screen_size'];
- src/tools/mouse-keyboard.js:110-111 (handler)Dispatcher logic in executeTool method that invokes the mouseClick handler for the 'mouse_click' tool.case 'mouse_click': return this.mouseClick(args.button, args.double);