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
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Component to right-click (context=true), or one inside the window whose menu bar to use | |
| path | Yes | Menu texts separated by >, e.g. File > Open | |
| dialog | No | Answer 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 | |
| context | No | Use the context (right-click) menu of ref | |
| timeoutMs | No | How long to wait for the component to become usable (default 10000) |