Skip to main content
Glama

SAPDiagnose

Read-only

Check ABAP object syntax, run unit tests and ATC checks, analyze runtime errors, dumps, traces, and gateway errors. Retrieve and apply quick fixes.

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.

  • "cds_testcases": Get SAP-suggested ABAP Unit test cases for a CDS entity (CDS Test Double Framework). Requires name (the CDS entity / DDLS source name; no type needed). Returns one test-method suggestion per testable semantic (whole view, calculated fields, CAST/JOIN/CASE) to scaffold a cl_cds_test_environment unit test. Read-only; SAP_BASIS 8.16+ (ABAP Platform 2025 / S/4HANA 2025) only.

  • "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); the CDS entity / DDLS source name for cds_testcases
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.
Behavior4/5

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

The description adds behavioral details beyond the readOnlyHint annotation: it marks cds_testcases as 'Read-only' and apply_quickfix as 'does not write source'. It also describes internal behavior like parallel reads for object_state and optional sections for dumps. No contradiction with annotations.

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

Conciseness3/5

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

The description is lengthy but well-organized with bullet points for each action. It repeats some information (e.g., parameter descriptions mirror schema). The workflow section at the end is helpful but adds length. It could be trimmed without losing essential guidance.

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 (22 parameters, 11 sub-actions, sibling tools), the description is thorough. It covers all actions, required vs optional parameters, defaults, edge cases (e.g., cds_testcases requires SAP_BASIS 8.16+), and even provides a workflow. No output schema exists, so the description compensates adequately.

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 baseline is 3. The description adds meaning by explaining parameter usage per action (e.g., 'proposalUserContent may be an empty string; pass it through exactly'), clarifying defaults, and noting which parameters are required for specific actions.

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 starts with a clear verb-resource pair ('Run diagnostics on ABAP objects and analyze runtime errors') and enumerates distinct sub-actions (syntax, unittest, atc, etc.), each with a specific purpose. It distinguishes itself from sibling tools by focusing on diagnostic operations rather than general search, read, or management.

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 usage context for each sub-action, including required parameters, optional parameters, and defaults (e.g., 'version defaults to active'). It also outlines a workflow for quickfix actions. However, it does not explicitly state when to avoid this tool in favor of a sibling.

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