Skip to content

Releases: yzonur/sap-adt-mcp

v0.8.57 — the ABAP debugger actually works

Choose a tag to compare

@yzonur yzonur released this 04 Aug 13:11

Fixed

  • The debugger tool set was unusable (#101). Three HTTP-contract defects,
    all reproduced and then verified fixed end to end on a live system:

    • Missing stateful session. ADT's debugger is a stateful protocol: attach
      opens a debug session bound to the ABAP session, and every later call must
      run inside it. Nothing sent X-sap-adt-sessiontype: stateful, so attach
      answered 200 and looked fine while stack / variables / step all failed
      with 404 noSessionAttached. The header is now on attach and every call
      after it.
    • Wrong Accept on the listener. /debugger/listeners serves exactly one
      media type (application/vnd.sap.as+xml). The failure mode was silent: with
      anything else the long poll just sat there and the tool reported
      caught: false — indistinguishable from "nothing hit the breakpoint".
      A backend rejection (406) is now reported as the error it is.
    • A successful continue was reported as a 500. stepContinue on a
      debuggee that nothing else traps lets the ABAP session finish before ADT can
      answer, so the step comes back as 500 SY/530 debuggeeEnded while the
      triggering request returns 200. That is the operation succeeding; it now
      answers status: "debuggeeEnded" with an explanation instead of an error.

    Also: a failed attach no longer records a session that doesn't exist (and
    says so when the debuggee had already resumed), noSessionAttached answers
    with the recovery step, and adt_debug_stop now resumes the attached debuggee
    (release, default true) before cleaning up, so no suspended request is left
    hanging. The tool descriptions and README now state what an external
    breakpoint actually traps (HTTP/ICF, RFC, background — not your own SAP GUI
    dialog session), the classrun + SUBMIT workaround for dialog-only code,
    and that the listener must be armed before the run is triggered.

  • adt_create_object 500 on a function module in a namespaced group (#100).
    The POST target percent-encoded the group name, but the containerRef inside
    the body did not — /FGLR/DEVC became …/functions/groups//fglr/devc, an
    extra path segment pointing at a resource that doesn't exist, so the backend
    answered 500. Both places now encode the group as one path segment.

  • adt_create_object type=functiongroup never worked. Found while verifying
    the above: a stock S/4 (SAP_BASIS 755) rejects the declared v3 media type with
    400 ExceptionInvalidData ("Data is invalid and could not be converted") and
    accepts the identical body as v2. The media-type fallback only retried on 415,
    so the create always failed. It now also walks down the version chain on a
    400 ExceptionInvalidData. Verified end to end on a live system: function
    group + function module created in $TMP and deleted again.

Changed

  • adt_where_used no longer floods the context. A central object can carry
    five figures of references (CL_GUI_FRONTEND_SERVICES: 11117 parsed entries,
    ~126 KB in one tool result). The list is now capped at maxResults
    (default 200) and the response carries numberOfResults — the backend's own
    count from usageReferenceResult — plus truncated / totalParsed when the
    list was cut.

Install: npx sap-adt-mcp — npm: https://www.npmjs.com/package/sap-adt-mcp

v0.6.0 — 18 high-priority ADT tools

Choose a tag to compare

@yzonur yzonur released this 02 Jun 15:34

Clears the entire Tool additions — high priority backlog in one pass: 18 new tools across six new modules plus extensions to discovery and quality. Every tool was developed and verified against an on-prem NetWeaver test system (E4D).

Live-verified against real ADT responses

  • adt_grep_source — full-text regex search across source (package / transport / explicit list)
  • adt_run_atc_package / adt_run_atc_transport — bulk ATC via the full worklist flow (priority histogram, per-finding location)
  • adt_compare_versions — inactive-vs-active source diff
  • adt_cds_dependencies + adt_list_released_apis — CDS dependency graph + release-state contract catalog
  • adt_list_inactive_objects — the "Inactive Objects" worklist
  • adt_rap_scaffold — generate a full RAP stack from a spec (CDS → behavior def → impl class → service def → service binding); defaults to dryRun:true

Best-effort (endpoints absent on classic NetWeaver, useful on S/4 — graceful available:false)

  • adt_list_versions, SAP Note tools (adt_get_note / adt_check_note_status / adt_implement_note), adt_list_locks, adt_schedule_job / adt_read_spool

Supporting changes

  • Per-request timeoutMs override on AdtClient (bulk ATC uses 120 s)
  • Read-only allowlist now permits atc/* and datapreview/* POSTs (read-only in spirit; also unblocks existing adt_run_atc / adt_read_table)
  • SRVD / SRVB type mappings in object-uris.js

203 tests pass, lint clean. See CHANGELOG.md for the full per-tool live-verified vs best-effort breakdown.

v0.5.4 — seven MCP/ADT seam bug fixes

Choose a tag to compare

@yzonur yzonur released this 18 May 13:30

Seven bugs surfaced in one real-world ABAP refactor session against a ~147 KB class (/FGLR/CL_FLEET_TRANSFER) on on-prem E4D. All sat at the MCP↔ADT seam and were invisible to the pure-unit-test suite.

Full write-up: docs/bugfix-2026-05-15.md

Added

  • adt_set_source_chunked — multi-call write protocol for class bodies that don't fit in one MCP call (10-min TTL buffer, 4 MB cap, strict ordering, partial-source guard at commit).
  • adt_get_source.firstLine / lastLine / onlyMethod — pagination + method-scope slicing with totalLines / totalBytes / scope / truncated metadata.
  • adt_set_source.acknowledgePartial — explicit bypass for the new partial-write guard.
  • adt_activate.processRedoneOOSourceVersionOnly / preauditRequested — recover from "Object components locked in request and separate task" 403s.
  • adt_lock.transport — forwarded as corrNr=<TR>. adt_set_source and adt_delete_object now forward transport to the LOCK call as well.

Fixed

  • adt_set_source partial-write guard — detectPartialSource() rejects input whose first non-comment line is not a recognised top-level ABAP keyword. PUT on ADT is atomic; previously a chunk sent as a "diff" silently deleted the rest of the include.
  • parseAdtError no longer drops CTS diagnostics — LONGTEXT and T100KEY-V1..V4 are extracted from both <entry key="…"> and <property name="…"> shapes, surfaced as error.properties.longText and error.properties.t100.

Investigated

  • Method-scope class URI does not exist server-side — ADT Eclipse fetches the full implementations include and slices client-side. adt_get_source.onlyMethod is the practical equivalent.

Tests

54 new unit tests across test/source-guard.test.js, test/source-pagination.test.js, test/source-chunked.test.js, test/lifecycle-activate.test.js, test/lock.test.js, plus extensions to test/adt-error.test.js. Suite at 141/141.

Install: npm install claude-for-abap@0.5.4

v0.5.2 — dump tools verified against real ADT

Choose a tag to compare

@yzonur yzonur released this 13 May 11:23

v0.5.2 — dump tools verified against real ADT

v0.5.0 shipped the new adt_list_dumps / adt_get_dump tools without
real-system verification, and several layers of bugs only showed up when
the server was pointed at an on-prem ADT (S/4HANA, NetWeaver-class). This
patch lands the fixes from two rounds of E4D testing.

If you installed 0.5.0 via npx claude-for-abap, upgrade — adt_get_dump
is fully broken on 0.5.0 and the list response can blow past tool-output
token limits.

Fixed in adt_list_dumps

  • Accept header now sends application/atom+xml;type=feed. Bare
    application/atom+xml returns HTTP 406.
  • Parser handles namespace-prefixed Atom tags (<atom:entry>,
    <atom:author>, …). Real feeds use the prefix; v0.5.0 returned count: 0
    against feeds of 245+ entries.
  • Per-entry runtimeError and program extracted from <atom:category>
    elements (real shape), not just <title> (often absent).
  • Server-side maxResults is unreliable across releases — trim client-side
    after parse and report totalReturnedByServer so the truncation is
    visible.
  • Strip the per-entry HTML summary field. On real systems it's a 10+KB
    chunk per dump (chapter index + back-link) that on a 20-row list pushed
    responses past the tool-output token limit.

Fixed in adt_get_dump

  • Path corrected to /sap/bc/adt/runtime/dump/<id> (singular). The plural
    feed path 404s.
  • Feed ids arrive already URL-encoded; the tool no longer re-encodes them
    (which produced %25 doubled escapes and a 404).
  • Detail Accept is application/vnd.sap.adt.runtime.dump.v1+xml. The
    endpoint returns metadata + a <dump:link relation="contents">
    sub-resource link. Tool now performs the two-step fetch (metadata, then
    the formatted text from the link).
  • Root-element attributes are parsed (xmlns filtered out). Real on-prem
    payload (title, error, terminatedProgram, author, datetime,
    serverInstance, …) lives there, not in child elements.
  • runtimeError, program, user, time, server, title are lifted
    to the top level of the response so the agent doesn't have to probe
    the fields map.
  • Chapter parser handles boxed (pipe-wrapped) dump text and skips
    separator rules; recognizes both "What can you do?" and "What can I do?"
    phrasings.

Added in adt_get_dump

  • Structured chapters map with the six critical sections by default
    (shortText, whatHappened, errorAnalysis, howToCorrect,
    whereTerminated, sourceCodeExtract), plus seven more recognized
    on-demand. Pass chapters: [...] to limit or full: true to also
    include the raw text (typically 100KB+).
  • chaptersAvailable lists every chapter the parser recognized, even when
    the response is filtered, so the agent can see what else is fetchable.

Tests: 62 → 91 across this release line, all passing. Lint clean. Existing
tool behavior unchanged.

Full diff: CHANGELOG.md.

v0.5.0 — ST22, SE16, and a modular tools/ layout

Choose a tag to compare

@yzonur yzonur released this 13 May 10:25

v0.5.0 — ST22, SE16, and a modular tools/ layout

This release moves claude-for-abap from "an AI that edits code" toward
"an AI that does the daily SAP-developer job" with two new tool families,
plus a refactor that makes future additions cheap.

ST22 short-dump analysis

  • adt_list_dumps — list runtime errors by user / host / time window
    (from, to, maxResults). Atom feed parsed defensively; release-specific
    rba:* fields (host, program, include, line, errorClass) surface as a
    structured map so the agent can reason about them without you pasting XML.
  • adt_get_dump — fetch the full detail by id. Parsed fields plus raw XML
    fallback so the agent can drill into call stacks itself.

SE16-style table reads

  • adt_read_table — run an OpenSQL SELECT through the ADT Data Preview
    endpoint (/sap/bc/adt/datapreview/freestyle). Returns structured
    { columns, rows }. SELECT-only guard on the client side; the SAP endpoint
    enforces server-side too. Row cap default 100, hard max 5000. Requires
    NetWeaver 7.55+ / S/4HANA.

Modular internals

src/server.js shrank from 1636 lines to ~190. Each tool category now lives
in its own module under src/tools/ (connection, source, quality,
lifecycle, discovery, cross-system, transports, runtime, data,
request). Shared helpers moved into src/result.js, src/lock.js,
src/xml.js. A new test/tools-shape.test.js enforces the per-module
contract.

Stats

  • 27 high-level tools (was 24) + 5 Clean Core prompts + 1 escape hatch
  • 80 tests passing (was 62), lint clean
  • No behavior change for existing tools — every previous workflow still
    works

Coming next (see TODO.md)

adt_grep_source (regex search across a package/TR), adt_list_versions
(version history), adt_run_atc_package (bulk ATC), SAP Note integration,
CDS-specific tooling.

Full diff: CHANGELOG.md.