Skip to main content
Glama

Sap Session Bind

sap_session_bind

Claims exclusive ownership of a SAP session for the calling agent, failing if another agent holds it; use force only for crash recovery to take over the binding.

Instructions

Claim exclusive ownership of a SAP session for the calling agent. Strict by default (#643): if the session is already bound to a different agent, the call fails — pick a different session via sap_session_list, or retry with force=true to take over (use only for crash recovery, otherwise prefer leaving the existing binding intact). Re-binding the same agent is a no-op success.

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": {
      "session_id": "<session_id>",
      "agent_id": "<agent_id>"
    },
    "name": "sap_session_bind"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoTake over the binding even if another agent currently holds it. Default False — strict bind. Use True only for crash-recovery scenarios where you know the previous holder is gone.
agent_idYesAgent identifier claiming the session
session_idYesSession ID to bind (e.g., "s2")

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
successNoWhether the operation succeeded
agent_idNoAgent that now owns the session
session_idNoID of the session that was bound
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.
previous_agentNoPrevious agent binding, if any

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 behavioral burden and does well: it discloses failure-on-conflict semantics, the idempotent case ('re-binding the same agent is a no-op success'), and the takeover risk of force. It does not state what happens to the previous holder's state on a force takeover, nor any permission/auth requirements, leaving a small gap.

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 action in the first sentence, followed by the decision logic. The long parenthetical containing the escalation path is slightly dense and the '(#643)' issue reference adds little for an agent, but no sentence is expendable.

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?

For a 3-parameter mutation-style tool with an output schema, full param coverage, and no annotations, the description supplies the conflict handling, idempotency, and escalation policy an agent needs. Only the effect of force on the prior binding and any auth prerequisites are left unstated.

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 real meaning: it frames force as a takeover that overrides an existing binding (not merely a flag) and clarifies that the same agent_id plus session_id yields a no-op success rather than an error. That context is not in the schema's field descriptions.

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 ('Claim exclusive ownership of a SAP session') plus the scope ('for the calling agent'), which makes the exclusivity semantics clear immediately. It also distinguishes itself from sibling sap_session_list by naming it as the alternative for picking a different session.

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?

Gives an explicit decision tree: default is strict bind, on conflict call sap_session_list to pick another session, or retry with force=true. It also states when force should NOT be used ('use only for crash recovery, otherwise prefer leaving the existing binding intact'), which is exactly the when-not guidance most definitions omit.

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