Skip to main content
Glama

list_windows

Lists all visible application windows with IDs, process names, focus state, and screen bounds, letting you map screenshot pixels to click coordinates and detect windows without accessibility data.

Instructions

List all visible application windows on the desktop.

Fields per entry: id, name, pid, focused, minimized titles: top-level window titles where name is something else (process name on macOS, AT-SPI app name on Linux). bounds: [x, y, width, height] in global screen coords (top-left origin), or null when the platform can't report it. On a Linux Wayland session a native-Wayland app can't know its position, so bounds are null unless it runs under XWayland. Use this to translate screenshot pixels to click_at coordinates. accessible: false signals the platform a11y tree has nothing for this window, so find_elements / get_tree will return empty. Skip those tools and use screenshot + click_at directly. Chromium-family windows (Electron/CEF) get an automatic wake poke first: their lazy a11y trees are enabled and re-probed before this is stamped false. So a false here means genuinely canvas-only: custom OpenGL/Vulkan surfaces, raw immediate-mode toolkits without an AccessKit adapter. (egui+accesskit surfaces as accessible=true.)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_windows"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well. It discloses platform-dependent nulls for bounds (Wayland), the meaning of the accessible flag, the side effect of the automatic wake poke on Chromium-family windows, and the specific cases where accessibility trees are genuinely empty. That is substantive behavior beyond what any structured field provides.

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 one-line purpose is front-loaded, followed by a clearly labeled, per-field breakdown that is easy to scan. It is longer than a minimal definition, but nearly every clause conveys a non-obvious platform behavior; only the Chromium wake-poke explanation runs slightly long.

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?

Given an output schema exists, the description was not required to explain return values, yet it supplies the interpretation an agent actually needs: coordinate origin for bounds, when bounds are null, and the downstream consequence of accessible=false. For a zero-parameter enumeration tool, nothing material 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?

The tool takes zero parameters, so there is no parameter semantics to add; baseline for a 0-param tool is 4. The description instead spends its detail on interpreting returned fields, which is useful but is output-oriented rather than input-oriented.

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?

The first sentence gives a specific verb and resource ('List all visible application windows on the desktop') with the scope qualifier 'visible'. The following field breakdown makes the resource concrete enough that an agent can distinguish this enumerator from siblings like wait_for_window or find_elements.

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?

The description routes the agent conditionally: when 'accessible' is false, skip find_elements/get_tree and go straight to screenshot + click_at. It also states the intended use of bounds for translating screenshot pixels to click_at coordinates. It does not explicitly state when to call this versus not at all, but the conditional routing is clear.

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