Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

resize_window

Resize windows to specific pixel dimensions in Hyprland. Set exact width and height for active or selected windows using this desktop automation tool.

Instructions

Resize a window to exact pixel dimensions.

Args: width: Target width in pixels height: Target height in pixels target: Window selector. If omitted, resizes the active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
heightYes
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The resize_window tool handler, which uses hyprctl to dispatch the resizewindowpixel command.
    @mcp.tool()
    async def resize_window(
        width: int,
        height: int,
        target: str | None = None,
    ) -> str:
        """Resize a window to exact pixel dimensions.
    
        Args:
            width: Target width in pixels
            height: Target height in pixels
            target: Window selector. If omitted, resizes the active window.
        """
        await hyprctl.dispatch("resizewindowpixel", f"exact {width} {height},{target or ''}")
        return f"Resized to {width}x{height}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states the action ('Resize a window'), it doesn't describe what happens if the resize fails, whether it requires specific permissions, if there are size constraints, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence adds value: the first states what the tool does, and the subsequent lines clarify each parameter's role. There's no redundant information, and it's appropriately sized for a tool with three parameters.

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 that there's an output schema (which means return values are documented elsewhere), the description covers the basic purpose and parameters adequately. However, as a mutation tool with no annotations, it should ideally mention more about behavioral aspects like error conditions or constraints. The presence of an output schema raises the baseline, but the lack of behavioral context keeps the score at a minimum viable level.

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?

The description adds meaningful semantics beyond the input schema. The schema has 0% description coverage, providing only titles and types. The description explains that width and height are 'Target width in pixels' and 'Target height in pixels', and clarifies that 'target' is a 'Window selector' with default behavior when omitted. This compensates well for the low schema coverage.

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 with a specific verb ('Resize') and resource ('a window'), and specifies the action is to exact pixel dimensions. It distinguishes itself from siblings like 'move_window' or 'toggle_fullscreen' by focusing specifically on dimension adjustment. However, it doesn't explicitly contrast with all possible window manipulation tools in the sibling list.

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 provides some usage context by mentioning that if the 'target' parameter is omitted, it resizes the active window. This gives basic guidance on when to specify the target parameter. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'toggle_fullscreen' or 'move_window', nor does it mention any prerequisites or exclusions.

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