Skip to main content
Glama

Windows Automation MCP Server

move_mouse

Automatically move the mouse cursor to specific screen coordinates to automate Windows desktop interactions and system control tasks.

Instructions

移动鼠标到指定位置

Input Schema

NameRequiredDescriptionDefault
xYesX 坐标
yYesY 坐标
smoothNo是否平滑移动(可选)

Input Schema (JSON Schema)

{ "properties": { "smooth": { "description": "是否平滑移动(可选)", "type": "boolean" }, "x": { "description": "X 坐标", "type": "number" }, "y": { "description": "Y 坐标", "type": "number" } }, "required": [ "x", "y" ], "type": "object" }

Implementation Reference

  • The core handler function that moves the mouse to the specified (x, y) coordinates using robotjs, with optional smooth movement. Returns success status and position.
    moveMouse(x, y, smooth = false) { try { if (smooth) { this.robot.moveMouseSmooth(x, y); } else { this.robot.moveMouse(x, y); } return { success: true, position: { x, y }, message: '鼠标已移动' }; } catch (error) { return { success: false, error: error.message }; } }
  • Tool schema definition including name, description, and input parameters (x, y required; smooth optional boolean).
    name: 'move_mouse', description: '移动鼠标到指定位置', inputSchema: { type: 'object', properties: { x: { type: 'number', description: 'X 坐标' }, y: { type: 'number', description: 'Y 坐标' }, smooth: { type: 'boolean', description: '是否平滑移动(可选)' }, }, required: ['x', 'y'], }, },
  • Registration in the executeTool switch statement, dispatching to the moveMouse handler with parsed arguments.
    case 'move_mouse': return this.moveMouse(args.x, args.y, args.smooth);
  • Tool name listed in the canHandle method's supported tools array.
    const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 'get_mouse_position', 'get_screen_size'];

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