Skip to main content
Glama

macos_focus_app

Bring a running app to the front on macOS, switching to its Space and waiting until it is frontmost. Omit the app to return focus to the agent's terminal before asking the user anything.

Instructions

macOS only. Bring a running app to the front, switching to the Space its window is on (a full-screen window has a Space of its own), and wait until it is the frontmost app. Omit app to return to the terminal this agent runs in: do that when a stretch of work that brought another app forward (the tab_* browser tools, another macos_focus_app) is done, and before asking the user anything, so the conversation is back on their screen. Reports the app that was frontmost before, to pass back later. Needs no macOS permission.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "macos_focus_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
appNoThe app to bring to the front: its bundle id (com.apple.Terminal) or its name as macos_list_apps shows it (Terminal, Mail, Brave Browser), matched regardless of case. Omit it to return to the host, the terminal or app this agent runs in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses macOS-only scope, Space switching including full-screen windows owning a Space, the blocking wait until frontmost, the prior-app return value, and that no macOS permission is needed — strong coverage. It stops short of noting failure modes (app not running / name not matching) or latency behavior, so it is not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the platform and action, then constraints, then the omit-case, then the return value. Every clause earns its place, though the long parenthetical about tab_* tools and the Space aside make it denser than ideal for a single-parameter tool.

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?

With no output schema, the description still tells the agent what comes back (the previously frontmost app, to pass back later) and that permissions are not required. For a one-optional-parameter focus tool, nothing an agent needs in order to call it correctly is missing.

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 single optional parameter is already well documented (bundle id or name, case-insensitive, omit to return to host). The description adds the usage rationale for omitting the argument but no syntax or format detail beyond the schema, so the baseline of 3 applies.

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?

States a specific verb and resource ('Bring a running app to the front') plus the consequential detail that it switches to the window's Space and blocks until the app is frontmost. This clearly separates it from macos_list_apps (which enumerates apps) and from the tab_* tools (browser-internal).

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?

Gives explicit when-to-use guidance: omit app to return to the host terminal, do it when a stretch of work that brought another app forward (tab_* browser tools, another macos_focus_app) is done, and before asking the user anything. Both the trigger and the rationale (conversation back on the user's screen) are spelled out.

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