Skip to main content
Glama

Scaffold a RAP business object

scaffold_rap_bo
Read-onlyIdempotent

Generate a complete RAP managed business-object stack for one root entity including root CDS view, behavior definition, implementation class, projection views, UI metadata, and OData service.

Instructions

Generate the complete, canonical RAP managed business-object stack for one root entity: root CDS view entity, behavior definition (managed, strict(2), optional draft), behavior implementation class with handler locals, projection view with transactional_query, projection behavior definition, UI metadata extension, and an OData V4 service definition — plus a suggested table DDL, the activation order, and next steps. Use this when starting a new RAP business object in ABAP Cloud or S/4HANA and you want correct boilerplate that follows the SAP /DMO reference shape instead of writing it by hand. Generated classes and CDS views are round-trip validated through abaplint at ABAP-Cloud level before being returned; behavior and service definitions are canonical templates (abaplint does not parse those deeply) and ADT activation is the final check. It does not create the table or the service binding (binding is not a source artifact — create it in ADT), and it generates single-entity BOs: model compositions (parent-child) yourself for now. Example: scaffold_rap_bo({ "entityName": "Travel", "sqlTable": "ztravel", "keyField": "travel_id", "fields": [ { "name": "agency_id", "type": "abap.char(6)" } ], "draft": true }).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftNoGenerate draft handling (draft table reference, draft actions, use draft).
fieldsNoNon-key business fields. Admin fields (created_by/created_at/…) are added automatically.
prefixNoCustomer namespace prefix for all generated names.Z
keyFieldYessnake_case key field of that table, e.g. "travel_id".
sqlTableYesPersistent table the BO is backed by, e.g. "ztravel". Must start with the namespace prefix.
entityNameYesEntity name in UpperCamelCase, e.g. "Travel" — drives ZR_/ZC_/ZBP_/ZUI_ artifact names.
managedUuidKeyNotrue (default): UUID key filled by managed numbering — modern RAP default. false: the caller provides the key on create.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
nextStepsYesWhat the generator cannot do for you (table, binding, draft table).
activationOrderYesThe order to create/activate artifacts in ADT.
validationIssuesYesabaplint findings on the generated sources — empty in normal operation.
suggestedTableDdlYesStarting-point DDL for the persistent table; adjust types.
Behavior1/5

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

The annotation readOnlyHint=true contradicts the described behavior of generating code artifacts, which is a side effect. While the description adds some behavioral detail (validations, templating), the contradiction undermines trust. Score 1 due to contradiction.

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?

The description is concise yet comprehensive, using front-loaded purpose, bullet-like listing of artifacts, and clear limitations. Every sentence adds value without redundancy.

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?

Given 7 parameters and an output schema, the description fully covers usage context: what is generated, when to use, limitations, validation steps, and an example. It leaves no critical gaps for an agent to understand invocation.

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% with descriptions for all parameters. The description adds minimal extra meaning beyond the schema, such as the example and clarifying generated artifact names. 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 clearly states the tool generates a complete RAP managed business-object stack for one root entity, listing specific artifacts (CDS view, behavior definition, handler class, etc.). It distinguishes from sibling tools like lint_abap or format_abap, which are not about code generation.

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?

Explicitly says 'Use this when starting a new RAP business object' and provides exclusions: does not create table or service binding, single-entity BOs only. Includes an example call and mentions validation steps.

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

Install Server

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/palimkarakshay/abap-mcp'

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