Skip to main content
Glama
MCP SAP GUI Server

MCP SAP GUI Server

by kts982

Sap Handle Popup

sap_handle_popup

Inspect and respond to the active SAP GUI popup dialog by reading its content or confirming, canceling, pressing a button, or taking only a safe automatic action.

Instructions

Read and optionally act on the current popup/modal dialog.

Use when active_window shows wnd[1] or higher. Combines popup inspection and response in a single call.

Actions:

  • read: return popup content without acting (default)

  • confirm: press OK/Yes/Continue/Enter on the popup

  • cancel: press Cancel (or F12) on the popup; never No, which on a save prompt drops the changes

  • press: press a specific button by its text or tooltip

  • auto: take only a clearly safe action; otherwise return the popup read-only

A press that may save (a Save button, or Yes/OK on a popup about saving, e.g. "Save the changes first?") asks the user first, like F11 in sap_send_key. So does any answer but Cancel when the popup's question cannot be read (question_readable: false; SAP GUI's Edge browser control). On such a popup, confirm never falls back to Enter, and auto only reads. An accepted press reports confirmed_by_user: true.

Returns the popup contents plus classification, requested action, and post-action screen/popup state when something was pressed.

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_handle_popup"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNoread
button_textNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description adds substantially more: save-related presses require user confirmation, unreadable popups (question_readable: false) force read-only behavior and never fall back to Enter, and accepted presses report confirmed_by_user: true. These are real behavioral traits beyond the annotations, though the precise destruction risk of each button type is not fully spelled out.

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 lead sentence and the 'Use when' clause are front-loaded, and the bulleted action list scans well. The safety paragraph is dense and useful but long; a few clauses (e.g. the F11 cross-reference) could be tightened without losing meaning.

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?

An output schema exists, and the description still summarizes the return payload (popup contents, classification, requested action, post-action screen/popup state) which is legitimately helpful context. For a two-parameter, safety-sensitive tool, the guidance on confirmation, unreadable popups, and outcomes is complete.

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 coverage is 0%, so the description carries the full burden and does: every enum value of action is defined with concrete semantics (read/confirm/cancel/press/auto), and button_text is explained as 'press a specific button by its text or tooltip'. Without this text the two parameters would be largely opaque.

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 and resource ('Read and optionally act on the current popup/modal dialog') and explains it combines popup inspection and response in one call, which distinguishes it from siblings like sap_get_popup_window and sap_press_button. The enumeration of actions makes the scope unambiguous.

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?

Gives an explicit trigger ('Use when active_window shows wnd[1] or higher') and per-action guidance on when to pick each mode. It also states a clear prohibition ('never No, which on a save prompt drops the changes') and defines the auto fallback condition, which is when-to-use guidance at its most actionable.

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