Skip to main content
Glama

Compare two ABAP versions

compare_abap
Read-onlyIdempotent

Compare before and after versions of ABAP code to identify lint findings resolved or introduced, structural changes, and cloud readiness score movement. Get an objective verdict on refactors or AI rewrites.

Instructions

Compare a BEFORE and an AFTER version of ABAP source and report what a rework actually changed: lint findings resolved and introduced (matched by content, so moved-but-unchanged code is not noise), cloud-blocker / score / A–D grade movement from the same dual-parse diff as check_cloud_readiness, and structural changes — classes, methods and FORMs added or removed. Use this when reviewing a refactor, a modernization step or an AI-generated rewrite of an existing object and you need an objective better-or-worse verdict instead of eyeballing a diff. It is not a textual diff tool (use git diff to see the edits) and it cannot judge functional equivalence — behavior can change while every number improves; it does not connect to any SAP system. Example: compare_abap({ "before": [ { "source": "REPORT zr.\nWRITE 1." } ], "after": [ { "source": "REPORT zr.\nWRITE 2." } ] }).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesThe AFTER sources — the reworked version being judged. Up to 32 files, 100k chars each.
focusNoCurated rule-pack lens: report only rules carrying this abaplint tag — "Performance" for a tuning pass, "Security" for a security sweep, "Styleguide" for Clean ABAP adherence. Parser errors always surface. Ignored with preset "syntax-only". Combine with rules to re-tune individual rules in the pack.
rulesNoabaplint rule overrides applied to both sides, e.g. { "line_length": { "length": 120 } }.
beforeYesThe BEFORE sources — the current/old version of the object(s). Up to 32 files, 100k chars each.
presetNoLint preset applied identically to both sides: "style" (default) for isolated snippets, "full" when every referenced object is provided, "syntax-only" for parser errors only.style
abapVersionNoABAP language version both sides are linted against. "v758" (default) is current on-prem; "Cloud" is ABAP Cloud.v758

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesLint and readiness numbers for the AFTER side.
beforeYesLint and readiness numbers for the BEFORE side.
resolvedYesFindings present before but gone after — improvements.
matchNoteYesHow findings were matched and what the numbers do and do not mean.
introducedYesFindings present only after — regressions to fix.
outlineChangesYes
unchangedCountYesFindings present on both sides (content-matched).
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds context: it uses dual-parse diff, does not connect to SAP, and reports specific metrics. No contradictions; the description reinforces the safe, stateless behavior.

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?

Approximately 150 words, front-loaded with purpose, then details, exclusions, and an example. Every sentence adds value; no redundancy or fluff.

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 (6 params, nested objects) and existence of output schema, the description sufficiently covers inputs, output expectations, limitations, and usage context. It mentions error handling (parser errors always surface).

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 value beyond schema by explaining how the tool works (dual-parse diff, content-matching to avoid noise) and what the output includes, though it does not elaborate on individual parameter syntax beyond schema.

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 it compares BEFORE and AFTER ABAP source, reporting lint findings, cloud-blocker/score/A-D grade movement, and structural changes. It distinguishes from siblings like check_cloud_readiness and git diff, with a specific verb and resource.

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?

Explicitly says when to use ('reviewing a refactor, modernization step, AI-generated rewrite') and what not to use it for ('not a textual diff tool', 'cannot judge functional equivalence'). Provides an example call, giving clear guidance.

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/palimkarakshay/abap-mcp'

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