Skip to main content
Glama

SAPDiagnose

Diagnose ABAP objects with syntax checks, unit tests, and ATC code quality checks. 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.

  • "quickfix": Get SAP quick fix proposals for a specific source position. Requires name + type + source + line. Optional: column.

  • "apply_quickfix": Apply one quick fix proposal and return text deltas (does not write source). Requires name + type + source + line + proposalUri + proposalUserContent. Optional: column.

  • "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)
typeNoObject type (PROG, CLAS, etc.) (for syntax/unittest/atc)
sourceNoCurrent source code (required for quickfix/apply_quickfix).
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).
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.
Behavior4/5

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

No annotations are provided, so the description bears full responsibility. It discloses important behavioral traits: syntax check with source is a dry-run (nothing written), apply_quickfix returns text deltas without writing, dumps default to focused chapters, and traces require analysis type. However, it does not mention permissions, rate limits, or potential side effects beyond what is stated.

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 lengthy due to the tool's complexity (20 parameters, 9 actions) but is well-structured with bullet points per action. It front-loads the overall purpose. While every sentence adds value, some redundancy exists (e.g., repeating required params for quickfix actions). Could be slightly more concise but remains clear.

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 tool's complexity and lack of output schema, the description is remarkably complete. It covers all actions, parameter combinations, defaults, and the workflow for quickfix. It explains what each action returns (e.g., text deltas, list of dumps, trace analysis). No crucial information is missing for an agent to use the tool effectively.

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 the baseline is 3. The description adds significant value by explaining the interplay of parameters for each action (e.g., 'source' for syntax is a dry-run, 'id' for dumps switches from list to detail, 'sections' for dumps detail). It also clarifies defaults and dependencies that are not obvious from the schema alone.

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 tool's purpose: 'Run diagnostics on ABAP objects and analyze runtime errors.' It lists specific actions (syntax, unittests, ATC, quickfix, dumps, traces, etc.) and differentiates itself from siblings like SAPRead (read-only access) by focusing on diagnostics and analysis, not just reading.

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?

The description provides explicit guidance for each action, including when to use optional parameters and the quickfix workflow (run syntax/ATC first, then quickfix, then apply_quickfix). It explains the difference between listing and detail modes for dumps, traces, and gateway_errors. However, it does not explicitly contrast with sibling tools, but the context is clear.

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