get_selected_item
Retrieve the first selected item from a UI container like ListBox or TreeView. Returns an element ID for further automation.
Instructions
Get the first selected item in a container (e.g. ListBox, TreeView) via the UIA Selection pattern. Returns an element ID.
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": {
"elementId": "<elementId>"
},
"name": "get_selected_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | Element ID returned by find_element |