Skip to main content
Glama

ABAP Debug Set Variable

abap_debug_set_variable
DestructiveIdempotent

Overwrite a variable in a stopped ABAP debug session to test alternate runtime values without changing database or source, and return SAP’s reported value.

Instructions

Overwrite a variable in the stopped debuggee and return the value SAP reports back. Affects only the running program's memory for this debug session, not the database or source, but whatever the program does afterwards uses the new value. Needs an active session stopped at a breakpoint; check the current value first with abap_debug_variable.

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": {
      "variableName": "<variableName>",
      "value": "<value>"
    },
    "name": "abap_debug_set_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesNew value as text (e.g. 5, or ABC for a character field)
connectionIdNoSAP system connection ID
variableNameYesVariable name as written in the source (e.g. LV_COUNT)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.16.2
    • changedInput schema / properties / value / description
      Previous value: -"New value to set"New value: +"New value as text (e.g. 5, or ABC for a character field)"
    • changedInput schema / properties / variableName / description
      Previous value: -"Variable name to change"New value: +"Variable name as written in the source (e.g. LV_COUNT)"
  2. First observedv1.16.0

TDQS

A4.7/5.0
Behavior5/5

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

Although annotations already flag destructiveHint=true and openWorldHint=true, the description adds meaning the annotations cannot convey: the write is scoped to the running program's memory for this debug session, does not touch the database or source, and yet changes everything the program does afterwards. That consequence framing is exactly what an agent needs before mutating state.

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 action and the effect scope, followed by the prerequisite and alternative. No filler, no repetition of the title or annotations.

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 destructive three-parameter tool with no output schema, the description covers the return value ("the value SAP reports back"), the effect boundary, the prerequisite, and the inspection alternative. Nothing material to correct invocation 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%, and all three parameters (variableName, value, connectionId) are already documented in the schema, including the text-form value convention. The description adds no format or type guidance beyond that, so the baseline 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 gives a specific verb and resource ("Overwrite a variable in the stopped debuggee") plus the return behavior, and it implicitly separates itself from the read-only sibling abap_debug_variable. An agent can distinguish it from abap_debug_session, abap_debug_stack, or abap_debug_step without inspecting 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?

It states the precondition explicitly ("Needs an active session stopped at a breakpoint") and directs the agent to the alternative tool when the goal is inspection ("check the current value first with abap_debug_variable"). That is a clear when-to-use plus a named alternative, leaving little to inference.

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