Skip to main content
Glama
computer
by zznabil

List windows

list_windows
Read-onlyIdempotent

Retrieves capturable top-level desktop windows with IDs, app names, titles, process IDs, bounds, and focus state; filter by app or title substring to locate target windows.

Instructions

Capturable top-level windows: {id, app, title, pid, x, y, width, height, focused}. app prefers exact app names (case-insensitive) and falls back to substrings, as in omp; title is a case-insensitive substring. A failed title filter does not prove a window is absent.

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
appNoApp name (exact preferred, else substring).
limitNoMax results (default 100).
titleNoTitle substring.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered without the prose. The description adds real value beyond that by defining what 'capturable' means, explaining the app-name matching fallback order, and warning that an empty title-filter result does not prove a window is absent — a non-obvious behavioral trait an agent would otherwise misread as ground truth.

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?

Returned fields are front-loaded in a compact brace list, followed by the two matching rules and one caveat; nearly every sentence carries information. Minor deductions for the cryptic 'as in omp' reference, which assumes knowledge an agent may not have.

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 no output schema, the description correctly compensates by enumerating returned fields, and it covers matching semantics for both string filters on a simple three-parameter read tool. It omits ordering of results and whether the default limit silently truncates the window list, which matters when counting windows.

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 all three parameters and the baseline is 3. The description adds only marginal semantics beyond it — case-insensitivity for title and the exact-then-substring resolution order for app, which closely mirrors the schema's own wording.

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?

The description opens with a specific verb+resource ('Capturable top-level windows') and enumerates the exact fields returned ({id, app, title, pid, x, y, width, height, focused}), which distinguishes it from ax_tree/ax_find siblings that return element hierarchies. It stops short of naming a sibling or stating explicitly when to prefer it over list_applications.

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?

Usage is implied by the field list (you call this to get window ids and geometry for later capture/raise operations), but no explicit when-to-use or when-to-use-something-else guidance is given. The closing caveat about a failed title filter is a useful operational hint, though it is a filtering caveat rather than routing guidance.

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