Skip to main content
Glama

Wait for an ABAP Debuggee

sap_debug_wait

Block until a watched user's code traps on a breakpoint, then attach to the frozen session and get the stop position and call stack for inspection.

Instructions

Register the debug listener and block until the watched user's code traps on a breakpoint — then attach to it and return the stop position and call stack.

BEHAVIOUR CHANGED: this is now a real server-side long-poll (POST /sap/bc/adt/debugger/listeners), not a state-polling loop, and it performs the attach itself. Registration is a side effect of this call: once made, the listener stays armed on SAP across timeouts until sap_debug_detach deletes it.

Args:

  • session_id (string): from sap_debug_attach.

  • timeout_ms (int): client-side cap (default 60000, max 300000).

  • poll_interval_ms (int): ignored, kept for compatibility.

  • response_format.

Returns (json): { sessionId, state, program?, include?, line?, stack, debuggee?, reachedBreakpoints?, message }.

  • state='STOPPED': a debuggee is attached and FROZEN. Inspect with sap_debug_variables, move with sap_debug_step, and release promptly — this is a real user session halted mid-execution, and SAP kills an abandoned debuggee after its own timeout.

  • state='TIMEOUT': nothing trapped in time; the listener is still armed, so call again (after making sure the code actually runs as that user).

  • state='CANCELLED': the listener was deleted elsewhere — call sap_debug_attach again.

Error Handling:

  • Conflict: another IDE took the scope over mid-wait; the message carries SAP's conflictText.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID returned by sap_debug_attach.
timeout_msNoHow long to block waiting for a trap (default 60s, max 300s). On timeout the listener stays armed — just call again.
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
poll_interval_msNoAccepted for compatibility and ignored: this is a single server-side long-poll, not a polling loop.
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the sparse annotations, the description candidly discloses side effects and hazards: registration persists as a side effect, the listener remains armed on SAP across timeouts until sap_debug_detach deletes it, the call performs the attach itself, and a STOPPED debuggee is a real frozen user session that SAP may kill. It also documents the server-side long-poll behavior and conflict error. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is organized with a crisp opening, a behavior-change note, structured Args and Returns sections, state-by-state guidance, and an error-handling note. Every block adds operational value; the length is justified by the tool's stateful, side-effecting behavior.

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 stateful long-poll with no output schema, the description covers return fields, all three states, cleanup via sap_debug_detach, and conflict handling. The only notable gap is that it says 'Returns (json)' while response_format defaults to markdown in the schema, leaving how the markdown output is shaped slightly unclear.

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; the description adds meaning by explaining session_id origin, timeout as a client-side cap with post-timeout behavior, and poll_interval_ms as ignored compatibility. It does not repeat in depth what response_format does, but that is already fully covered by 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?

The description leads with a specific verb and resource: 'Register the debug listener and block until the watched user's code traps on a breakpoint — then attach to it and return the stop position and call stack.' It clearly differentiates this from other debugger tools by describing a blocking long-poll and its attach/return behavior, and it names sap_debug_detach as the complementary cleanup call.

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

Usage Guidelines4/5

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

The description provides clear operational context: block until a breakpoint traps, handle TIMEOUT by calling again, handle CANCELLED by re-attaching, and release STOPPED debuggees promptly. It does not explicitly distinguish when to use this wait tool versus alternatives such as sap_debug_state, but the context is sufficient for most selections.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appmaster3000/sap-abap-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server