Skip to main content
Glama

Run a menu command

ui_click_menu

Clicks a menu command by path, such as File > Export To > PDF, using case-insensitive or unique-prefix matching. Runs in the background; inspect any resulting dialog with ui_snapshot.

Instructions

Click a menu command by its path, e.g. ["File", "Export To", "PDF"]. Matching ignores case and trailing "…", and accepts a unique prefix. Works with the app in the background. Afterwards, a dialog may open: inspect it with ui_snapshot.

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>",
      "path": "<path>"
    },
    "name": "ui_click_menu"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesApp to control: finalcut, motion, logic, mainstage, compressor, pixelmator, keynote, pages, numbers, or any other app name, bundle ID or .app path
pathYes
frontNoBring the app to the front first. Off by default: apps are driven in the background so the user's screen isn't taken over.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations declare a non-read-only, non-destructive, non-open-world action, and the description usefully adds that the app is driven in the background and that the click may open a dialog. Beyond that it does not disclose failure modes (ambiguous prefix, missing menu) or that the invoked command itself may trigger side effects in the app, which matters for a click action flagged readOnly=false.

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?

Three short sentences, front-loaded with purpose and example, then matching semantics, then the post-condition. No filler and nothing repeated from the schema.

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?

With no output schema, the description correctly closes the loop by pointing to ui_snapshot for the resulting dialog, and it fully explains the path parameter's matching semantics. The remaining gap is error/ambiguity handling, which an agent would need to call this reliably on a three-segment path that partially matches.

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?

The schema leaves `path` completely undocumented (67% coverage overall), and the description compensates by defining matching rules the schema cannot express: case-insensitive, trailing "…" ignored, and unique-prefix matching accepted. The example also clarifies that menu nesting is expressed as array segments. It says nothing about ambiguity or no-match behavior, keeping it short of a 5.

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 ("Click a menu command by its path") and immediately grounds it with a concrete example path ["File", "Export To", "PDF"]. The path-array shape makes it unmistakable from element-level siblings like ui_click, so an agent can pick it without opening the schema.

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?

Provides explicit follow-up routing: "Afterwards, a dialog may open: inspect it with ui_snapshot." It also notes background operation, implying you need not front the app. It does not mention ui_list_menus for discovering valid paths, nor any when-not-to-use condition.

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