Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

get_mouse_position

Retrieve the current coordinates of the mouse cursor on the screen for automation tasks and system control.

Instructions

获取当前鼠标位置

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that gets the current mouse position using robotjs.getMousePos() and returns the position.
    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 }; } }
  • The tool schema definition including name, description, and empty input schema.
    { name: 'get_mouse_position', description: '获取当前鼠标位置', inputSchema: { type: 'object', properties: {}, }, },
  • Registration in the executeTool switch statement dispatching to the handler.
    case 'get_mouse_position': return this.getMousePosition();
  • Tool name listed in canHandle method for checking if this class handles the tool.
    const tools = ['move_mouse', 'mouse_click', 'type_text', 'press_key', 'get_mouse_position', 'get_screen_size']; return tools.includes(toolName);

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