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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
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 mentions 'active workspaces' and 'window counts', but doesn't clarify what 'active' means, whether the list is paginated, if there are rate limits, or what permissions are required. This leaves significant gaps for a tool that likely interacts with system resources.

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 a single, efficient sentence: 'List all active workspaces with window counts.' It is front-loaded with the core purpose and includes a useful detail ('with window counts') without any wasted words. Every part of the sentence adds value.

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 the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description doesn't need to explain return values or parameters. However, it lacks behavioral details (e.g., permissions, rate limits) and usage guidelines relative to siblings. For a simple list tool, it's minimally adequate but leaves gaps in 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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to explain parameters, but it could have mentioned if any implicit filters or options exist. Since there are no parameters, a baseline of 4 is appropriate, as the description adequately covers the tool's scope without parameter confusion.

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: 'List all active workspaces with window counts.' It specifies the verb ('List'), resource ('active workspaces'), and includes additional detail ('with window counts'). However, it doesn't explicitly differentiate from sibling tools like 'list_windows' or 'list_monitors', 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_windows' or 'list_monitors', nor does it specify any prerequisites, exclusions, or contextual triggers for usage. The agent must infer usage from the purpose alone.

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