learn_layout
Map {label: {role, name}} descriptors to live element handle IDs for the current session, then reuse those IDs in sequences to skip repeated find_elements calls.
Instructions
Resolve semantic names to live element handle IDs for the current session.
Pass a map of {label: {role, name}} and get back {label: handle_id}. Store the result and use the handle IDs in run_sequence to skip repeated find_elements calls. Re-call after app restarts or window recreation.
Example: learn_layout("1234", { "bold_button": {"role": "push button", "name": "Bold"}, "editor": {"role": "document", "name": ""}, })
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": {
"window_id": "<window_id>",
"descriptors": "<descriptors>"
},
"name": "learn_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window_id | Yes | ||
| descriptors | Yes |