Skip to main content
Glama
LukeLamb

claude-linux-mcp

mouse_move

Destructive

Relocate the mouse cursor to specific pixel coordinates on the screen using absolute x and y values.

Instructions

Move the mouse pointer to absolute screen coordinates (x, y).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes

Implementation Reference

  • The mouseMove function is the handler for the mouse_move tool. It validates x/y are numbers, runs 'xdotool mousemove <x> <y>' via the run() helper, and returns success/failure.
    // ─── Tool: mouse_move ─────────────────────────────────────────────────────
    async function mouseMove(args) {
      const missing = requireBin('xdotool');
      if (missing) return errorResult(missing);
      if (typeof args.x !== 'number' || typeof args.y !== 'number') {
        return errorResult('x and y are required numbers');
      }
      const r = await run(BIN.xdotool, ['mousemove', String(args.x), String(args.y)]);
      if (r.code !== 0) return errorResult(`mouse_move failed: ${r.stderr || r.stdout}`);
      return textResult({ x: args.x, y: args.y });
    }
  • Input schema registration for mouse_move: defines the name, description, annotations (title, destructiveHint), and inputSchema requiring x (number) and y (number).
    {
      name: 'mouse_move',
      description: 'Move the mouse pointer to absolute screen coordinates (x, y).',
      annotations: { title: 'Move mouse', destructiveHint: true },
      inputSchema: {
        type: 'object',
        properties: { x: { type: 'number' }, y: { type: 'number' } },
        required: ['x', 'y'],
      },
    },
  • server.js:553-559 (registration)
    The HANDLERS object maps tool name 'mouse_move' to the mouseMove handler function, enabling JSON-RPC dispatch when tools/call is invoked with name 'mouse_move'.
    const HANDLERS = {
      screenshot,
      list_windows: listWindows,
      focus_window: focusWindow,
      move_window: moveWindow,
      close_window: closeWindow,
      mouse_move: mouseMove,
  • The requireBin helper checks that xdotool (the binary required by mouse_move) is installed, returning an error message if not found.
    function requireBin(name) {
      if (!BIN[name]) {
        return `Required system tool "${name}" is not installed. Install with: sudo apt install ${name === 'gnomeShot' ? 'gnome-screenshot' : name === 'xclip' ? 'xclip' : name === 'xdotool' ? 'xdotool' : 'wmctrl'}`;
      }
      return null;
    }
  • The run helper spawns a child process (xdotool) with given args and returns a promise resolving with code, stdout, stderr. Used by mouseMove to execute the xdotool mousemove command.
    function run(cmd, args, opts = {}) {
      return new Promise((resolve) => {
        const child = spawn(cmd, args, { stdio: ['pipe', 'pipe', 'pipe'], ...opts });
        let out = Buffer.alloc(0);
        let err = Buffer.alloc(0);
        child.stdout.on('data', (d) => { out = Buffer.concat([out, d]); });
        child.stderr.on('data', (d) => { err = Buffer.concat([err, d]); });
        if (opts.stdin !== undefined) {
          child.stdin.end(opts.stdin);
        } else {
          child.stdin.end();
        }
        child.on('error', (e) => resolve({ code: -1, stdout: '', stderr: e.message }));
        child.on('close', (code) => resolve({
          code,
          stdout: out.toString('utf8'),
          stderr: err.toString('utf8'),
        }));
      });
    }
Behavior3/5

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

Annotations include destructiveHint: true, which the description does not contradict. However, the description does not add further behavioral details (e.g., instant movement, no animation). Baseline score with annotations present.

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?

Single sentence with no wasted words; front-loaded with key information.

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

Completeness4/5

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

For a simple tool with two numeric parameters and no output schema, the description is nearly complete. Could be improved by clarifying coordinate origin or units.

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?

Schema coverage is 0%, so the description compensates by explaining that x and y are 'absolute screen coordinates', adding meaning beyond the raw numeric types.

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

Purpose5/5

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

The description clearly specifies the action (move), resource (mouse pointer), and that coordinates are absolute screen coordinates. It distinguishes from sibling tools like mouse_click or mouse_drag.

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?

No guidance on when to use this tool versus alternatives like mouse_drag or mouse_scroll. No mention of prerequisites or context for use.

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/LukeLamb/claude-linux-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server