Skip to main content
Glama
MCP SAP GUI Server

MCP SAP GUI Server

by kts982

Sap Press Button

sap_press_button

Presses a pushbutton or toolbar button on the current SAP screen and returns screen info so you can detect navigation or popups.

Instructions

Press (click) a pushbutton or toolbar button on the current SAP screen.

Returns screen info after the press so you can detect navigation or popups. Use sap_get_toolbar_buttons to discover toolbar button IDs. Use sap_get_screen_elements to find on-screen button IDs. When screen info has message_has_long_text, pressing 'wnd[0]/sbar' opens that long text (Diagnosis / Procedure), usually as a list popup: read it with sap_read_list(window_id='wnd[1]').

The Save button (tbar[0]/btn[11]) asks the user first, as F11 does, and is pressed only on the screen that was approved: confirmed_by_user: true when accepted, else status 'cancelled' with an error (nothing pressed). A popup button is checked like sap_handle_popup's press: a press that may save, or any answer but Cancel to a popup question the tool cannot read, asks the user first (confirmed_by_user: true when accepted).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "button_id": "<button_id>"
    },
    "name": "sap_press_button"
  }
}

Input Schema

NameRequiredDescriptionDefault
button_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false; the description adds real context beyond them: screen info is returned after the press so navigation/popups can be detected, and the Save button (tbar[0]/btn[11]) triggers a user-confirmation gate with confirmed_by_user: true on acceptance or status 'cancelled' plus an error and no press otherwise. That said, the same destructiveHint=false annotation sits oddly with a tool that can save data, and the description never reconciles the two or states permission/rate considerations.

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?

Front-loaded with the action and one-sentence return note, then progressively adds conditional detail; no filler sentences. The final paragraph is dense and hard to parse ("a press that may save, or any answer but Cancel to a popup question the tool cannot read, asks the user first"), which costs it a point on readability.

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, yet the description still tells the agent what the return is for (navigation/popup detection), and it covers the tricky cases: long-text popups, the Save confirmation flow, and unreadable popup questions defaulting to Cancel-or-confirm. For a one-parameter mutation tool this is complete.

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?

Schema coverage is 0% and the single button_id property carries no description, so the prose must compensate. It does: it names the two discovery tools that produce valid IDs and gives concrete ID formats ('wnd[0]/sbar', 'tbar[0]/btn[11]'), which is meaning well beyond the bare string schema.

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 specific verb and resource ("Press (click) a pushbutton or toolbar button on the current SAP screen") and scopes it to the current screen. It routes to the discovery siblings for IDs but never explicitly contrasts with sap_press_alv_toolbar_button or sap_select_radio_button, so an agent must infer that other press-like surfaces live elsewhere.

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 explicit routing: use sap_get_toolbar_buttons for toolbar IDs, sap_get_screen_elements for on-screen button IDs, sap_read_list with window_id='wnd[1]' to read long text, and it references sap_handle_popup's press semantics as the parallel behavior. The Save-button path is qualified with the exact screen condition and the confirmed_by_user outcome, leaving little to inference.

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