Skip to main content
Glama

Windows Automation MCP Server

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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • 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 }; } }
  • Tool schema definition in getToolDefinitions(), including name, description, and empty input schema.
    { name: 'get_mouse_position', description: '获取当前鼠标位置', inputSchema: { type: 'object', properties: {}, }, },
  • Registration/dispatch in executeTool() switch statement calling the handler.
    case 'get_mouse_position': return this.getMousePosition();
  • Tool name listed in canHandle() for capability check.
    '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