Skip to main content
Glama

Sap Set Field

sap_set_field

Set a single SAP form field by visible label, CSS selector, or element name and fill it with a specified value, without filling an entire form.

Instructions

Set a single SAP form field by label, CSS selector, or element name. Finds the field dynamically and fills it with the given value.

The label parameter can be:

  • Visible label text (e.g., 'Last Name', 'Nachname') — works on both backends

  • CSS selector (WebGUI, e.g., '#M0:46:1:1::0:21')

  • SAP GUI element name (Desktop, e.g., 'BUT000-NAME_LAST')

This is simpler than sap_fill_form for single fields.

Session parameter:

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

  • session="s2": Targets specific session (for parallel agents)

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>",
      "value": "<value>"
    },
    "name": "sap_set_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesField label text (e.g., 'Last Name'), CSS selector on WebGUI (e.g., '#M0:46:1:1::0:21'), or SAP GUI element name on Desktop (e.g., 'BUT000-NAME_LAST')
valueYesValue to set in the field (for dropdowns: exact option text)
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
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.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses that the field is located dynamically and lists backend-specific identifier formats (WebGUI selector vs Desktop element name), which is genuine behavioral context, but says nothing about failure when a label is ambiguous or missing, whether existing values are overwritten, or whether events/validations fire.

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 sentence, then tight bullets per identifier type and session, so it is easy to scan. Minor redundancy with the input schema's label description and the trailing session section repeats the schema default.

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?

Covers the three backends, the identifier formats, and session routing, and an output schema exists so return values need not be explained. What remains missing is error behavior for ambiguous or unmatched labels, which matters for a mutation tool with no annotations.

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 100% and the schema already documents label, value, session, and agent_id, so the description is largely restating it. It adds a small amount: 'Nachname' as a localized-label example and the note that session targeting exists for parallel agents, which the schema does not explain.

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 ('Set a single SAP form field') plus the accepted identifier kinds, and explicitly contrasts with the sibling sap_fill_form for multi-field work. An agent can distinguish it from sap_fill_form and sap_set_checkbox without opening schemas.

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?

Gives clear context: use this rather than sap_fill_form when touching a single field, and names the session parameter's purpose for parallel agents. It stops short of explicit exclusions (e.g., don't use for dropdowns or checkboxes, which have dedicated siblings).

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