select_option
Selects entries in Swing combo boxes, lists, tabs, tables or trees by visible text or index, with Ctrl/Shift multi-select, and waits until the component is ready.
Instructions
Select an entry by visible text (value) or position (index) in a combo box, list, tab pane, table or tree. Table: value is the text of any cell of the row (limit it to a column with col); the cell is selected as by a click. Tree: value is a path like "Root/Child/Leaf" (the root may be left out; " > " also separates); ancestors are expanded on the way, as a user would. Several entries of a list, table or tree: values or indexes (ranges like "2-5"), or a range from value/index to another; they are selected with real clicks, the first plain, the others with Ctrl, a range's end with Shift. add=true keeps the current selection; deselect=true Ctrl-clicks the given entries that are selected. The result lists what is selected afterwards. 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": "select_option"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of a range that starts at value (text) or index (number) | |
| add | No | Keep the current selection and add to it (Ctrl) | |
| col | No | Table column to search in or select | |
| ref | Yes | ||
| index | No | Position; for tables the row, for trees the visible row | |
| value | 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 | |
| values | No | Several entries by text (table: a cell's text; tree: paths) | |
| indexes | No | Several positions and ranges, e.g. 0,2,5-8 (table rows, list items, visible tree rows) | |
| deselect | No | Remove the given entries from the selection (Ctrl-click the selected ones) | |
| timeoutMs | No | How long to wait for the component to become usable (default 10000) |