Skip to main content
Glama

Sap Get Form Fields

sap_get_form_fields

Discover fillable fields on the active SAP screen or popup, including field IDs, labels, types, and current values. Enable dropdown option fetching to map choices for form automation.

Instructions

Discover fillable form fields on the current SAP screen (or active popup dialog). Returns field IDs, labels, types (text/dropdown/checkbox/radio), and current values. Automatically targets the active window — if a popup is open, shows popup fields. Use include_dropdown_options=True to also fetch available options for dropdown fields.

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

Input Schema

NameRequiredDescriptionDefault
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
include_dropdown_optionsNoIf True, opens each dropdown to capture available options. This is slower but provides complete information for dropdowns. Default is False (lazy fetching).

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
fieldsNoFillable fields discovered on the current 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/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 non-obvious behavior: it auto-targets the active window/popup, dropdown option capture opens each dropdown (a UI side effect) and is slower, and the default is lazy fetching. It omits what happens when no form exists on screen and any connection/session prerequisites, which keeps it short of a 5.

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 operation and return shape, then a clearly delimited session section. The session bullet largely restates the schema description, a minor redundancy, but nothing else is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 explained, and parameters are well covered, but with zero annotations the description should also state that this is a non-mutating discovery call and what happens on screens without forms. Those gaps keep it merely adequate for a stateful UI-automation tool.

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 the baseline is 3, but the description adds real meaning: session=None maps to primary session 's1' and s2 is framed as the parallel-agent case, and include_dropdown_options is explained as a speed/completeness trade-off rather than just a boolean. Only agent_id is left entirely to the schema.

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 fillable form fields') plus the exact scope ('current SAP screen or active popup dialog'), and enumerates the return payload (IDs, labels, types, current values). An agent can distinguish this read/discovery tool from sap_fill_form or sap_get_screen_text from the description alone.

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

Usage Guidelines3/5

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

Usage guidance is limited to one parameter-level hint ('Use include_dropdown_options=True to also fetch available options') and the implicit popup-targeting rule. It never says when to prefer this over siblings like sap_discover_fields or sap_lookup_fields, or that it should be called before sap_fill_form, leaving the when-to-use decision partly to inference.

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