Skip to main content
Glama

Window Control

window_control
Destructive

Control application window state on Wayland: minimize, maximize, restore, focus, or close a target window using an action and optional PID.

Instructions

Controls window state across any active Wayland compositor (KDE, GNOME, Hyprland, Sway).

Supported actions:

  • 'minimize': Minimizes the target application window.

  • 'maximize': Maximizes the target application window.

  • 'restore': Restores or unminimizes/unmaximizes the target application window.

  • 'focus': Activates and brings the target application window to the foreground.

  • 'close': Requests a clean close of the target window.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "window_control"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNoThe target application PID. Defaults to the active managed application.
actionYesThe desired window management action.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Adds real context beyond annotations: 'close' is described as a *clean* request rather than a kill, 'focus' activates and brings to foreground, and 'restore' covers both unminimize and unmaximize. The destructiveHint=true annotation is consistent with the presence of 'close'. What is missing is failure behavior (nonexistent pid, already-maximized window) and whether close can be refused by the app.

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?

Front-loaded capability statement followed by a scannable per-action bullet list; every line carries distinct semantic content with no filler or restatement of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full schema description coverage, the description only needs to carry action semantics and platform scope, both of which it delivers. Nothing an agent needs to select and call this two-parameter tool correctly is missing.

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 coverage is 100% (baseline 3), but the description materially improves the 'action' parameter, whose schema text is only the generic 'The desired window management action' with no enum — the description supplies the full value set and its meaning. The 'pid' parameter's default is already handled in the schema and is not repeated, which is appropriate.

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?

States a specific verb and resource ('Controls window state') plus the exact scope ('across any active Wayland compositor (KDE, GNOME, Hyprland, Sway)') and enumerates all five actions with one-line semantics. It stops short of distinguishing itself from siblings like terminate_app or capture_window_frame, so an agent must infer that 'close' here is window-level rather than process-level.

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 action list implies when each operation applies, but there is no explicit guidance on choosing this tool over alternatives — notably no contrast with terminate_app/restart_app for closing an app, or with interact_with_node for focusing a UI element. No prerequisites or preconditions (e.g., window must exist/be managed) are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.