Skip to main content
Glama

ABAP Debug Variable

abap_debug_variable
Read-onlyIdempotent

Read current values of named ABAP variables in a stopped debug session, returning each as NAME (type) = value so you can inspect runtime state at a breakpoint.

Instructions

Read the current values of named variables in the stopped debuggee, one line each as NAME (type) = value. Use abap_debug_stack first to see which frame you are in, and abap_debug_set_variable to change a value. Read-only; needs an active session stopped at a breakpoint (abap_debug_session with action listen).

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": {
      "variables": "<variables>"
    },
    "name": "abap_debug_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
variablesYesVariable names as written in the source, visible in the current frame (e.g. ['LV_COUNT', 'WA_MARA', 'IT_TABLE'])
connectionIdNoSAP system connection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.2
    • changedInput schema / properties / variables / description
      Previous value: -"Variable names to inspect (e.g. ['LV_COUNT', 'WA_MARA', 'IT_TABLE'])"New value: +"Variable names as written in the source, visible in the current frame (e.g. ['LV_COUNT', 'WA_MARA', 'IT_TABLE'])"
  2. First observedv1.16.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description reinforces read-only plus the required session state, adding real context beyond the structured fields. It stops short of describing failure behavior, e.g. what happens when a requested name is not visible in the current frame.

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?

Two sentences, front-loaded with the core action and output shape, then prerequisites and alternatives. No filler or restated title text.

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?

With no output schema, the description usefully specifies the return line format and the session prerequisite, which is enough to invoke it correctly. Minor gap: no mention of partial results or errors for unresolved variable names.

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%, so the schema already documents both 'variables' and 'connectionId' with examples. The description adds only that values are read for the named variables, which is implied by the parameter itself, so baseline 3 applies.

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 (read current values of named variables) and scopes it to the stopped debuggee, with the output rendering ('NAME (type) = value') made explicit. It is clearly distinguishable from abap_debug_set_variable and abap_debug_stack, which it names.

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?

Names alternatives and the condition that selects them: abap_debug_stack to see the current frame, abap_debug_set_variable for mutation. It also states the prerequisite state explicitly ('active session stopped at a breakpoint (abap_debug_session with action listen)').

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