Skip to main content
Glama

Sap Set Checkbox

sap_set_checkbox

Sets a SAP checkbox to checked or unchecked by its label text, so agents can toggle form options during GUI automation. Use after retrieving form fields to identify available checkboxes.

Instructions

Set a SAP checkbox to checked or unchecked by its label text.

Use sap_get_form_fields first to see available checkboxes and their current state.

Args:

  • label: Checkbox label text (e.g., 'Workbench-Aufträge', 'Freigegeben')

  • checked: True to check, False to uncheck

Only label lookup is supported. If the label is ambiguous or not found: on the desktop backend use sap_com_evaluate or sap_run_script and set .selected = True/False on the element by id (both are desktop-only); on the WebGUI backend use browser_evaluate.

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>",
      "checked": "<checked>"
    },
    "name": "sap_set_checkbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYes
checkedYes
sessionNo
agent_idNo

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
labelNoLabel or selector used to find the field
popupNoPresent when a popup dialog is active on screen
valueNoValue that was set
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.
selector_usedNoCSS selector that matched the field
available_optionsNoFor dropdown fields: list of valid options when requested value was not found

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the whole burden. It usefully discloses backend divergence (desktop vs WebGUI fallbacks) and the default session behavior, but says nothing about whether toggling triggers SAP screen events, how state is confirmed, or what errors surface on a locked/disabled checkbox.

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, then an ordered workflow note, then an Args block. Nearly every line carries information; only minor markdown noise (backtick escaping around `.selected`) slightly blemishes it.

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?

Output schema exists so return values need no explanation, and the description covers the workflow prerequisite, the fallback strategy, and session targeting. The only real gap is agent_id, which is undocumented anywhere.

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 coverage is 0%, so the description must compensate. It documents label (with real SAP-label examples), checked (True/False semantics) and session (default s1, s2 override), which is solid, but agent_id goes entirely undocumented in both schema and description, leaving one of four parameters opaque.

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 ('Set a SAP checkbox... by its label text') and immediately constrains the lookup method ('Only label lookup is supported'), which is what separates it from id-based field setters. It doesn't name sibling checkbox/field tools directly, but the action and scope are unambiguous.

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

Usage Guidelines4/5

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

Explicitly tells the agent to call sap_get_form_fields first to inspect available checkboxes and their current state, and gives a concrete alternative path when the label is ambiguous or missing (sap_com_evaluate / sap_run_script on desktop, browser_evaluate on WebGUI). No 'do not use' cases, but the when-to-use context is clear.

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