Skip to main content
Glama

Focus a window

hs_focus_window

Bring any window to the foreground by selecting it with its ID or a partial title match. The chosen window is returned so you can confirm the correct one was selected.

Instructions

Bring a window to the front, selected by id (exact) or by a substring of its title. The matched window is returned so you can confirm the right one was chosen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoWindow id from hs_list_windows.
titleNoSubstring of the window title.
Behavior3/5

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

With no annotations provided, the description carries the burden of disclosing behavioral traits. It reveals that the tool brings a window to the front and returns the matched window for confirmation, but it does not mention edge-case behaviors such as what happens when both id and title are provided or when multiple titles match. This leaves some ambiguity in behavior.

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 short, front-loaded sentences. It states the main action upfront, then clarifies selection and return value. Every sentence earns its place with no filler.

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?

For a simple focus operation, the description covers the return value, which is essential because no output schema exists. It omits potential error cases and parameter precedence, but given the tool's low complexity, it is adequately complete for an agent to use it effectively.

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 baseline is 3. The description reinforces that id is an exact match and title is a substring, but these details are already present in the schema. It adds no new semantic information about parameter precedence or required combinations.

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 states a specific action ('Bring a window to the front') with a clear resource ('a window') and distinguishes itself from siblings like hs_focus_app (focus app) and hs_move_window (move window). The selection method (id or title substring) is also explicitly outlined.

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?

The description provides clear context for when to use the tool: when you need to bring a specific window to the front and want to confirm the chosen window via the return value. It does not explicitly name alternative tools or exclusions, but the purpose is sufficiently specific relative to sibling tools.

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