Skip to main content
Glama
computer
by zznabil

List windows

list_windows
Read-onlyIdempotent

Lists capturable top-level windows with app, title, position, size, and focus state, letting agents find and target a specific window by app or title filter.

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. wait (0-10000 ms) polls every 100 ms and returns as soon as one window matches, to catch a window that is still opening; with no match by then the list is empty.

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).
waitNoMilliseconds to keep polling for a match, 0 to 10000 (default 0: list once).
limitNoMax results (default 100).
titleNoTitle substring.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / wait
      Added value: +{
      +  "description": "Milliseconds to keep polling for a match, 0 to 10000 (default 0: list once).",
      +  "type": "integer"
      +}
  2. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, closed-world read, so the description adds genuinely new behavior: polling every 100 ms up to 10 s, returning as soon as one window matches, and that an empty result after a title filter is not proof of absence. It does not describe ordering or what 'capturable' excludes, which keeps it below 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?

The return shape is front-loaded, followed by filter semantics and then the wait behavior, with no filler sentences. Every clause carries operational information an agent would otherwise have to guess.

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 compensates by listing returned fields, and it explains the one non-obvious parameter (wait) in full. It is nearly complete for a read-only listing tool; only result ordering and any inclusion/exclusion rules for 'capturable' are unstated.

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?

Schema coverage is 100%, so baseline is 3; the description nonetheless adds matching semantics the schema only hints at, namely exact-then-substring app matching, case-insensitive title substring matching, and the early-return polling contract for wait. The limit parameter is not discussed in the description, but the schema documents it adequately.

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 resource and scope, 'Capturable top-level windows', and enumerates the returned fields (id, app, title, pid, geometry, focused), so an agent knows exactly what it gets back. It is distinguishable from list_applications/list_displays by the 'top-level windows' framing, though no sibling is named explicitly.

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?

It implicitly defines usage: call with filters to enumerate, or with wait to catch a window that is still opening, and it warns that a failed title filter does not prove absence. There is no explicit statement of when to prefer this over ax_tree, observe, or list_applications, so routing guidance is left to inference.

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