Skip to main content
Glama

mac_menu_command

Destructive

Trigger any macOS app's menu bar item by title or path via accessibility, without the app being frontmost, and report whether the action changed state or opened a dialog.

Instructions

Run an app's menu bar command through accessibility (AXPress on the item: no pointer, the app need not be frontmost). command is the item title as the app shows it (unique in the menu bar) or a path such as "File > Export > PDF…"; an item that reads disabled is still pressed (closed menus report stale state) and the result says whether anything changed; reports delivery and any sheet or dialog it opened. Menu items under the Apple menu and items whose keyboard shortcut is one of the refused chords need force:true; Quit of the MCP host or of a macOS session process is always refused.

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": {
      "app": "<app>",
      "command": "<command>"
    },
    "name": "mac_menu_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYes
forceNo
commandYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.6
    • addedInput schema / properties / force
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / required
      Added value: +[
      +  "app",
      +  "command"
      +]
  2. First observedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations, which only mark it destructive/openWorld/non-idempotent. It discloses that disabled-looking items are still pressed because closed menus report stale state, that the result reports whether anything changed and any sheet or dialog opened, and which invocations are refused and which require force:true.

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 mechanism, then command syntax, then edge cases and refusals; every clause adds operational value. The sentences are dense and run long, but there is essentially no filler to cut.

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?

No output schema exists, yet the description explains what the result reports (delivery, changed-state, opened sheets/dialogs), which is the key gap for a destructive tool. Remaining gaps are the `app` parameter format and any accessibility-permission prerequisite.

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?

With 0% schema description coverage the description carries the full burden, and it does so for command (item title as displayed, unique in the menu bar, or a path like "File > Export > PDF…") and for force (Apple menu items, refused chords, always-refused quits). The required `app` parameter is never explained, so an agent must guess whether it takes a name, bundle id, or pid.

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+resource ("Run an app's menu bar command") and immediately distinguishes the mechanism from pointer-based siblings: "through accessibility (AXPress on the item: no pointer, the app need not be frontmost)". That mechanism sentence is exactly what separates it from mac_click and mac_key.

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?

Gives concrete when-to conditions, including the force:true requirement for Apple menu items and items with refused keyboard-shortcut chords, plus the hard refusal for Quit of the host or a session process. It stops short of naming the alternative tool (e.g. use mac_key when a shortcut is reliable), so the agent must infer the routing.

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