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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While '获取' (get) implies a read-only operation, it doesn't specify whether this requires specific permissions, what coordinate system is used (screen vs. window), whether it returns absolute or relative positions, or if there are any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient phrase that directly states the tool's function without any wasted words. It's appropriately sized for a simple tool with no parameters and gets straight to the point. Every character earns its place in conveying the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate. It tells the agent what the tool does at a basic level. However, without an output schema, the description doesn't explain what format the mouse position is returned in (coordinates, units, etc.), leaving the agent to discover this through trial or additional documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to compensate for any parameter gaps. A baseline of 4 is appropriate since there are no parameters to explain beyond what the empty schema already indicates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '获取当前鼠标位置' (get current mouse position), which is a specific verb+resource combination. It distinguishes itself from sibling tools like 'move_mouse' or 'mouse_click' by focusing on retrieval rather than action. However, it doesn't explicitly differentiate from all siblings in the system context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, timing considerations, or comparison to related tools like 'get_active_window' or 'get_screen_size' that might provide complementary information. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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