Skip to main content
Glama

Sap Login

sap_login

Start a new SAP GUI or WebGUI session and return a session ID for addressing that login in subsequent tool calls.

Instructions

Log into SAP. On WebGUI: requires Chrome with --remote-debugging-port=9222 and VPN (if internal SAP). On Desktop: opens a NEW parallel session each call — re-login does NOT replace prior logins. You can be logged into the same SAP Logon entry as multiple distinct (client, user) tuples concurrently. The returned LoginResult.session_id is the registry ID ('s1', 's2', ...) you pass on subsequent tool calls to address THIS specific login. Concurrency note: sessions on one connection share one single-threaded COM engine; parallel scripting loops on that connection run sequentially (no speedup). For bulk work on one connection, prefer one large loop in a single script. Parallelism helps only across separate connections/systems. Use sap_session_list to see all currently active sessions. Credentials are read from ~/.config/sap-mcp/systems.json. Use system_key (dictionary key from systems.json) to select a non-default system. Call sap_list_connections first to see available system keys.

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

Input Schema

NameRequiredDescriptionDefault
urlNoSAP Web GUI URL (WebGUI only). If not provided, derived from system host.
clientNoSAP client/mandant (3-digit string, e.g. '200'). Overrides config value.
system_keyNoDictionary key from systems.json (e.g. "dev", "qa"). Use sap_list_connections to see available keys. Defaults to default_system.

Output Schema

NameRequiredDescriptionDefault
urlNoSAP URL that was accessed
userNoLogged in username
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
successNoWhether the operation succeeded
guidanceNoRecommended next action after login (e.g., call sap_get_capabilities)
session_idNoRegistry session ID assigned to the new login (e.g. 's1', 's2'). Pass this as the 'session' / 'session_id' parameter on subsequent tool calls to address this specific login when multiple parallel sessions are active. Desktop backend only — webgui currently runs a single session.
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.
already_logged_inNoWas already logged in

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses that each call opens a NEW parallel session with no replacement of prior logins, that multiple (client, user) tuples can coexist on one SAP Logon entry, that the returned session_id is a registry ID ('s1', 's2') required on later calls, and that sessions on one connection share a single-threaded COM engine with no parallel speedup. It also names credential location (~/.config/sap-mcp/systems.json) and environment prerequisites.

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?

The content is front-loaded and dense with operational facts; almost no sentence is filler, since each covers mode requirements, session identity, concurrency, or credential/config location. It is long and the session_id concept is restated slightly ('the registry ID ... you pass on subsequent tool calls to address THIS specific login'), which keeps it just short of a 5.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-mode, stateful login tool this is thorough: required environment setup, config/credential sourcing, session identity semantics, concurrency limits, and discovery prerequisites are all present. Since an output schema exists, the description correctly does not spend words on the LoginResult shape beyond noting the session_id field's meaning.

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 all three parameters are already documented, including that url is WebGUI-only and system_key is a systems.json dictionary key. The description adds only marginal semantics beyond that: that credentials are read from ~/.config/sap-mcp/systems.json and that system_key selects a non-default system. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The opening verb+resource ('Log into SAP') is specific and the description immediately branches into the two distinct modes (WebGUI vs Desktop), so an agent knows exactly what the tool establishes. It doesn't sharply contrast against every sibling, but it does position itself implicitly as the prerequisite step before session-scoped calls that take session_id.

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?

It gives explicit prerequisites ('Call sap_list_connections first to see available system keys', Chrome with --remote-debugging-port=9222, VPN for internal SAP), names alternatives for adjacent needs (sap_session_list to see active sessions), and adds a when-NOT rule ('for bulk work on one connection, prefer one large loop in a single script' because the COM engine is single-threaded). An agent has everything needed to decide whether and how to call this.

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