Skip to main content
Glama

Sap Breakpoint Set

sap_breakpoint_set
Destructive

Sets an external ABAP breakpoint at a specified line or source match for SAP GUI debugging; requires explicit human approval because the session halts in the ABAP debugger.

Instructions

HIGHLY DANGEROUS — DO NOT CALL unless a human user has explicitly asked for a breakpoint to be set. Live-verified (issue #791): once the breakpoint fires, the SAP session stops and SAP GUI opens the ABAP debugger. The call that triggered it and every later call on that session fail after a few seconds with an error naming the debugger, as can slow calls on other sessions of the same SAP connection; sessions of other connections are not affected. The session works again once a human continues or exits the debugger in SAP GUI.

Set an external ABAP breakpoint on a specific line of a program, class method, or function module. Desktop backend only — WebGUI does not support external breakpoints.

Provide either line_number (1-indexed SAP display line) or match_pattern (substring or regex matched against source lines).

SAP toggles breakpoints: if the line already has a breakpoint, VKey 45 deletes it. This tool only sets the breakpoint — it does not run anything.

IMPORTANT — before calling this tool, ask the human operator for explicit permission and explain the consequences: there is NO tool to step, continue, or read variables in the resulting debugger. If the breakpoint later fires during a GUI run, SAP GUI opens a modal interactive ABAP debugger that only a human can drive — the agent cannot see or control it, and it may fire once per row/iteration if the code path repeats. The halted session is unusable for the agent until then, as described above. Only proceed once the human has confirmed they intend to sit at the SAP GUI and step through the debugger themselves; do not use this to silently 'verify a code path is reached' from an unattended flow.

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": {
      "object_type": "<object_type>",
      "object_name": "<object_name>"
    },
    "name": "sap_breakpoint_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionNoSession ID (e.g., "s1"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
line_numberNo1-indexed SAP display line. Mutually exclusive with match_pattern.
method_nameNoRequired for CLAS (method name) and FUGR (function module name).
object_nameYesProgram name, class name, or function group name.
object_typeYes"PROG" for programs, "CLAS" for classes, "FUGR" for function groups.
match_patternNoSubstring or regex matched against source. Mutually exclusive with line_number.

Output Schema

NameRequiredDescriptionDefault
errorNoError message if success=False
popupNoPresent when a popup dialog is active on screen
actionNoWhat actually happenedset
successNoWhether the operation succeeded
line_numberNoResolved 1-indexed line number
method_nameNoMethod or function module name (None for PROG)
object_nameYesProgram name, class name, or function group name
object_typeYesObject type: PROG, CLAS, or FUGR
active_windowNoWhich window was operated on (e.g., 'wnd[0]', 'wnd[1]'). If 'wnd[1]' or higher, a modal dialog is open.
status_messageNoRaw SAP status bar message
confirmation_skippedNoTrue if the breakpoint was armed without a real human confirmation (the connected MCP client doesn't support elicitation, or asking failed) — fail-open. False means a human explicitly confirmed via the client's confirmation dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description goes well beyond that: it discloses that the session halts, that the triggering call and later calls fail with a debugger-naming error, that other sessions on the same connection may be affected, and that recovery requires a human to continue or exit the debugger. The toggle behavior (VKey 45 deletes an existing breakpoint) is also disclosed, which is essential given idempotentHint=false. The only small gap is that the effect on the calling tool's own return value is not described, though an output schema exists.

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 danger warning is correctly front-loaded in the first sentence, and the length is largely justified for a tool that can hang a session. However, the session-halt consequences are explained twice — once in the opening and again in the IMPORTANT block ("as described above") — which is avoidable repetition in an already long description.

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 complex, dangerous, 7-parameter mutation tool, the description covers permissions, backend limits, side effects, blast radius, and recovery path, and it need not explain return values because an output schema exists. Nothing an agent needs before calling is missing.

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 the schema already documents session, agent_id, line_number, method_name, object_name, object_type, and match_pattern, including the line_number/match_pattern mutual exclusivity. The description restates those constraints and adds only the "1-indexed SAP display line" clarification, which is already in the schema text. Baseline 3 is appropriate for a fully documented 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?

"Set an external ABAP breakpoint on a specific line of a program, class method, or function module" gives a specific verb, resource, and granularity, and the closing note "This tool only sets the breakpoint — it does not run anything" bounds the scope against adjacent operations. An agent can distinguish this from the breakpoint delete/list siblings without opening any schema.

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?

The description states an explicit precondition ("DO NOT CALL unless a human user has explicitly asked"), a platform restriction (desktop backend only, WebGUI unsupported), and an anti-pattern ("do not use this to silently 'verify a code path is reached' from an unattended flow"). It is unusually explicit about when-not-to-use, which is the hardest part of guidance for a destructive tool.

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