Sap Get Screen Text
sap_get_screen_textExtract all readable text from the current SAP screen to support UI parsing, validation, and automation; optionally capture dropdown options for complete field context.
Instructions
Get all readable text from the current SAP screen. Use include_dropdown_options=True to also fetch available options for dropdown fields.
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_get_screen_text"
}
}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. | |
| include_dropdown_options | No | If True, opens each dropdown to capture available options. This is slower but provides complete information for dropdowns. Default is False. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabs | No | Tab labels if present | |
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| title | Yes | Screen title | |
| labels | No | Field labels (deduplicated) | |
| buttons | No | Button labels (deduplicated) | |
| success | No | Whether the operation succeeded | |
| dropdowns | No | Dropdown fields with available options. Only populated when include_dropdown_options=True | |
| status_bar | No | Current status bar message | |
| main_content | No | Other visible text content | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. | |
| table_headers | No | Table column headers |