Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

list_workspaces

Retrieve active workspaces and their window counts to manage desktop organization and monitor application distribution across displays.

Instructions

List all active workspaces with window counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The list_workspaces tool handler, which queries workspace data from hyprctl, sorts it, and formats it into a list string.
    @mcp.tool()
    async def list_workspaces() -> str:
        """List all active workspaces with window counts."""
        workspaces = await hyprctl.query("workspaces")
        workspaces.sort(key=lambda w: w["id"])
        lines = []
        for w in workspaces:
            lines.append(
                f"- Workspace {w['name']} (id={w['id']}): "
                f"{w['windows']} window(s), monitor {w['monitor']}"
            )
        return "\n".join(lines)

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