Skip to main content
Glama

list_windows

Enumerate visible desktop application windows to get IDs, process names, focus state, screen bounds, and accessibility availability so you can target screenshots and clicks accurately.

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 — 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.5/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: it discloses platform-dependent null bounds (Wayland native apps), the meaning of accessible=false, and a genuine side effect — Chromium-family windows get 'an automatic wake poke' and re-probe before being stamped false. That side-effect disclosure is exactly the behavior an agent cannot get from structured fields.

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?

Purpose is front-loaded in one line, then a clean per-field breakdown with the important caveat (bounds → click_at) placed inside the relevant field. The accessible paragraph runs long, especially the egui/accesskit parenthetical, which is useful but the least load-bearing sentence.

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?

An output schema exists, so the field-by-field enumeration is partly redundant, but the platform caveats and the accessible=false decision rule are not recoverable from the schema and are what make the tool callable correctly. Coverage is adequate for a no-argument enumeration tool.

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 meaning to add; baseline for a 0-param tool is 4. The description instead spends its space on return-value semantics, which is a reasonable substitution.

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?

Opens with a specific verb and resource: 'List all visible application windows on the desktop.' The scope word 'visible' plus the field list make it distinguishable from find_elements, get_tree, and screenshot without opening any 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?

Gives concrete downstream routing: bounds exist so you can 'translate screenshot pixels to click_at coordinates', and accessible=false means 'skip those tools and use screenshot + click_at directly'. What's missing is guidance on when to call list_windows itself versus wait_for_window for window discovery, so it stops 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.