Skip to main content
Glama
kts982

MCP SAP GUI Server

by kts982

sap_get_screen_info

Read-only

Retrieve the current SAP GUI screen details, including transaction, program, screen number, active window, and status bar message, to confirm what the user sees and detect popups after actions.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and non-destructive, so the bar is lower. The description adds real value beyond that: it explains the source (session.ActiveWindow), the meaning of the active_window field, and which fields are conditionally present (message_has_long_text, message_as_popup, subscreens, cursor) and why. It also notes the subtle behavior that a redisplayed screen still moves the cursor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well structured with a summary line, then source/behavior in paragraphs, then conditional fields. It is somewhat long and could be tightened, but almost every sentence carries information about field presence conditions that would otherwise be unknown.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema, so return values need not be enumerated fully, but the description still explains non-obvious semantics like conditional fields and cursor movement. With zero params and annotations covering safety, the description is nearly complete and adds behavioral context the schema cannot.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so baseline is 4. There is nothing to document beyond the response, and the description correctly focuses on return values rather than params.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Get) and resource (current SAP screen info) and enumerates exactly what is returned: transaction, program, screen number, window title, status bar message. An agent can distinguish this from siblings like sap_get_session_info or sap_get_screen_elements immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes to the alternative sap_get_popup_window for full popup content, and explains that every action tool returns this same screen info so callers know when popups appear. No explicit 'when not to use' for other read tools, but context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.