Skip to main content
Glama
Hollway

mcp-abap-abap-adt-api

by Hollway

addAttribute

Add a DATA, CLASS-DATA, or CONSTANTS attribute to an ABAP class, specify visibility, type, and value, then activate. Use dryRun to preview the diff before writing.

Instructions

Add an attribute or a constant to a class - DATA, CLASS-DATA or CONSTANTS - into the section you name, then activate. Defaults to a private DATA, which is what an attribute usually is; a constant needs a value, and READ-ONLY is only accepted on a public one. Pass dryRun to see the diff without writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesABAP type, e.g. string, i, mara-matnr, ztt_foo.
valueNoVALUE for the declaration, written as ABAP: 'X' with the quotes, or 42.
dryRunNoShow the diff without locking or writing.
staticNoCLASS-DATA rather than DATA.
activateNoActivate afterwards (default true).
constantNoCONSTANTS rather than DATA; needs a value.
readOnlyNoREAD-ONLY. Public attributes only.
classNameYesClass name, e.g. ZCL_APP.
transportNoTransport request for the change.
visibilityNopublic, protected or private. Default private.
attributeNameYesName of the new attribute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, so the agent knows it is a write operation but not destructive. The description adds that it activates by default and that dryRun can preview the diff without writing, which is useful. However, it does not mention locking, transport implications, or failure handling, so transparency is only partial.

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?

The description is two sentences, concisely leading with the action, then covering defaults and special cases. It avoids repetition of schema details and is efficiently structured, though the last sentence about dryRun could be seen as an afterthought rather than front-loaded. Still, it is well-organized.

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 tool's complexity (11 params, no output schema), the description covers key constraints: default visibility, requirement of value for constants, readOnly restriction, and dryRun behavior. It does not mention return values or edge cases, but the schema covers parameter syntax. The essential guidance for correct invocation is present.

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 coverage is 100%, so all 11 parameters have descriptions. The description adds some interaction notes (constant needs value, readOnly only on public, dryRun preview), which slightly enriches parameter understanding. Yet it does not dramatically extend beyond the schema, so a baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool adds an attribute or constant to a class, enumerating the kinds (DATA, CLASS-DATA, CONSTANTS) and that it activates. It is specific enough to distinguish from method-related tools, though it does not explicitly name a sibling alternative. The core purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives parameter-level guidance (e.g., constants need a value, READ-ONLY only for public) but does not state when to prefer this tool over alternatives like addMethod, nor any exclusions. There is no explicit 'use this when...' or 'use that instead' guidance, leaving the agent to infer the tool's role from its name.

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