Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_debugger_variables

Inspect variable values in the current ABAP debug session by providing variable names. Returns value statements for each variable.

Instructions

Get variable values in the current debug context. Returns value statements for each variable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variable_namesYesArray of variable names to inspect
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Core handler: debuggerGetVariables sends a POST to /sap/bc/adt/debugger?method=getVariables with an XML payload of requested variable names, returns the raw response data.
      async debuggerGetVariables(variableNames: string[]): Promise<string> {
        this.ensureDebugSession();
        const items = variableNames.map(n => `<dbg:variable><dbg:name>${this.escapeXml(n)}</dbg:name></dbg:variable>`).join("");
        const xml = `<?xml version="1.0" encoding="UTF-8"?>
    <dbg:variableRequests xmlns:dbg="http://www.sap.com/adt/debugger">${items}</dbg:variableRequests>`;
        const resp = await this.http.post("/sap/bc/adt/debugger?method=getVariables", xml, {
          headers: this.statefulHeaders({
            "Content-Type": "application/xml",
            Accept: "application/xml",
          }),
          responseType: "text",
        });
        return resp.data as string;
      }
  • Registration: Tool 'get_debugger_variables' registered in the MCP server's ListToolsRequestSchema handler with its input schema.
      name: "get_debugger_variables",
      description: "Get variable values in the current debug context. Returns value statements for each variable.",
      inputSchema: {
        type: "object" as const,
        properties: {
          variable_names: { type: "array", description: "Array of variable names to inspect" },
          ...SYSTEM_ID_PROP,
        },
        required: ["variable_names"],
      },
    },
  • Schema definition: DebuggerVariablesSchema defines the input validation for 'get_debugger_variables' requiring an array of variable name strings.
    const DebuggerVariablesSchema = z.object({ variable_names: z.array(z.string()) });
  • Handler routing: The CallToolRequestSchema dispatches 'get_debugger_variables' by parsing args with DebuggerVariablesSchema and calling client.debuggerGetVariables().
    case "get_debugger_variables": {
      const { variable_names } = DebuggerVariablesSchema.parse(args);
      const result = await client.debuggerGetVariables(variable_names);
      return { content: [{ type: "text", text: result }] };
    }
Behavior3/5

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

With no annotations, the description must communicate behavior. It indicates a read operation returning value statements, but lacks details on scope (local vs global), error states, or required session state. It is adequate but not comprehensive.

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 concise sentences, front-loaded with purpose. Every word serves a function with no redundancy. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple tool, but fails to contextualize the need for an active debugger session or how to set one up using sibling tools. Given no output schema, more detail on the return format would improve completeness.

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?

Input schema has 100% description coverage for both parameters. The description's mention of 'value statements' adds some context about output, but does not enhance parameter meaning beyond what the schema provides. Baseline score of 3 is appropriate.

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 clearly states the action (Get variable values), the resource (variable values), and the context (current debug context). It effectively distinguishes from sibling tools like 'set_debugger_variable_value' and 'get_debugger_child_variables'.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., needing an active debug session) or when not to use it (e.g., for child variables, use a different tool).

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

Install Server

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/ethanhan2014/sap-adt-mcp'

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