Skip to main content
Glama

Sap Fill Form

sap_fill_form

Fill multiple SAP form fields in one call on the same screen, skipping missing fields unless strict mode is enabled. Use for batch data entry without navigation between fields.

Instructions

Fill multiple SAP form fields in a single call. Use this when filling 2+ fields on the SAME screen without UI navigation between them.

Keys can be:

  • Visible label text (e.g., 'First Name', 'Straße') — works on both backends

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

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

When to use:

  • Filling a form with multiple input fields

  • All fields visible on current screen

  • No button clicks or navigation needed between fields

When NOT to use:

  • Single field only (use sap_set_field)

  • Fields on different screens/tabs

  • Need to click buttons between fills

Session parameter:

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

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

Example payload: {"fields": {"Vorname": "Mario", "Nachname": "Rossi"}, "strict": false}

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": {
      "fields": "<fields>"
    },
    "name": "sap_fill_form"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsYesDictionary mapping field identifiers to values. Keys can be visible label text (e.g., 'First Name'), CSS selectors on WebGUI (e.g., '#M0:46:1:1::0:21'), or SAP GUI element names on Desktop (e.g., 'BUT000-NAME_LAST').
strictNoIf True, fail if any field is not found. If False, skip missing fields and report them.
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
errorsNoFields that errored during fill
filledNoFields successfully filled
successNoWhether the operation succeeded
not_foundNoFields not found on page
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.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key behavioral trait that a partial failure is possible: strict=true fails if any field is missing, strict=false skips and reports missing fields. It also explains session routing and the parallel-agent case. It stops short of stating prerequisites (an active logged-in session/connection) or that filling fields may trigger SAP field-validation/round trips.

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 core verb and scope, then organized into key formats, when/when-not, session, and an example. The bullets earn their place, though the session and agent-binding prose is slightly verbose relative to the four parameters.

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 not be described, and the description covers invocation scope, key formats, failure mode, and session selection. The remaining gap is operational context — connection/login prerequisites and any side effects of filling fields — which is minor for this tool's complexity.

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 100%, so baseline is 3, but the description adds a worked payload showing fields and strict used together, spells out the three accepted key formats per backend, and explains the s1/s2 session targeting for parallel agents — meaning beyond the schema's field-level notes.

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 ('Fill multiple SAP form fields in a single call') and immediately scopes it to 2+ fields on the same screen, which distinguishes it from sap_set_field without the agent needing to open 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?

Provides an explicit 'When to use' / 'When NOT to use' pairing, names the single-field alternative sap_set_field, and excludes cross-screen or button-interleaved cases. Routing decisions are fully determined by the text.

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