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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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(
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the action (click) and optional parameters, but does not disclose behavioral traits such as whether it requires focus on a window, potential side effects (e.g., triggering UI events), or error conditions (e.g., invalid coordinates).

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the main action, followed by parameter details in a structured format. It avoids unnecessary fluff, though the parameter explanations could be slightly more concise.

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 no annotations, 0% schema coverage, and an output schema (which handles return values), the description covers the basic action and parameters but lacks context on behavioral aspects like permissions, side effects, or error handling, which are important for a mouse interaction tool.

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 description coverage is 0%, so the description must compensate. It adds meaning by explaining each parameter's purpose: button options, x/y as coordinates with default behavior, and double for double-clicking. However, it does not specify coordinate units (e.g., pixels) or constraints.

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 states the tool performs a mouse click action, specifying it can click at a given position or the current position if coordinates are omitted. It distinguishes from siblings like mouse_move (which moves without clicking) and mouse_drag (which drags).

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

Usage Guidelines3/5

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

The description implies usage for clicking at specific coordinates or the current position, but does not explicitly state when to use this versus alternatives like click_text (which clicks on text) or send_shortcut (which uses keyboard shortcuts). No exclusions or prerequisites are mentioned.

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

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