Sap Get Screen Info
sap_get_screen_infoRetrieve current SAP screen details—transaction, program, screen number, window title, status message, and active window—to identify what the user sees and detect popups.
Instructions
Get current SAP screen info: transaction, program, screen number, window title, and status bar message (success/error/warning text).
Reads from session.ActiveWindow so the response always reflects
what the user sees. The active_window field tells you which
window is in focus (e.g. wnd[0] for the main screen, wnd[1]
for a popup). The title comes from the active window.
Every action tool (press_button, send_key, select_menu, etc.) returns this same screen info, so you always know when a popup appears. Use sap_get_popup_window for full popup content (texts, buttons).
Present only when true: message_has_long_text (sap_press_button on 'wnd[0]/sbar' opens it) and message_as_popup (the message also sits in a popup that must be closed first).
Present only when set: subscreens, the sub-screens on the active window as "program:dynnr", outer first (program / screen_number name only the main screen, so an RF step, a tab page or a detail area that changes shows only here), and cursor, the ID of the field the cursor is in. A screen redisplayed without a message, e.g. for an empty required field, still moves the cursor to that field.
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_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||