adt_edit_source
Apply precise replacements to ABAP source code by sending only changed fragments as oldString/newString pairs. Reduces payload for targeted edits compared to full source writes.
Instructions
AI-token-optimised precise edit of an ABAP object. Send only the fragments to change as {oldString, newString} pairs; the tool reads the current source, applies each replacement (oldString must match exactly once), then runs lock -> write -> unlock -> optional activate. Use this instead of adt_write_source when you only need to change a few spots — it can cut the request payload by ~90%+ for large objects. Each oldString must be unique; if not, include more surrounding context to disambiguate. Blocked in read-only mode; object name must match the Z*/Y* prefix whitelist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | One or more {oldString, newString} replacements, applied in order | |
| activate | No | Activate after writing | |
| objectUri | Yes | Object URI (base, not .../source/main) | |
| transport | No | Existing transport request; if omitted, one is auto-created | |
| description | No | Transport description when auto-creating | Edited via ABAP ADT MCP |
| syntaxCheck | No | Run syntax check before writing |