Skip to main content
Glama

SAPDiagnose

Diagnose ABAP objects by performing syntax checks, unit tests, and ATC code quality analyses. Analyze runtime errors, dumps, and traces to identify and resolve issues.

Instructions

Run diagnostics on ABAP objects and analyze runtime errors.

Actions:

  • "syntax": Syntax check an ABAP object. Requires name + type. Optional: version ("active" or "inactive", defaults to active). Optional: source — when supplied, SAP compiles the given content as if it lived at the object's URI (pre-write dry-run, nothing is written). Omit source to check what is stored.

  • "unittest": Run ABAP unit tests. Requires name + type.

  • "atc": Run ATC code quality checks. Requires name + type. Optional: variant.

  • "object_state": Compare active and inactive source versions. Requires name + type. For CLAS, also compares main, definitions, implementations, macros, and testclasses includes (up to 10 parallel reads per class; sequence calls when sweeping many classes). Returns ETags, byte lengths, hashes, and divergence flags.

  • "quickfix": Get SAP quick fix proposals for a specific source position. Requires name + type + source + line. Optional: column, sourceUri for exact ADT include/source targets.

  • "apply_quickfix": Apply one quick fix proposal and return text deltas (does not write source). Requires name + type + source + line + proposalUri + proposalUserContent. Optional: column, sourceUri, proposalAffectedObjects. proposalUserContent may be an empty string; pass it through exactly from quickfix.

  • "dumps": List or read ABAP short dumps (ST22). Without id: lists recent dumps (filter by user, maxResults). With id: returns focused chapter sections by default; set includeFullText=true to include the full formatted dump blob. Optional sections=[kap0,kap3,...] to request specific chapter IDs.

  • "traces": List or analyze ABAP profiler traces. Without id: lists trace files. With id + analysis: returns trace analysis (hitlist = hot spots, statements = call tree, dbAccesses = database access statistics).

  • "system_messages": List SM02 system messages via ADT feed (filter by user, maxResults, from, to).

  • "gateway_errors": List SAP Gateway error log entries (/IWFND/ERROR_LOG, on-prem). For detail mode provide detailUrl (preferred) or id+errorType.

Quickfix workflow: run syntax/ATC first to identify issues and line positions, then call quickfix to retrieve SAP-verified proposals, then apply_quickfix to get exact text deltas, and finally write the updated source via SAPWrite.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesDiagnostic action
nameNoObject name (for syntax/unittest/atc/object_state)
typeNoObject type (PROG, CLAS, etc.) (for syntax/unittest/atc/object_state)
sourceNoCurrent source code (required for quickfix/apply_quickfix).
sourceUriNoExact ADT source URI for quickfix/apply_quickfix. Defaults to the type/name main source; use this for class includes such as /includes/definitions.
lineNoSource line number for quickfix evaluation (required for quickfix/apply_quickfix).
columnNoSource column number for quickfix evaluation (default 0 for quickfix actions).
versionNoSource version for syntax check (default "active"). Use "inactive" to validate pending changes.
proposalUriNoQuickfix proposal URI from quickfix action (required for apply_quickfix).
proposalUserContentNoOpaque userContent from quickfix action (required for apply_quickfix). May be an empty string; pass through exactly.
proposalAffectedObjectsNoOptional affectedObjects array from quickfix action. Include content for each affected source unit when applying multi-object quickfixes.
variantNoATC check variant (for atc action)
idNoDump or trace ID (for dumps/traces actions). Omit to list, provide to get details.
detailUrlNoADT detail URL for gateway_errors detail mode (preferred over id+errorType). Accepts absolute or /sap/bc/adt/... path.
errorTypeNoGateway error type for gateway_errors detail by id (for example "Frontend Error"). Required when using id without detailUrl.
userNoFilter dumps by SAP user (for dumps action)
fromNoOptional lower time boundary for feed-based diagnostics actions (system_messages/gateway_errors).
toNoOptional upper time boundary for feed-based diagnostics actions (system_messages/gateway_errors).
maxResultsNoMaximum results to return for dumps/system_messages/gateway_errors (default 50, bounded to a safe cap).
sectionsNoDump chapter IDs to include for dumps detail mode (for example ["kap0","kap3","kap8"]). Omit to use focused defaults.
includeFullTextNoFor dumps detail mode only: include full formattedText blob. Default false to reduce token usage.
analysisNoTrace analysis type (for traces action with id). hitlist = execution hot spots, statements = call tree, dbAccesses = database access stats.
Behavior5/5

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

The description thoroughly explains each action's behavior: e.g., syntax check with source as dry-run, apply_quickfix does not write, dumps without id lists and with id returns chapters, traces analysis types. This compensates for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear action headings and bullet points, but the inclusion of many actions and detailed explanations makes it lengthy. However, every sentence adds value for agent understanding.

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?

Given the complexity (22 parameters, 10 actions, no output schema), the description is comprehensive. It explains return values for key actions (ETags, chapter sections, trace analysis) and provides workflow hints, leaving minimal gaps.

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%, but the description adds valuable context beyond schema definitions, e.g., the dry-run behavior of source, the exact pass-through requirement for proposalUserContent, and the parallel reads for object_state.

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 'Run diagnostics on ABAP objects and analyze runtime errors,' with specific action sub-types (syntax, unittest, ATC, etc.). This distinguishes it from sibling tools like SAPRead or SAPManage, which have different purposes.

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?

While no explicit comparison to siblings is given, the description provides detailed workflow guidance for the quickfix sequence (syntax/ATC → quickfix → apply_quickfix → SAPWrite). This helps the agent understand when to use different actions within the 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/marianfoo/arc-1'

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