Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

mouse_scroll

Scroll the mouse wheel up or down with adjustable steps and optional coordinate targeting for desktop automation in Hyprland.

Instructions

Scroll the mouse wheel.

Args: direction: "up" or "down" amount: Number of scroll steps (default 3) x: X coordinate to scroll at (optional) y: Y coordinate to scroll at (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionNodown
amountNo
xNo
yNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The mouse_scroll tool handler that accepts direction, amount, and optional coordinates, triggering cursor movement if needed and then the scroll action.
    async def mouse_scroll(
        direction: str = "down",
        amount: int = 3,
        x: int | None = None,
        y: int | None = None,
    ) -> str:
        """Scroll the mouse wheel.
    
        Args:
            direction: "up" or "down"
            amount: Number of scroll steps (default 3)
            x: X coordinate to scroll at (optional)
            y: Y coordinate to scroll at (optional)
        """
        from . import input as inp
        if x is not None and y is not None:
            await inp.move_cursor(x, y)
        await inp.scroll(direction, amount)
  • The internal scroll helper function that uses ydotool to simulate the actual scroll event.
    async def scroll(direction: str = "down", amount: int = 3) -> None:
        """Scroll the mouse wheel using ydotool."""
        require_tool("ydotool")
        # ydotool mousemove --wheel: positive Y = down, negative Y = up
        y_val = amount if direction == "down" else -amount
        proc = await asyncio.create_subprocess_exec(
            "ydotool", "mousemove", "--wheel", "-x", "0", "-y", str(y_val),
            stdout=asyncio.subprocess.PIPE,
            stderr=asyncio.subprocess.PIPE,
        )
        _, stderr = await proc.communicate()
        if proc.returncode != 0:
            raise InputError(f"ydotool scroll failed: {stderr.decode().strip()}")
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 basic action but doesn't disclose behavioral traits like whether scrolling requires focus on a specific window, what happens if coordinates are invalid, if there are rate limits, or system-specific constraints. The description is minimal beyond the action itself.

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 extremely concise and well-structured: a brief purpose statement followed by a clearly formatted parameter list. Every sentence earns its place with no wasted words, making it easy to scan and understand.

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 4 parameters with 0% schema coverage and no annotations, the description provides basic parameter semantics but lacks behavioral context. The presence of an output schema (not shown) means return values don't need explanation, but for a tool that interacts with the UI system, more guidance on usage constraints would be helpful.

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 provides clear semantics for all 4 parameters: direction ('up' or 'down'), amount (scroll steps with default), and optional x/y coordinates. This adds meaningful context beyond the bare schema, though it doesn't explain coordinate systems or step units.

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 action ('Scroll the mouse wheel') with the resource implied. It distinguishes from sibling tools like mouse_click or mouse_move by specifying scrolling behavior. However, it doesn't explicitly differentiate from all possible mouse interactions beyond the name.

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 is provided. The description doesn't mention when scrolling is appropriate versus other navigation methods or how it relates to sibling tools like mouse_move or key_press for navigation.

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