Skip to main content
Glama

List ABAP Debug Variables

sap_debug_variables
Read-onlyIdempotent

Read ABAP variable values at the current debugger stop point using a session ID and optional variable names. Returns types, values, and truncation info for locals, structures, tables, and references.

Instructions

Read ABAP variable values at the current stop point.

Requires state='STOPPED' (a debuggee attached by sap_debug_wait).

Args:

  • session_id (string).

  • names (string[]): specific variables; omit for all locals (the '@ROOT' hierarchy).

  • response_format.

Returns (json): { sessionId, count, variables: [{name, id?, type?, value?, kind?, tableLines?}] }. kind: 'elementary' | 'structure' | 'table' | 'reference'. Values SAP truncated are marked as truncated; tables report tableLines.

Error Handling:

  • 'No debuggee attached' -> the session is not STOPPED; run the code and call sap_debug_wait first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesNoVariable names/ids to read (e.g. 'LV_AMOUNT', 'SY-SUBRC'). Omit for all locals at the current stop point.
session_idYesSession ID from sap_debug_attach.
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already mark it read-only/idempotent/non-destructive, and the description adds concrete behavior: returns the JSON shape, variable kind enum, truncation marker, tableLines reporting, and the 'No debuggee attached' error path. This materially enriches the annotation-only picture.

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?

Purpose, prerequisite, args, return format, and error handling are each in clearly tagged sections with no filler. Front-loads the intent in the first sentence.

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 supplies a return contract including variable fields and kind values, plus the common failure mode. This is sufficient for an agent to invoke it and interpret the result.

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 parameters are fully documented structurally; the description mostly restates them. It does add the '@ROOT' hierarchy detail for omitted names, but otherwise adds little beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Read ABAP variable values at the current stop point.' This clearly identifies it as a read-only inspection tool among the debug family, though it does not explicitly contrast itself with sap_debug_eval's expression evaluation.

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?

Explicitly states the precondition: 'Requires state='STOPPED' (a debuggee attached by sap_debug_wait).' Error handling reinforces when it is valid ('run the code and call sap_debug_wait first'). It gives clear context but no explicit when-not-to-use or sibling alternatives.

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