Skip to main content
Glama

Sap Click Button

sap_click_button

Clicks a button by its label on the current SAP screen, providing a fallback action when no keyboard shortcut is available.

Instructions

Click a button on the current SAP screen by its label text.

Use sap_discover_buttons first to see available buttons. Prefer sap_press_key with keyboard shortcuts (F-keys, Ctrl+*) when available — they are faster and more reliable. Use this tool when no shortcut exists.

Args:

  • label: Button label text (e.g., 'Execute', 'Save', 'Ausführen')

Session parameter:

  • session=None (default): Uses primary session ("s1")

  • session="s2": Targets specific session

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": {
      "label": "<label>"
    },
    "name": "sap_click_button"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYes
sessionNo
agent_idNo

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
labelYesButton label that was clicked
popupNoPresent when a popup dialog is active on screen
successNoWhether the operation succeeded
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=false, so the agent knows this mutates UI state. The description adds useful session-targeting behavior (default "s1" vs explicit "s2"), but says nothing about what happens when the label is missing, ambiguous, or duplicated on screen.

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 the routing advice, then a clearly delimited Args block. Slightly redundant to restate the session default twice (inline and in the bullet list), but no filler sentences.

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 the description covers discovery, alternatives, and multi-session targeting for a three-parameter mutating tool. The gap is failure semantics on ambiguous or missing labels and the undocumented `agent_id`.

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 description coverage is 0%, so the description carries the load: it explains `label` with concrete examples ('Execute', 'Save', 'Ausführen') and fully explains `session` defaults. However, the third parameter `agent_id` is never mentioned, so compensation is incomplete.

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 ("Click a button on the current SAP screen") plus the scoping mechanism ("by its label text"), which separates it from label-agnostic siblings like sap_press_key and sap_click_table_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?

Gives an explicit precondition ("Use sap_discover_buttons first"), an explicit alternative ("Prefer sap_press_key with keyboard shortcuts ... they are faster and more reliable"), and the exact condition that selects this tool ("when no shortcut exists").

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