Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

switch_workspace

Switch between workspaces in Hyprland by name or number to organize windows and manage desktop layouts.

Instructions

Switch to a workspace by name or number.

Args: workspace: Workspace name or number (e.g. "1", "3", "special:scratchpad")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The switch_workspace tool uses hyprctl to dispatch the "workspace" command to Hyprland.
    @mcp.tool()
    async def switch_workspace(workspace: str) -> str:
        """Switch to a workspace by name or number.
    
        Args:
            workspace: Workspace name or number (e.g. "1", "3", "special:scratchpad")
        """
        await hyprctl.dispatch("workspace", workspace)
        return f"Switched to workspace {workspace}"
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It mentions the action ('switch') but doesn't clarify effects: whether this changes the user's active workspace view, moves windows, requires specific permissions, or has side effects. The example parameter value ('special:scratchpad') hints at special workspace types but doesn't explain them.

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 two sentences: one stating the purpose and one explaining the parameter. The Args section is clearly separated, though the example could be more integrated. No wasted words, but could be slightly more front-loaded with context.

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 1 parameter with 0% schema coverage but good description compensation, and an output schema exists (so return values needn't be explained), the description is minimally adequate. However, as a workspace-switching tool with no annotations, it should better explain behavioral implications and relationships to sibling tools for full 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?

The description adds significant value beyond the schema, which has 0% description coverage. It explains that the 'workspace' parameter accepts either a name or number, provides examples ('1', '3', 'special:scratchpad'), and clarifies the format. This compensates well for the schema's lack of documentation.

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 ('switch to') and target resource ('workspace'), specifying it can be done by name or number. However, it doesn't distinguish this tool from its sibling 'list_workspaces' or explain how switching workspaces relates to other window management tools like 'focus_window' or 'move_window'.

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 is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing to know workspace names/numbers from 'list_workspaces'), nor does it explain what 'switching' entails in this context (e.g., changing active workspace vs. moving windows).

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