Skip to main content
Glama
MCP SAP GUI Server

MCP SAP GUI Server

by kts982

Sap Get Screen Info

sap_get_screen_info
Read-only

Retrieve 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

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the read-only annotations, the description explains that it reads from session.ActiveWindow, reflects what the user sees, and identifies the focused window via active_window. It also discloses conditional fields such as message_has_long_text, message_as_popup, subscreens, and cursor behavior, which are important behavioral details an agent would not infer from annotations alone.

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?

The first sentence is front-loaded and the paragraphs are organized by topic: active-window source, action-tool equivalence, conditional fields, and subscreen/cursor nuance. A few sentences, such as the title explanation, are slightly redundant, but the overall structure is efficient for the complexity of SAP screen state.

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

Completeness5/5

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

Given the output schema and read-only annotations, the description provides ample context about what the tool reflects, how focus is represented, and which fields appear conditionally. Nothing material is missing for an agent to call this correctly.

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?

The tool has zero parameters, so there is no parameter semantics to clarify; the baseline for zero-parameter tools is 4. The description instead spends its space on returned screen-state semantics, which is appropriate.

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?

The description states a specific read operation and enumerates the exact screen fields returned (transaction, program, screen number, title, status bar message). It also distinguishes itself from action tools that return the same screen info and from sap_get_popup_window, which provides full popup content.

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?

It clearly frames this as the way to inspect current screen state and explicitly routes the agent to sap_get_popup_window for full popup content. It also notes that every action tool returns the same screen info, which helps an agent decide when a standalone call is needed, though it does not spell out a strict when/when-not rule.

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