mouse_move
Move the mouse cursor to precise screen coordinates using Hyprland's native movecursor for pixel-accurate positioning without acceleration issues.
Instructions
Move the mouse cursor to absolute layout coordinates.
Uses Hyprland's native movecursor — pixel-accurate, no acceleration issues.
Args: x: Target X coordinate y: Target Y coordinate
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes |
Implementation Reference
- hyprland_mcp/server.py:243-255 (handler)The MCP tool definition for `mouse_move` in `server.py`, which calls the helper function.
@mcp.tool() async def mouse_move(x: int, y: int) -> str: """Move the mouse cursor to absolute layout coordinates. Uses Hyprland's native movecursor — pixel-accurate, no acceleration issues. Args: x: Target X coordinate y: Target Y coordinate """ from . import input as inp await inp.move_cursor(x, y) return f"Moved cursor to ({x}, {y})" - hyprland_mcp/input.py:34-36 (helper)The helper function `move_cursor` in `input.py` that executes the `movecursor` dispatch command via `hyprctl`.
async def move_cursor(x: int, y: int) -> None: """Move cursor to absolute coordinates using Hyprland's native movecursor.""" await hyprctl.dispatch("movecursor", f"{x} {y}")