Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

list_monitors

Retrieve connected monitor details including resolution, position, and active workspace for managing multi-display setups in Hyprland desktop environments.

Instructions

List all connected monitors with resolution, position, and active workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implementation of the list_monitors tool. It uses hyprctl.query("monitors") to fetch monitor data and formats it into a human-readable string.
    @mcp.tool()
    async def list_monitors() -> str:
        """List all connected monitors with resolution, position, and active workspace."""
        monitors = await hyprctl.query("monitors")
        lines = []
        for m in monitors:
            lines.append(
                f"- {m['name']}: {m['width']}x{m['height']}@{m['refreshRate']:.0f}Hz "
                f"at ({m['x']},{m['y']}), workspace {m['activeWorkspace']['name']}"
                f"{' [focused]' if m.get('focused') else ''}"
            )
        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