get_mouse_position
Retrieve the current coordinates of the mouse cursor on the screen for automation tasks and position tracking in Windows applications.
Instructions
获取当前鼠标位置
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/mouse-keyboard.js:179-186 (handler)The handler function getMousePosition() that executes the tool logic to get current mouse position using robotjs.getMousePosition() { try { const pos = this.robot.getMousePos(); return { success: true, position: { x: pos.x, y: pos.y } }; } catch (error) { return { success: false, error: error.message }; } }
- src/tools/mouse-keyboard.js:74-81 (schema)Tool schema definition in getToolDefinitions(), including name, description, and empty input schema.{ name: 'get_mouse_position', description: '获取当前鼠标位置', inputSchema: { type: 'object', properties: {}, }, },
- src/tools/mouse-keyboard.js:116-117 (registration)Registration/dispatch in executeTool() switch statement calling the handler.case 'get_mouse_position': return this.getMousePosition();
- src/tools/mouse-keyboard.js:95-95 (registration)Tool name listed in canHandle() for capability check.'get_mouse_position', 'get_screen_size'];