Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

toggle_floating

Switch a window between floating and tiled modes. Specify a target window or toggle the active window's layout.

Instructions

Toggle floating mode for a window.

Args: target: Window selector. If omitted, toggles the active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `toggle_floating` tool handler is defined in `server.py` using the `@mcp.tool()` decorator. It dispatches a 'togglefloating' command to the Hyprland server via the `hyprctl` helper.
    @mcp.tool()
    async def toggle_floating(target: str | None = None) -> str:
        """Toggle floating mode for a window.
    
        Args:
            target: Window selector. If omitted, toggles the active window.
        """
        await hyprctl.dispatch("togglefloating", target or "")
        return f"Toggled floating{f' for {target}' if target else ''}"
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. It states the tool toggles floating mode, implying a mutation operation, but doesn't disclose what floating mode entails, whether it requires specific permissions, what happens to window state, or any side effects. This leaves significant gaps in understanding the tool's behavior 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.

Conciseness5/5

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

The description is extremely concise and well-structured: a clear purpose statement followed by a brief parameter explanation. Every sentence earns its place, with no wasted words. It's front-loaded with the main action, making it easy to scan and understand quickly.

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 should cover return values), the description doesn't need to explain outputs. However, for a mutation tool with no annotations, 0% schema description coverage, and one parameter, the description is minimal. It covers the basic action and parameter default but lacks details on behavior, error cases, or integration with sibling tools, making it adequate but with clear gaps.

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 context for the single parameter 'target', explaining that it's a 'Window selector' and specifying default behavior when omitted. Since schema description coverage is 0% (the schema only provides a title 'Target' without description), this compensates well. However, it doesn't detail what constitutes a valid 'Window selector' (e.g., format, examples), leaving some ambiguity.

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: 'Toggle floating mode for a window.' It specifies the verb ('toggle') and resource ('floating mode for a window'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'toggle_fullscreen' or 'move_window', which prevents a perfect score.

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 implied usage guidance by explaining that if the 'target' argument is omitted, it toggles the active window. This gives some context on when to use default behavior. However, it lacks explicit guidance on when to use this tool versus alternatives like 'toggle_fullscreen' or other window management tools, and doesn't 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