Skip to main content
Glama

Sap Get Screen Text

sap_get_screen_text

Extract 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

NameRequiredDescriptionDefault
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
include_dropdown_optionsNoIf True, opens each dropdown to capture available options. This is slower but provides complete information for dropdowns. Default is False.

Output Schema

NameRequiredDescriptionDefault
tabsNoTab labels if present
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
titleYesScreen title
labelsNoField labels (deduplicated)
buttonsNoButton labels (deduplicated)
successNoWhether the operation succeeded
dropdownsNoDropdown fields with available options. Only populated when include_dropdown_options=True
status_barNoCurrent status bar message
main_contentNoOther visible text content
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.
table_headersNoTable column headers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does disclose a real side effect: enabling include_dropdown_options opens each dropdown on the live screen, making the call slower and altering UI state. It also explains session targeting for parallel agents, though it never states outright that the tool is a non-destructive read.

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?

Two sentences front-load the core action before the optional flag, and the session bullet is compact. The session bullets largely duplicate the schema's own parameter descriptions, so they earn only partial place.

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?

An output schema exists, so return values need no explanation, and all three parameters are covered between schema and description. What remains absent is the read-only safety profile and any precondition (e.g., an active logged-in session), which a tool with zero annotations would ideally state.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents session, agent_id, and include_dropdown_options with defaults. The description restates the session default and the dropdown trade-off, adding only the 'parallel agents' motivation, which is marginal value beyond the schema and says nothing about agent_id.

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

Purpose4/5

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

States a concrete verb and resource: retrieve all readable text from the current SAP screen, and calls out the dropdown-options extension. It is clearly distinct from action-oriented siblings like sap_click_button or sap_fill_form, but it never names or contrasts with the closer siblings sap_get_screen_info and sap_get_form_fields.

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

Usage Guidelines3/5

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

Offers useful guidance on when to set include_dropdown_options=True (complete dropdown information at the cost of speed) and explains the session selection scheme. It gives no when-not guidance and does not route the agent toward or away from alternatives such as sap_get_form_fields or sap_get_screen_info when those would be the better choice.

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