Skip to main content
Glama

Switch desktop (Space)

hs_goto_space

Switch to a specific macOS desktop by id or 1-based position, then verify the actual landing and report if macOS rearranged spaces.

Instructions

Switch to another macOS desktop, either by its id from hs_list_spaces or by its 1-based position. The result reports where the switch actually landed: arrived=false with landedOn set means the system did not end up on the requested desktop, which can happen when macOS auto-rearranges Spaces mid-switch. Verified, not assumed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSpace id from hs_list_spaces.
positionNo1-based user desktop position, numbered across all screens the way macOS and hs_list_spaces number them.
Behavior5/5

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

With no annotations, the description fully assumes the transparency burden and excels. It discloses a non-obvious behavioral trait: the result reports actual landing via 'arrived=false with landedOn set', explaining the macOS auto-rearrange edge case. This is verified, not assumed, adding significant value.

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 three compact sentences: purpose, result behavior, and a brief 'Verified, not assumed' tagline. Every sentence contributes meaning, with no repetition or filler, making it highly efficient.

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?

Despite lacking an output schema, the description explains the key return semantics (arrived/landedOn). It does not specify what happens if both id and position are provided or if neither is given, leaving a minor ambiguity given the parameters are optional.

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 already contains detailed descriptions for both id and position, covering 100% of parameters. The description essentially restates these details without adding new semantic insight, so it meets the baseline but does not exceed it.

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 clearly states the tool's function: 'Switch to another macOS desktop' with a specific verb and resource. It distinguishes the tool from siblings by mentioning 'by its id from hs_list_spaces or by its 1-based position', making it evident this is for changing Spaces, not listing them.

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 on how to use the tool (via id or position), implicitly indicating it is for switching desktops. However, it does not explicitly contrast with alternatives like hs_list_spaces or clarify behavior when both id and position are given, which are optional.

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