Skip to main content
Glama
Hollway

mcp-abap-abap-adt-api

by Hollway

addMethod

Add a method to an ABAP class, inserting declaration and implementation, locking, writing, and activating. Detects duplicates and supports dry-run diffs.

Instructions

Add a method to a class: the declaration goes into the visibility section, the implementation before the closing ENDCLASS, and the whole lock/write/unlock/activate sequence follows. The signature is passed as data and the ABAP is built here, in the indentation the class already uses. This is otherwise two patchObjectSource edits into two different parts of one source, with line numbers that both have to be right. A method that is already there is refused with the line it is on, rather than declared twice. Pass dryRun to see the diff without writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNoShow the diff without locking or writing.
staticNoCLASS-METHODS rather than METHODS.
raisingNoException classes, e.g. ["cx_sy_zerodivide"].
activateNoActivate afterwards (default true).
changingNoParameters as data: [{name, type, optional?, default?}].
classNameYesClass name, e.g. ZCL_APP.
exportingNoParameters as data: [{name, type, optional?, default?}].
importingNoParameters as data: [{name, type, optional?, default?}].
returningNoReturning parameter: {name, type}. Becomes RETURNING VALUE(name) TYPE type.
transportNoTransport request. The number of the REQUEST, not of a task inside it.
methodNameYesName of the new method.
visibilityNopublic, protected or private. Default public.
declarationNoDeclaration text to use verbatim instead of building one from the parameters above. For a signature this cannot express.
implementationNoBody lines, without METHOD/ENDMETHOD. Omit and a TODO comment is left in their place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Despite annotations being minimal (both false), the description discloses the full write sequence: lock/write/unlock/activate. It also warns about duplicate methods being refused with a line numbercars, and that dryRun shows a diff without writing. This is rich, non-obvious behavior that an agent needs to know before invoking, far beyond what annotations provide.

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?

Two sentences, no fluff. The core purpose and mechanics are front-loaded, the comparison to patchObjectSource is a one-line distinction, and the duplicate-handling and dryRun behaviors are compactly stated. Every sentence carries load.

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?

For a complex token with 14 parameters nested objects and no output schema, the description covers the crucial operational flow (lock/write/unlock/activate), the refusal on duplicates, the dryRun option, and how the generated code is constructed. The parameter schema fills in the rest, so an agent has everything needed to safely call the tool.

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% with descriptions for every parameter, so the baseline is 3 per the rubric. The description adds useful semantics by clarifying that the signature is passed as data and the ABAP is built internally, plus noting indentation is preserved. It explains how parameters like importing/exporting/changing relate to the generated code, which adds value beyond the 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 opens with a specific verb and resource ('Add a method to a class') and immediately details what that entails (declaration into visibility section, implementation before ENDCLASS). It explicitly differentiates itself from the generic patchObjectSource route, which is a sibling tool, so an agent can select it correctly without ambiguity.

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 explains that this tool replaces two patchObjectSource edits, making the use case clear. It also mentions the dryRun option to preview without writing Poisson. However, it does not explicitly state when not to use it (e.g., for deleting methods, which has a dedicated sibling deleteMethod), though the comparison to patchObjectSource gives solid context.

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