Skip to main content
Glama
Hollway

mcp-abap-abap-adt-api

by Hollway

patchObjectSource

Apply targeted edits to ABAP objects without full re-upload. Read, modify, and return a diff; use for small changes to avoid disrupting untouched code, with optional dry run.

Instructions

Change part of an ABAP object without re-uploading it. Reads the current source, applies the edits, writes the result and returns a unified diff of what changed. Use it instead of setObjectSource for a small change to a large object: setObjectSource replaces the whole object, so it costs the entire source and risks disturbing lines you never meant to touch. Pass dryRun to see the diff without writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYesEdits to apply. Every line number refers to the source as it is now, and edits must not overlap. Each edit is one of: {startLine, endLine?, replacement} to replace a line range ("" deletes it), {anchor, replacement, occurrence?} to replace exact text, {insertAfterLine, insertion} to insert (0 = at the top).
dryRunNoCompute and return the diff without writing anything.
transportNoTransport request for the change.
lockHandleNoLock handle. Omit it and the handle recorded by lock for this object is used (see listLocks).
objectSourceUrlYesSource URL, e.g. /sap/bc/adt/oo/classes/zcl_app/source/main

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations convey read-write intent (readOnlyHint=false, destructiveHint=false), and the description adds the read-modify-write pipeline ('Reads the current source, applies the edits, writes the result') plus the unified diff return value and dryRun no-write behavior. This enriches the agent's model of side effects beyond what annotations provide. It stops short of covering details like error conditions or lock behavior, but the essentials are present.

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?

Three front-loaded sentences carry the purpose, the contrast with the sibling tool, and the dryRun flag, and each earns its place. It is slightly dense and re-explains some behavior that the schema also covers, but there is no padding or irrelevant detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderately complex union-of-edits parameter (fully documented in the schema) and no output schema, the description appropriately states the return type (unified diff) and covers the write path, the dry-run path, and the decision to use this over setObjectSource. What an agent needs in order to call it correctly is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 and the schema already documents each parameter in detail, including the full edits union with startLine/endLine/replacement, anchor/replacement, and insertAfterLine/insertion forms. The description adds a high-level read-write-return pipeline that ties the parameters together but no extra per-parameter meaning beyond the schema. Baseline 3 is appropriate.

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 opens with a specific verb and resource ('Change part of an ABAP object') and distinguishes the tool from its sibling setObjectSource by explaining that this tool patches rather than replaces the whole object. An agent can immediately tell exactly what the tool does and how it differs from the closest alternative.

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?

The description explicitly says 'Use it instead of setObjectSource for a small change to a large object' and gives the reason (setObjectSource replaces the whole object, costs the entire source, risks disturbing untouched lines). It also tells when to pass dryRun to preview without writing. This is textbook when-to-use guidance with a named alternative and a condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools