Skip to main content
Glama
kts982

MCP SAP GUI Server

by kts982

sap_get_screen_elements

Read-only

Discover all UI elements on the current SAP screen to locate field IDs and navigate containers. Filter by type or changeability and set recursion depth to explore complex layouts.

Instructions

Discover all elements on the current SAP screen.

Useful for finding field IDs when working with a new screen.

Use type_filter and changeable_only to reduce response size on complex screens (e.g. type_filter="GuiTextField,GuiCTextField" to find only input fields).

max_depth controls how deep to recurse into containers (default 2). Use max_depth=1 for a quick overview, max_depth=3+ for deeply nested layouts (splitter containers, tab strips with sub-containers).

Pass container_id='wnd[0]/mbar' to discover the menu bar structure.

A table control (SM30-style) is ONE element here, not one per cell: use sap_read_table(columns_only=true) for its columns and cell_id templates. expand_tables=true lists every visible cell (large).

Docking containers sit BESIDE the user area, not inside it: the dialog-structure tree of a view cluster (SM34, most IMG activities) and the SE80 tree are under 'wnd[0]/shellcont'. When the window has any, the response lists them as docking_containers; discover them with that id, or pass container_id='wnd[0]' (max_depth=1) for all top-level areas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
type_filterNo
container_idNownd[0]/usr
expand_tablesNo
changeable_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / expand_tables
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observedv0.2.0

TDQS

A5/5.0
Behavior5/5

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

The description discloses meaningful behavior beyond the readOnly/destructive annotations: default max_depth of 2, recursion behavior, docking containers being listed separately in the response, table controls collapsing to one element, and expand_tables causing large output. It also warns about response size on complex screens, which helps an agent anticipate outcomes before calling.

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

Conciseness5/5

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

The description is long, but every sentence adds operational value. It front-loads the core purpose and usefulness, then systematically covers each parameter and edge case, with examples inline. Nothing is filler; the length is proportionate to the tool's complexity and the absence of schema-level parameter descriptions.

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?

The description is complete for an agent to select and invoke this tool correctly. It covers purpose, when-to-use, alternatives, parameter semantics, special screen regions, table-control behavior, and response-size considerations. An output schema exists, so not detailing the return shape is acceptable, and the description still mentions key response concepts like 'docking_containers'.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the full burden for all five parameters, and it does. It explains max_depth with concrete values, type_filter with a real example ('GuiTextField,GuiCTextField'), container_id with default and special targets, expand_tables with the 'lists every visible cell (large)' caveat, and changeable_only as a response-reduction switch.

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 opens with 'Discover all elements on the current SAP screen,' which is a specific verb-resource pairing, then explains its main use case: 'finding field IDs when working with a new screen.' It also distinguishes itself from sibling tools like sap_read_table by explaining that a table control is 'ONE element here, not one per cell.'

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

Usage Guidelines5/5

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

Usage guidance is explicit and comprehensive. It tells agents when to use the tool, when to use alternatives ('use sap_read_table(columns_only=true) for its columns and cell_id templates'), and how to adapt calls to the situation: type_filter for input fields, max_depth=1 for overview, max_depth=3+ for nested layouts, and container_id='wnd[0]/mbar' for menu bars. No conditions are left to inference.

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