Skip to main content
Glama

Move or resize a window

hs_move_window

Position and resize a window by its ID using pixel coordinates. Receive the settled placement and an adjusted flag when macOS overrides the request.

Instructions

Set the position and/or size of a window by id, in screen pixels. Omitted fields keep their current value. The returned frame is read back after the move settles, so it is the real placement; adjusted=true means macOS or the app put the window somewhere other than requested. Use hs_screens to learn the available coordinate space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
idYesWindow id from hs_list_windows.
widthNo
heightNo
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description discloses important behavior: the returned frame is the real placement read after the move settles, and adjusted=true indicates deviation. It also states that omitted fields retain their current value, which is non-obvious. This adds transparency beyond the schema.

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 a single sentence that front-loads the action and includes necessary details about return behavior and prerequisites. No unnecessary words.

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?

The tool has 5 parameters, no output schema, and no annotations, so the description must cover behavior. It does: it explains the return frame, the adjusted flag, and references hs_screens for coordinate space. It also implies the id source via schema. This is sufficient for an agent to use the tool correctly.

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 only 20% (only id has a description). The description adds units ('in screen pixels') and explains that omitted fields keep their values, giving meaning to optionality. It doesn't enumerate each parameter but provides sufficient context for x, y, width, height.

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 the tool 'Set the position and/or size of a window by id'—a specific verb (set) and resource (window) with scope (position/size). It distinguishes itself from sibling tools like hs_focus_window (focus) and hs_window_layout (layout) by focusing on move/resize. The mention of 'by id' further clarifies its operation.

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?

It provides context: 'Omitted fields keep their current value' explains how to use optional parameters. It also advises using hs_screens for coordinate space, a prerequisite for correct usage. However, it doesn't explicitly state when to use this vs alternatives, but the purpose is distinct enough.

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

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