Skip to main content
Glama

Start ABAP Debug Listener

sap_debug_attach

Prepare an ABAP debugging session by validating the user scope and creating a session handle, so you can later trap the user's execution under breakpoints.

Instructions

Open a debug session handle and confirm this server may listen for a user's execution.

BEHAVIOUR CHANGED (the old 'attach to a terminal/session id' had no counterpart in the ADT protocol — there is no debug-session resource). ADT debugging is listener-based: you arm a listener for a USER, and the first line that user executes under a breakpoint traps and freezes their work process. This call validates the scope and creates the handle; sap_debug_wait is what actually registers the listener and blocks.

Workflow:

  1. sap_debug_attach (this call — validates, returns session_id)

  2. sap_set_breakpoint (one or more)

  3. run the ABAP code AS THAT USER (SAP GUI, a transaction, an RFC…)

  4. sap_debug_wait (registers the listener, blocks until the code traps)

  5. sap_debug_variables / sap_debug_eval / sap_debug_step

  6. sap_debug_detach (ALWAYS — clears breakpoints, releases the debuggee, deletes the listener)

Args:

  • user (string): user to trap. Default SAP_USER. The old 'terminal_id' argument is gone; it named a target the protocol does not have.

  • mode ('user' | 'terminal'): debugging scope (default 'user').

  • take_over (boolean): take the scope over from another IDE (default false).

  • response_format.

Returns (json): { sessionId, state: 'LISTENING', user, mode, message }. sessionId (e.g. 'dbg-1') is a handle in THIS server, not a SAP object. It does not survive a server restart.

Error Handling:

  • Conflict (HTTP 409): another session holds the debugging scope — the message carries SAP's conflictText and the holding user. Re-run with take_over=true to seize it. A listener this server itself left behind (crashed run) is detected and cleared automatically.

  • One debug session at a time: detach the current one first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'user' (default): trap any execution by that user. 'terminal': trap only this terminal id — reference-only, not verified on this system.user
userNoABAP user whose execution should be trapped. Default: SAP_USER. Debugging another user freezes THEIR session — only do it with their knowledge.
take_overNoIf another IDE (e.g. Eclipse) holds the debugging scope, delete its listener and take over. Default false: report the conflict instead.
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

Annotations are minimal (readOnly=false, idempotent=false, destructive=false), so the description carries the disclosure burden — and delivers. It flags a protocol change ('the old attach to a terminal/session id had no counterpart in the ADT protocol'), explains the trap-and-freeze side effect on the user's work process, notes sessionId is a server-local handle that 'does not survive a server restart,' and documents 409 conflict behavior including automatic clearing of crashed listeners. Nothing contradicts the annotations; the destructive take_over path is explicitly disclosed.

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?

Well-structured with labeled sections (workflow, args, returns, error handling) and the core purpose front-loaded in the first sentence. The workflow and error-handling sections earn their length for a multi-step lifecycle tool, though the Args section partially duplicates a schema that already covers all parameters at 100%.

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?

With no output schema, the description documents the return shape explicitly — '{ sessionId, state: LISTENING, user, mode, message }' — and explains sessionId semantics. It covers both error paths (409 conflict with take_over recovery; single-session constraint), the mandatory detach step, and the prerequisite of running code as the target user before sap_debug_wait. Nothing essential is missing for a tool with this complexity.

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 coverage is 100% and the schema descriptions are already rich — mode's 'reference-only, not verified on this system' caveat and user's 'freezes THEIR session — only do it with their knowledge' warning are in the schema itself. The description's Args section mostly echoes this, adding only the historical context that 'terminal_id' is gone and restating defaults. Baseline 3 is correct because the schema does the heavy lifting.

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?

First sentence uses a specific verb and resource: 'Open a debug session handle and confirm this server may listen for a user's execution.' It explicitly differentiates from the nearest sibling — 'sap_debug_wait is what actually registers the listener and blocks' — and the numbered workflow positions this call as step 1 of a 6-step debug lifecycle. An agent can distinguish it from sap_debug_wait, sap_debug_detach, and the other debug-family tools without opening their schemas.

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?

Provides an explicit numbered workflow (attach → set breakpoint → execute as user → wait → inspect → detach) that states exactly when this call runs and in what order. It names the alternative explicitly, gives conditional guidance for conflicts ('Re-run with take_over=true to seize it'), and warns 'One debug session at a time: detach the current one first.' Usage context and exclusions are both explicit.

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