Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

mouse_click

Click the mouse at specified coordinates or current position using left, right, or middle buttons. Supports single or double-click actions for desktop automation in Hyprland.

Instructions

Click the mouse at a position (or current position if no coordinates given).

Args: button: "left", "right", or "middle" x: X coordinate to click at (optional — clicks at current position if omitted) y: Y coordinate to click at (optional) double: Whether to double-click

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buttonNoleft
xNo
yNo
doubleNo

Implementation Reference

  • The handler function for the `mouse_click` tool, which optionally moves the cursor to (x, y) and then executes a mouse click via the input module.
    async def mouse_click(
        button: str = "left",
        x: int | None = None,
        y: int | None = None,
        double: bool = False,
    ) -> str:
        """Click the mouse at a position (or current position if no coordinates given).
    
        Args:
            button: "left", "right", or "middle"
            x: X coordinate to click at (optional — clicks at current position if omitted)
            y: Y coordinate to click at (optional)
            double: Whether to double-click
        """
        from . import input as inp
        if x is not None and y is not None:
            await inp.move_cursor(x, y)
        await inp.click(button, double=double)
        pos = f" at ({x},{y})" if x is not None and y is not None else ""
        kind = "Double-clicked" if double else "Clicked"
        return f"{kind} {button}{pos}"
  • Registration of the `mouse_click` function as an MCP tool using the `@mcp.tool()` decorator.
    @mcp.tool()
    async def mouse_click(

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/alderban107/hyprland-mcp'

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