Skip to main content
Glama

mac_app

Destructive

Launch, activate, hide, unhide, or quit macOS apps by display name, bundle ID, or .app path, with optional window waiting and force-quit for reliable lifecycle control.

Instructions

Launch, activate, hide, unhide or quit an app (display name, bundle id, or .app path). launch: attaches to a running instance (activate:true brings it forward), else starts it in the background unless activate:true and waits for a window (wait_window, default true). quit: graceful, verified by the process ending (a save dialog keeps it running — reported); force:true force-quits and loses unsaved work. Finder, Dock, loginwindow and other session processes, and the MCP host itself, are never quit. launch with cdp_port (0 = pick a free port; needs NORACU_ALLOW_CDP=1) starts a Chromium/Electron app fresh with a loopback DevTools port for browser_launch cdp_port — refused if the app is already running.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>",
      "app": "<app>"
    },
    "name": "mac_app"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYes
forceNo
actionYes
activateNo
cdp_portNo
timeout_msNo
wait_windowNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.6

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, but the description adds genuinely new behavioral context: quit is graceful and verified by process exit, a save dialog leaves the app running and that outcome is reported, force:true destroys unsaved work, and system/session processes plus the MCP host are never quit. The only real gap is that launch timeout behavior and what the return payload reports are not described.

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?

The key action verb list and app formats are front-loaded, and nearly every clause earns its place by specifying launch/quit semantics or safety carve-outs. The nested parentheticals and run-on sentences make it denser than it needs to be, but no filler is present.

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 7-parameter, mutation-capable tool with no output schema and no annotation-level detail on side effects, the description covers launch/quit/activate behavior, protected-process exclusions, and the CDP setup path. Missing only timeout_ms semantics and any hint about what a successful or blocked call returns.

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 0%, so the description carries the burden, and it does explain app identifier formats, activate, wait_window (default true), force, and cdp_port (0 = free port, env-var gated). However timeout_ms is never mentioned and the action values are only implied by the verb list rather than tied to the parameter, leaving one of seven params undocumented.

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 opening sentence names the resource (an app) and enumerates the concrete verbs (launch, activate, hide, unhide, quit) plus the accepted identifier forms (display name, bundle id, .app path). That distinguishes it from siblings like mac_apps (listing) and browser_launch (CDP attach target), which the cdp_port clause also links to explicitly.

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?

It states when launch attaches to a running instance versus starting fresh, when activate:true takes effect, when to use quit versus force:true, and the condition under which cdp_port is refused (app already running) or requires NORACU_ALLOW_CDP=1. The alternative path (browser_launch cdp_port) is named as the downstream consumer, giving an agent a clear routing decision.

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