Skip to main content
Glama

Focus a running application

hs_focus_app

Focus an already-running application by bringing its window to the front. Fails if the app is not running, preventing accidental launches.

Instructions

Bring an already-running application to the front. Unlike hs_launch_app this never starts anything, so it fails if the application is not running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesApplication name or bundle identifier.
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses two key behaviors: it does not launch the app and it fails if the app is not running. This is significant behavioral context beyond what the title implies, though it could mention permission requirements or multi-window handling, which are common for focus operations.

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, immediately stating the core action and then adding a single, valuable clarification about the alternative. Every word earns its place, with no redundancy or irrelevant 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 tool with one parameter and no output schema, the description is complete. It covers the purpose, the key limitation, and the relationship to the most similar sibling (hs_launch_app), making it fully self-contained for an agent to select and invoke correctly.

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 has 100% coverage for the single 'name' parameter with a clear description ('Application name or bundle identifier'). The tool description adds no further parameter details, but per the rubric, a baseline of 3 applies when schema coverage is high, and the schema already documents the parameter sufficiently.

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 brings an already-running application to the front, using a specific verb and resource. It also distinguishes itself from hs_launch_app, making its scope unmistakable.

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?

The description explicitly explains when to use this tool versus hs_launch_app, noting it never starts applications and fails if the app is not running. This provides clear guidance on appropriate usage compared to the sibling tool.

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