Skip to main content
Glama

Create ABAP Repository Object

sap_create_object

Create a new ABAP repository object (program, include, class, interface, or function group) in SAP S/4HANA. Specify type, name, description, and package, then add source and activate.

Instructions

Create a new ABAP repository object (program, include, class, interface, or function group). The object must not already exist. After creation, use sap_write_source to add source code and sap_activate to make it live.

Args:

  • object_type ('program'|'include'|'class'|'interface'|'function_group').

  • object_name (string): new object name.

  • description (string): short description (≤70 chars).

  • package (string): default '$TMP' (local, no transport). Use a Z-package for real development.

  • transport (string): required when package ≠ '$TMP'.

  • response_format.

Returns (json): { objectType, objectName, uri, transport?, message }.

Examples:

  • "Create program ZTEST in $TMP" -> object_type='program', object_name='ZTEST', description='Test', package='$TMP'.

  • "Create class ZCL_HANDLER in ZDEV package" -> object_type='class', object_name='ZCL_HANDLER', package='ZDEV', transport='DEVK900123'. Notes:

  • After creation the object is empty and inactive. Write source with sap_write_source then activate.

  • Function modules cannot be created directly — create the function_group first, then use SE37 or sap_write_source on the group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageNoPackage to create the object in. '$TMP' = local (no transport needed). Use a Z-package for transportable objects.$TMP
transportNoTransport request (e.g. 'DEVK900123'). Required for non-$TMP packages.
descriptionYesShort description (shown in SE80 object list).
object_nameYesName for the new object (e.g. 'ZNEW_PROG', 'ZCL_FOO'). Must not already exist.
object_typeYesKind of object to create: 'program', 'include', 'class', 'interface', or 'function_group'.
response_formatNoOutput format: 'markdown' (human-readable, default) or 'json' (structured).markdown
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

Annotations indicate this is not read-only and not idempotent, and the description adds concrete behavioral detail: the object must not already exist, it is empty and inactive after creation, and function modules cannot be created directly. This is meaningful context beyond the annotations.

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 well-structured with Overview, Args, Returns, Examples, and Notes, and it is front-loaded with the key purpose and workflow. It is slightly long because the Args block duplicates schema details, but each section still contributes.

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 tool with 6 parameters and no output schema, the description includes the return shape, default and required parameter rules, examples, and important workflow caveats. An agent has enough information to call the tool correctly without needing extra documentation.

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%, so the description is not required to compensate for missing parameter docs. It adds value with natural-language examples, the package/transport conditional, and the '$TMP' vs Z-package distinction, though some of this restates schema descriptions.

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 states a specific verb ('Create') and resource ('ABAP repository object'), lists the allowed object types, and clarifies it is the creation step separate from sap_write_source and sap_activate. This clearly distinguishes the tool from its siblings without opening the schema.

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 explains the workflow: the object must not already exist, then sap_write_source adds source, and sap_activate makes it live. It also handles the function-module edge case by directing users to create a function_group first, so an agent knows exactly when and how to use the tool versus alternatives.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/appmaster3000/sap-abap-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server