Sap Session List
sap_session_listList active SAP sessions with IDs, transaction, screen title, client, user, and system so you can choose the correct session before targeting it.
Instructions
List all active SAP sessions.
Returns session IDs, current transaction, screen title, client, user, and system_name for each. Use this to see what sessions exist before targeting one.
The first sap_login() registers "s1". Additional sessions come from:
repeated sap_login() calls (parallel multi-mandant — each new login adds a session alongside the existing ones, not replacing them — see #671)
sap_transaction(tcode, new_window=True) (a /o sub-session of an existing connection, sharing its login)
Desktop: when another call has been running on the connection's single COM
engine for a while, the result carries a com_engine block saying which
connection is busy and since when. That running call is why other tool calls
on the same connection hang — wait for it instead of retrying.
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_session_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if success=False | |
| popup | No | Present when a popup dialog is active on screen | |
| success | No | Whether the operation succeeded | |
| sessions | No | All active SAP sessions with their current state | |
| com_engine | No | Desktop only: state of the connection's single COM scripting engine (issue #905). Present when the engine has been running a call for a while — that call blocks every other tool call on the same connection until it finishes. | |
| active_window | No | Which window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open. |