Skip to main content
Glama

List windows

hs_list_windows
Read-onlyIdempotent

List all visible macOS windows with ID, app, title, frame, and screen. Use the window IDs to focus or move windows via other tools.

Instructions

List every visible window with its id, owning application, title, frame, and screen. Window ids are what hs_focus_window and hs_move_window operate on, so call this first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoOnly return windows whose application name contains this text, case-insensitive.
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so no safety risk. The description adds behavioral context by specifying that it lists 'every visible window' (excluding hidden/minimized ones) and includes the specific attributes returned, which is useful beyond the annotations.

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 description is two sentences long, front-loaded with the primary action and output, and ends with a clear prerequisite note. Every sentence earns its place with no redundancy or extraneous detail.

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?

For a simple read-only list operation with one optional parameter, the description fully explains what the tool returns, the scope (visible windows), and the typical use case (prerequisite for hs_focus_window/hs_move_window). No output schema is needed because the return fields are explicitly listed.

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?

The schema contains a complete description for the only parameter (app) with case-insensitive substring filtering, covering 100% of parameters. The tool description itself does not add further parameter details, but the schema description is sufficient, so a baseline of 3 is appropriate.

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 description uses a specific verb ('List') and resource ('every visible window') and enumerates the exact return fields (id, owning application, title, frame, screen). It clearly differentiates from sibling tools like hs_list_apps and hs_screens by stating it returns window-level data with ids used for focus/move operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is given: 'Window ids are what hs_focus_window and hs_move_window operate on, so call this first.' This tells the agent when to use this tool (as a prerequisite for window manipulation) and explains the relationship to alternative tools, making the usage context unmistakable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vukvukovich/hammerspoon-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server