click
Simulate real mouse press/release on Java Swing components to activate menu items, table cells, lists and tree nodes, waiting until usable and returning an updated UI snapshot.
Instructions
Click a component like a user would, with real mouse press/release events: a focusable component takes the focus first (so the previous field's input verifier and focus-lost handlers run). Menu items, even inside closed menus, are activated directly. For tables, lists and trees pass value (the cell's text, the item's text, or a tree path like "Root/Child") or row (and col for tables). Use clickCount=2 for double-click, button=right for context menus, modifiers="Ctrl" or "Shift" to add to or extend the selection (select_option with values/indexes does several at once). 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": {
"ref": "<ref>"
},
"name": "click"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Explicit x inside the component | |
| y | No | Explicit y inside the component | |
| col | No | Table column | |
| ref | Yes | ||
| row | No | Row (table/tree) or index (list) to click | |
| value | No | Table: text of a cell to click (first match; limit with col). List: item text. Tree: node path, ancestors get expanded | |
| button | No | ||
| 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 | |
| header | No | Table: click the header of column col (e.g. to sort) | |
| modifiers | No | Keys held during the click: Ctrl, Shift, Alt, Meta, or combined like Ctrl+Shift | |
| timeoutMs | No | How long to wait for the component to become usable (default 10000) | |
| clickCount | No | 2 for double-click |