Skip to main content
Glama
computer
by zznabil

List menu items

menu_items
Idempotent

Retrieve native menu-bar items for a target window or list entries under a specified menu path, with full paths, to inspect available app commands.

Instructions

Native menu-bar items of a window; with path, that menu's items (depth-first, full paths). Not read-only: on macOS reading a menu first makes its window key in its app (omp classifies it as exec).

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": {
      "target": "<target>"
    },
    "name": "menu_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoMenu path, e.g. ["File"].
targetYesWindow id from list_windows (a "window:<id>" prefix is accepted), "desktop", or "display:<id>" / "display:active" / "display:all". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id so the input stays scoped to that window; desktop/display input directly drives the user's pointer and keyboard."
  2. Changed1 schema field changedv0.3.3
    • changedInput schema / properties / target / description
      Previous value: -"Window id from list_windows, \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."New value: +"Window id from list_windows (a \"window:<id>\" prefix is accepted), \"desktop\", or \"display:<id>\" / \"display:active\" / \"display:all\". Prefer a window id: window input runs in the background; desktop/display input drives the user's real pointer and keyboard."
  3. First observedv0.2.0

TDQS

A4/5.0
Behavior5/5

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

It goes well beyond the annotations by explaining why readOnlyHint is false: on macOS merely reading a menu makes its window key in its app, and it notes the tool is classified as exec. That is exactly the non-obvious side effect an agent needs before triggering a focus change.

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?

Two dense clauses with no filler, and the caveat about not being read-only is placed immediately after the core behavior. The telegraphic phrasing ("with path, that menu's items") is compact rather than wasteful.

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 two-parameter tool with a fully documented schema and no output schema, the description covers behavior, the path variant's result ordering, and the side effect behind the readOnlyHint=false annotation. Nothing an agent needs in order to invoke it safely appears to be 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 coverage is 100%, so both parameters are already documented in detail, including the target formats and the preference for window ids. The description adds the return shape for path (depth-first, full paths) but little else about the parameters themselves, so the baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource precisely ("Native menu-bar items of a window") and explains the path variant, which yields one menu's items depth-first with full paths. It is clearly distinct from menu_select by being a listing operation, but it never names the sibling to sharpen that contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: pass no path for the window's menu bar, pass path to descend into a menu. There is no explicit when-to-use versus alternatives guidance and no mention of menu_select or how to act on the results.

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