Skip to main content
Glama

Window Focus

window_focus

Use this to activate an existing application window on the paired desktop, identified by a current window ID, process or title. This only changes the active window; use list_windows if the target is unknown.

Input Schema

NameRequiredDescriptionDefault
idNoWindow id returned by list_windows.
appNoApplication/process name substring.
pidNoOwning process id.
titleNoWindow title substring.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
backendNoInput backend preference. auto uses proven local backends and already-authorized portal input; portal explicitly requests XDG RemoteDesktop consent on Wayland; x11 forces XWayland/xdotool only for operations where read-back testing shows it is reliable. GNOME Wayland keyboard/text deliberately reject x11.

Output Schema

NameRequiredDescriptionDefault
dataNoWindow action structured result for window_action. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false; the description adds useful scoping context that no longer activation happens ('This only changes the active window'), which rules out resizing or raising side effects an agent might otherwise assume from the non-read-only annotation. It doesn't cover failure behavior when the ID is stale, which prevents a 5.

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?

Two sentences, both loaded: the capability statement first, then the routing constraint. No filler, no repetition of the tool name or title.

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

Completeness4/5

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

With an output schema, full annotation coverage, and 100% schema descriptions, the description only needs to frame the operation and the identifier alternatives, which it does. The required device parameter and the multi-device pairing model are left entirely to the schema, which is the only remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents id, app, pid, title, device, and the backend enum; baseline is 3. The description does add one semantic fact not in the schema — that id, process, and title are alternative identification paths — but it never mentions that device is required or what backend selection implies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('activate') plus resource ('an existing application window on the paired desktop') and enumerates the accepted identifiers (window ID, process, title). An agent can distinguish it from window_close, window_restore, or ui_focus without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Explicitly routes the agent to the alternative: 'use list_windows if the target is unknown', which gives the precondition for choosing that sibling instead. It does not address when to prefer it over ui_focus/browser_focus or what to do if the window no longer exists, so it falls short of full when/when-not coverage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources