Skip to main content
Glama

Sap Discover Buttons

sap_discover_buttons

Discover clickable buttons on the current SAP screen with labels, selectors, shortcuts, and access keys, so agents can press the right control via WebGUI or Desktop.

Instructions

Discover clickable buttons on the current SAP screen. Returns buttons with label, selector/ID, shortcut (e.g. F3), and accesskey. Prefer keyboard shortcuts (sap_press_key) when available — they're faster and more reliable. To press a discovered button: use browser_click(selector) on WebGUI, or sap_com_evaluate(element_id, action='call', method='Press') on Desktop. For input fields use sap_discover_fields instead.

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

Input Schema

NameRequiredDescriptionDefault
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
buttonsNoList of discovered buttons with selectors - use the 'selector' field for clicking
successNoWhether the operation succeeded
button_countYesNumber of buttons found
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.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden; it discloses the returned attributes and the platform-dependent action sequences that follow discovery. It does not state read-only status, limits, or behavior when nothing is found, which keeps it short of a 5 for an unannotated tool.

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 purpose and returns, then follow-up actions, then a compact session block. The session section duplicates schema text, which is small waste but does not obscure the main guidance.

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, yet the description still summarizes returned fields and closes the loop with the exact follow-up calls per platform. Minor gaps remain around session-type prerequisites (WebGUI vs Desktop availability) and what happens when no buttons are found.

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 100%, so the baseline applies. The session block largely restates the schema (session ID, None uses primary) with one added nuance, that session="s2" is for parallel agents; agent_id is not explained in the description at all.

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 ("Discover clickable buttons on the current SAP screen") and enumerates what is returned (label, selector/ID, shortcut, accesskey). It explicitly distinguishes itself from sap_discover_fields, which handles input fields, so an agent can separate the two without opening either schema.

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 concrete routing rules: prefer sap_press_key when a shortcut exists, use browser_click(selector) on WebGUI, sap_com_evaluate on Desktop, and sap_discover_fields for input fields. Both the preferred alternative and the per-platform follow-up paths are named, 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.