Skip to main content
Glama

list_windows

Enumerate visible top-level Windows desktop windows, foreground first, returning hwnds, process names, screen rectangles, and occlusion/elevation status for UI tree reads or targeted window capture.

Instructions

List visible top-level windows, foreground first.

Returns hwnd, process name, rect in physical screen pixels, whether the
window is covered by another window (occluded), and whether it can only be
read by an elevated server (elevated). Titles are localized by Windows.

Use the hwnd with get_ui_tree and capture_window. hwnds are stable for the
lifetime of a window but change when the app is restarted.

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
include_desktopNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior4/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 substantial work: it enumerates returned fields, flags the occlusion and elevation caveats, warns that titles are OS-localized, and notes that hwnds are stable only for the window's lifetime and change on app restart. The remaining gap is operational behavior — no mention of enumeration cost, permission/elevation requirements to run the call itself, or pagination/limits for large window sets.

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?

Three short sentences, front-loaded with the core action and ordering, then the field list with parenthetical definitions, then the handoff instruction. Every sentence earns its place and nothing is padding.

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, yet the description still summarizes the salient return fields and their caveats (occlusion, elevation, localized titles), which is appropriate given how non-obvious those are. Completeness is only weakened by the unexplained include_desktop parameter and the absence of any note on cost or permissions for a full desktop enumeration.

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

Parameters2/5

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

The single parameter, include_desktop, has 0% schema description coverage and is never mentioned in the description. An agent cannot tell from either source whether it adds the desktop shell window, what the default excludes, or why it matters, so meaning is not added beyond a bare boolean with a default of false.

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 and resource ('List visible top-level windows') plus an ordering guarantee ('foreground first'), which no sibling provides. It also implicitly positions itself as the discovery step that produces the hwnd values consumed by get_ui_tree and capture_window, so an agent can separate it from those siblings 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?

Explicitly tells the agent what to do with the output ('Use the hwnd with get_ui_tree and capture_window'), which establishes this as the entry point of the workflow. It does not state exclusions or when-not-to-use conditions (e.g., versus inspect_element or capture_som), so it stops short of full alternatives guidance.

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