Skip to main content
Glama

select_menu

Choose a menu path like File > Export > PDF, opening each level so menu-load code runs; report disabled items, select context-menu paths, answer dialogs, and return a fresh snapshot.

Instructions

Choose a menu item like a user: path such as "File > Export > PDF" in the window's menu bar. Menus are opened level by level, so code that fills or enables items when a menu opens runs; a disabled item is reported, not clicked. A path ending at a menu leaves it open. With context=true, ref is right-clicked and the path is chosen in the context menu that opens (without ref: in the context menu already open). ref without context picks the menu bar of that component's window or internal frame. Waits first (up to timeoutMs) until the component is visible, enabled, editable where needed, and not blocked by a modal dialog or busy overlay, so no wait_for is needed for a component that is about to become usable. Returns the new 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": {
      "path": "<path>"
    },
    "name": "select_menu"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoComponent to right-click (context=true), or one inside the window whose menu bar to use
pathYesMenu texts separated by >, e.g. File > Open
dialogNoAnswer the modal dialog this action opens with this button (text, or ok/yes/no/cancel); its message is reported. An error if no dialog opens within 3 s
contextNoUse the context (right-click) menu of ref
timeoutMsNoHow long to wait for the component to become usable (default 10000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full disclosure burden and does so: side effects (code that fills or enables items runs as menus open), failure semantics (disabled item reported, not clicked), partial-completion semantics (a path ending at a menu leaves it open), an implicit wait with timeoutMs and its blocking conditions, and the returned value. It even states the 3 s error condition for the dialog parameter.

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 core action and its path syntax are front-loaded, and nearly every clause carries distinct operational information. The middle portion is dense and runs long in a single block, but no sentence is redundant filler.

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 five-parameter, mutation-style UI tool with no annotations and no output schema, the description covers waiting, dialog handling, menu-open side effects, and the return value ('Returns the new snapshot'), which substitutes for the missing output schema. Nothing an agent needs before calling it is absent.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema by explaining the interaction between ref and context (ref alone targets that component's window or internal frame menu bar) and what happens with context=true versus an already-open context menu. It also clarifies that the dialog answer's message is reported and that a missing dialog is an error.

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 first sentence gives a specific verb and resource (choose a menu item) plus the exact path syntax ('File > Export > PDF'), and the rest distinguishes this from a plain click by noting that menus open level by level and disabled items are reported rather than clicked. An agent can separate this from click or select_option without opening any 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?

It explicitly rules out a competing tool ('no wait_for is needed for a component that is about to become usable') and explains both context-menu modes (context=true with ref, or an already-open context menu without ref). It does not explicitly say when to prefer click over this for a non-menu target, so the guidance is strong but not exhaustive.

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