Sap Discover Buttons
sap_discover_buttonsDiscover clickable buttons on the current SAP screen with labels, selectors, shortcuts, and access keys, so agents can press the right control via WebGUI or Desktop.
Instructions
Discover clickable buttons on the current SAP screen. Returns buttons with label, selector/ID, shortcut (e.g. F3), and accesskey. Prefer keyboard shortcuts (sap_press_key) when available — they're faster and more reliable. To press a discovered button: use browser_click(selector) on WebGUI, or sap_com_evaluate(element_id, action='call', method='Press') on Desktop. For input fields use sap_discover_fields instead.
Session parameter:
session=None (default): Uses primary session ("s1")
session="s2": Targets specific session (for parallel agents)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sap_discover_buttons"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | Session ID (e.g., "s1", "s2"). None uses primary session. | |
| agent_id | No | Agent identifier for binding check. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| buttons | No | List of discovered buttons with selectors - use the 'selector' field for clicking | |
| success | No | Whether the operation succeeded | |
| button_count | Yes | Number of buttons found | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. |