Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

send_shortcut

Send keyboard shortcuts to control applications in Hyprland desktop environments. Specify modifier keys, target keys, and optionally target specific windows for automation.

Instructions

Send a keyboard shortcut via Hyprland (can target specific windows).

Args: mods: Modifier keys (e.g. "CTRL", "SUPER SHIFT", "ALT CTRL", or "" for none) key: Key name (e.g. "c", "F4", "Return", "space") target: Optional window selector (e.g. "class:firefox"). Empty = active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modsYes
keyYes
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `send_shortcut` tool implementation, which dispatches the "sendshortcut" command to hyprctl.
    async def send_shortcut(mods: str, key: str, target: str | None = None) -> str:
        """Send a keyboard shortcut via Hyprland (can target specific windows).
    
        Args:
            mods: Modifier keys (e.g. "CTRL", "SUPER SHIFT", "ALT CTRL", or "" for none)
            key: Key name (e.g. "c", "F4", "Return", "space")
            target: Optional window selector (e.g. "class:firefox"). Empty = active window.
        """
        target_str = target or ""
        await hyprctl.dispatch("sendshortcut", f"{mods}, {key}, {target_str}")
        desc = f"{mods}+{key}" if mods else key
        return f"Sent shortcut {desc}{f' to {target}' if target else ''}"
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 insight. It mentions the action is 'via Hyprland' but doesn't disclose critical traits like whether this requires specific permissions, potential side effects (e.g., window focus changes), error conditions, or response format. The description doesn't contradict annotations, but fails to compensate for their absence.

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 efficiently structured with a purpose statement followed by parameter explanations. Each sentence adds value: the first sets context, and the Args section clarifies parameters without redundancy. It could be slightly more front-loaded by integrating key usage notes earlier.

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 3 parameters with 0% schema coverage and no annotations, the description does well on parameters but lacks behavioral context. The presence of an output schema (not shown here) means return values may be documented elsewhere, reducing burden. However, for a tool that interacts with window management, more guidance on effects and limitations would improve completeness.

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?

Schema description coverage is 0%, so the description must compensate. It provides clear semantic explanations for all three parameters: 'mods' as modifier keys with examples, 'key' as key name with examples, and 'target' as an optional window selector with behavior clarification ('Empty = active window'). This adds substantial value beyond the bare schema.

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 ('Send a keyboard shortcut') and target environment ('via Hyprland'), with a specific feature mention ('can target specific windows'). It distinguishes from sibling tools like 'key_press' or 'type_text' by focusing on shortcut combinations rather than individual key presses or text typing. However, it doesn't explicitly contrast with all similar siblings.

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 implies usage context through 'can target specific windows' and the target parameter explanation, suggesting when to use optional targeting. However, it lacks explicit guidance on when to choose this tool over alternatives like 'key_press' or 'type_text', and doesn't mention 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