Skip to main content
Glama

Evaluate ABAP Debug Expression

sap_debug_eval
Read-onlyIdempotent

Read an ABAP variable at the current debug stop point to get its value without listing all locals.

Instructions

Read one variable at the current stop point, without listing all locals.

Note: the ABAP debugger resolves variable IDs, not computed expressions. 'LV_AMOUNT', 'SY-SUBRC' and 'GT_RESULT' work; 'strlen( lv_text )' does not — there is no evaluate-expression service in this API.

Args:

  • session_id (string).

  • expression (string): variable name.

  • response_format.

Returns (json): { sessionId, expression, value, type? }. Error Handling:

  • Not in scope at the current stop point -> use sap_debug_variables to see what is visible here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesABAP variable name to read (e.g. 'SY-SUBRC', 'LV_AMOUNT', 'GT_RESULT').
session_idYesSession ID from sap_debug_attach.
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool read-only and idempotent; the description adds important behavioral context: variable IDs are resolved, not expressions, and scope determines visibility. It also documents the response shape. The only minor weakness is that 'Returns (json)' is not fully reconciled with the response_format parameter, but this does not undermine the behavioral disclosure.

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?

Front-loaded with the core action, followed by a high-value limitation note, compact arg summary, return shape, and targeted error handling. Every sentence earns its place; no fluff or duplication beyond the concise Args list.

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 the return shape, error behavior, and a route to the correct sibling. The dependency on a previous sap_debug_attach session is covered by the schema's session_id description. The slight return-format ambiguity is a minor issue against an otherwise complete definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameter meaning is mostly carried by the schema. The description adds value by clarifying that expression means an ABAP variable ID rather than a computed expression and by giving concrete examples, slightly exceeding the schema's baseline.

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 action ('Read one variable at the current stop point') and distinguishes itself from the sibling sap_debug_variables by noting it does not list all locals. It also clarifies that the tool resolves variable IDs, not computed expressions, despite the title's word 'Evaluate'.

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?

Gives clear when and when-not guidance: use for one specific variable at the current stop point; explicitly advises using sap_debug_variables when a variable is not in scope. Also warns against computed expressions because no evaluate-expression service exists.

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