Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

move_window

Move windows to specific screen positions or workspaces in Hyprland desktop environments. Use coordinates for precise placement or workspace names for organization.

Instructions

Move a window to a position or workspace.

Args: target: Window selector. If omitted, moves the active window. x: Target X position in pixels y: Target Y position in pixels workspace: Target workspace name/number to move the window to

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
xNo
yNo
workspaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `move_window` tool handler function, which dispatches `movewindowpixel` or `movetoworkspace` commands to Hyprland based on the provided arguments.
    @mcp.tool()
    async def move_window(
        target: str | None = None,
        x: int | None = None,
        y: int | None = None,
        workspace: str | None = None,
    ) -> str:
        """Move a window to a position or workspace.
    
        Args:
            target: Window selector. If omitted, moves the active window.
            x: Target X position in pixels
            y: Target Y position in pixels
            workspace: Target workspace name/number to move the window to
        """
        results = []
        addr = target or ""
        if x is not None and y is not None:
            await hyprctl.dispatch("movewindowpixel", f"exact {x} {y},{addr}")
            results.append(f"Moved to ({x},{y})")
        if workspace is not None:
            if target:
                await hyprctl.dispatch("movetoworkspace", f"{workspace},{target}")
            else:
                await hyprctl.dispatch("movetoworkspace", workspace)
            results.append(f"Moved to workspace {workspace}")
        if not results:
            return "No position or workspace specified — nothing to do."
        return "; ".join(results)
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 states the action ('move') but doesn't disclose important behavioral traits: whether this requires specific permissions, if it works on all window types, what happens when parameters conflict (e.g., both position and workspace specified), error conditions, or what the output contains. The description is minimal beyond the basic action.

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 concise with a clear two-part structure: purpose statement followed by parameter explanations. Every sentence earns its place, though the formatting with 'Args:' could be slightly more integrated. It's front-loaded with the core functionality first.

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 does adequately explain parameter meanings. However, as a mutation tool with behavioral implications, it lacks context about permissions, constraints, and error handling. The presence of an output schema helps, but the description doesn't reference what the tool returns. It's minimally complete but misses important operational context.

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 semantic explanations for all 4 parameters: 'target' as window selector with default behavior, 'x' and 'y' as pixel positions, and 'workspace' as name/number. This adds meaningful context beyond the schema's bare titles ('Target', 'X', 'Y', 'Workspace'), though it doesn't specify format details for 'target' or 'workspace' values.

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 tool's purpose: 'Move a window to a position or workspace.' It specifies both spatial movement and workspace transfer capabilities. However, it doesn't explicitly differentiate from sibling tools like 'resize_window' or 'focus_window' beyond the core verb 'move'.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'resize_window', 'focus_window', or 'switch_workspace', nor does it explain when moving vs. resizing or focusing is appropriate. The only implicit guidance is that it moves windows, but no context for selection among similar window manipulation tools.

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