@rosa-mcp/server 1.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/constants.d.ts +43 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +114 -0
- package/dist/constants.js.map +1 -0
- package/dist/handlers/api-handlers.d.ts +205 -0
- package/dist/handlers/api-handlers.d.ts.map +1 -0
- package/dist/handlers/api-handlers.js +456 -0
- package/dist/handlers/api-handlers.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +144 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/oauth.d.ts +14 -0
- package/dist/middleware/oauth.d.ts.map +1 -0
- package/dist/middleware/oauth.js +105 -0
- package/dist/middleware/oauth.js.map +1 -0
- package/dist/routes/api-routes.d.ts +3 -0
- package/dist/routes/api-routes.d.ts.map +1 -0
- package/dist/routes/api-routes.js +298 -0
- package/dist/routes/api-routes.js.map +1 -0
- package/dist/schemas/common.d.ts +40 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +115 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/services/abbreviation-dictionary.d.ts +45 -0
- package/dist/services/abbreviation-dictionary.d.ts.map +1 -0
- package/dist/services/abbreviation-dictionary.js +196 -0
- package/dist/services/abbreviation-dictionary.js.map +1 -0
- package/dist/services/data-loader.d.ts +20 -0
- package/dist/services/data-loader.d.ts.map +1 -0
- package/dist/services/data-loader.js +289 -0
- package/dist/services/data-loader.js.map +1 -0
- package/dist/services/search.d.ts +64 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +391 -0
- package/dist/services/search.js.map +1 -0
- package/dist/tools/register-tools.d.ts +22 -0
- package/dist/tools/register-tools.d.ts.map +1 -0
- package/dist/tools/register-tools.js +561 -0
- package/dist/tools/register-tools.js.map +1 -0
- package/dist/types.d.ts +136 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +90 -0
- package/sap_abbreviation_dictionary.json +966 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// MCP Tool Implementations
|
|
3
|
+
// Delegates to shared handlers in ../handlers/api-handlers.ts
|
|
4
|
+
// ============================================================================
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { OBJECT_TYPE_DESCRIPTIONS, CHARACTER_LIMIT } from "../constants.js";
|
|
7
|
+
import { SystemTypeSchema, CleanCoreLevelSchema, VersionSchema, QuerySchema, ObjectTypeFilterSchema, AppComponentFilterSchema, LimitSchema, OffsetSchema, StateFilterSchema, } from "../schemas/common.js";
|
|
8
|
+
import { LEVEL_ORDER, normalizeVersion, getLevelsUpTo, needsClassicApis, filterByLevel, handleSearchObjects, handleGetObjectDetails, handleFindSuccessor, handleListObjectTypes, handleGetStatistics, handleListVersions, handleCheckCompliance, } from "../handlers/api-handlers.js";
|
|
9
|
+
// Re-export helpers for backward compatibility (tests, etc.)
|
|
10
|
+
export { LEVEL_ORDER, normalizeVersion, getLevelsUpTo, needsClassicApis, filterByLevel };
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Text formatting helpers (MCP-specific)
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
export function formatObject(obj, verbose = false) {
|
|
15
|
+
const typeDesc = OBJECT_TYPE_DESCRIPTIONS[obj.objectType] ?? obj.objectType;
|
|
16
|
+
const levelLabel = `Level ${obj.cleanCoreLevel}`;
|
|
17
|
+
let line = `${obj.objectType} ${obj.objectName} [${obj.state}] (${levelLabel})`;
|
|
18
|
+
if (verbose) {
|
|
19
|
+
line += `\n Type: ${typeDesc}`;
|
|
20
|
+
if (obj.applicationComponent)
|
|
21
|
+
line += `\n App Component: ${obj.applicationComponent}`;
|
|
22
|
+
if (obj.softwareComponent)
|
|
23
|
+
line += `\n SW Component: ${obj.softwareComponent}`;
|
|
24
|
+
if (obj.successor) {
|
|
25
|
+
if (obj.successor.objects && obj.successor.objects.length > 0) {
|
|
26
|
+
const succs = obj.successor.objects
|
|
27
|
+
.map((s) => `${s.objectType} ${s.objectName}`)
|
|
28
|
+
.join(", ");
|
|
29
|
+
line += `\n Successor(s): ${succs}`;
|
|
30
|
+
}
|
|
31
|
+
if (obj.successor.conceptName) {
|
|
32
|
+
line += `\n Successor Concept: ${obj.successor.conceptName}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return line;
|
|
37
|
+
}
|
|
38
|
+
export function truncateIfNeeded(text) {
|
|
39
|
+
if (text.length <= CHARACTER_LIMIT)
|
|
40
|
+
return text;
|
|
41
|
+
return (text.slice(0, CHARACTER_LIMIT - 200) +
|
|
42
|
+
`\n\n... [Response truncated. ${text.length} characters total. Use filters or pagination to narrow results.]`);
|
|
43
|
+
}
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// Register all tools
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
export function registerTools(server) {
|
|
48
|
+
// =========================================================================
|
|
49
|
+
// TOOL 1: sap_search_objects
|
|
50
|
+
// =========================================================================
|
|
51
|
+
server.registerTool("sap_search_objects", {
|
|
52
|
+
title: "Search SAP Objects",
|
|
53
|
+
description: `Search for SAP objects (classes, interfaces, CDS views, tables, data elements, ` +
|
|
54
|
+
`function groups, RAP artifacts, etc.) in the SAP Cloudification Repository. ` +
|
|
55
|
+
`Filter by Clean Core Level (A/B/C/D), object type, application component, and state. ` +
|
|
56
|
+
`Use this tool to find released APIs for ABAP Cloud development, ` +
|
|
57
|
+
`check if a specific object is available for your target system, ` +
|
|
58
|
+
`or discover alternatives when an object is not released.\n\n` +
|
|
59
|
+
`SEARCH TIPS:\n` +
|
|
60
|
+
`- Use separate words for business concepts: 'purchase order' not 'PURCHASEORDER'\n` +
|
|
61
|
+
`- SAP abbreviations are automatically resolved: 'billing document' also finds BILLGDOC*, BILDOC* objects\n` +
|
|
62
|
+
`- Compound abbreviations work too: 'purchase order' finds PO* objects, 'bill of material' finds BOM*\n` +
|
|
63
|
+
`- Separate words trigger fuzzy matching on SAP abbreviations (e.g., 'physical inventory' finds both PHYSICALINVENTORY* and PHYSINVTRY* objects)\n` +
|
|
64
|
+
`- Use exact SAP names only when you know the precise object name (e.g., 'I_PRODUCT', 'MARA')\n` +
|
|
65
|
+
`- Combine with app_component filter for targeted results (e.g., query='inventory', app_component='MM-IM')\n` +
|
|
66
|
+
`- Prefer singular forms: 'handling unit' not 'handling units' (plural 's' can reduce match accuracy)\n` +
|
|
67
|
+
`- Keep queries to 2-3 words maximum; use filters instead of adding more words\n\n` +
|
|
68
|
+
`System types:\n` +
|
|
69
|
+
`- public_cloud (S/4HANA Cloud Public Edition): Only Level A Released APIs\n` +
|
|
70
|
+
`- btp (BTP ABAP Environment / Steampunk): Only Level A Released APIs (separate, smaller dataset)\n` +
|
|
71
|
+
`- private_cloud / on_premise: Levels A-D available, version-specific\n\n` +
|
|
72
|
+
`Clean Core Levels (cumulative filter):\n` +
|
|
73
|
+
`- A: Released APIs only (ABAP Cloud, upgrade-safe)\n` +
|
|
74
|
+
`- B: + Classic APIs (upgrade-stable)\n` +
|
|
75
|
+
`- C: + Internal/unclassified objects\n` +
|
|
76
|
+
`- D: + noAPI objects (not Clean Core)`,
|
|
77
|
+
inputSchema: {
|
|
78
|
+
query: QuerySchema,
|
|
79
|
+
system_type: SystemTypeSchema,
|
|
80
|
+
clean_core_level: CleanCoreLevelSchema,
|
|
81
|
+
version: VersionSchema,
|
|
82
|
+
object_type: ObjectTypeFilterSchema,
|
|
83
|
+
app_component: AppComponentFilterSchema,
|
|
84
|
+
state: StateFilterSchema,
|
|
85
|
+
limit: LimitSchema,
|
|
86
|
+
offset: OffsetSchema,
|
|
87
|
+
},
|
|
88
|
+
annotations: {
|
|
89
|
+
readOnlyHint: true,
|
|
90
|
+
destructiveHint: false,
|
|
91
|
+
idempotentHint: true,
|
|
92
|
+
openWorldHint: false,
|
|
93
|
+
},
|
|
94
|
+
}, async ({ query, system_type, clean_core_level, version, object_type, app_component, state, limit, offset, }) => {
|
|
95
|
+
try {
|
|
96
|
+
const result = await handleSearchObjects({
|
|
97
|
+
query, system_type, clean_core_level, version,
|
|
98
|
+
object_type, app_component, state, limit, offset,
|
|
99
|
+
});
|
|
100
|
+
// Error: unknown type
|
|
101
|
+
if ("error" in result && result.error === "unknown_type") {
|
|
102
|
+
const availableTypes = (result.availableTypes ?? [])
|
|
103
|
+
.map(({ type, count, description }) => ` ${type}${description ? ` (${description})` : ""}: ${count} objects`)
|
|
104
|
+
.join("\n");
|
|
105
|
+
return {
|
|
106
|
+
content: [{
|
|
107
|
+
type: "text",
|
|
108
|
+
text: `${result.message}\n\nAvailable object types:\n${availableTypes}\n\nUse sap_list_object_types for a complete list with level breakdown.`,
|
|
109
|
+
}],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
// Error: no results
|
|
113
|
+
if ("error" in result && result.error === "no_results") {
|
|
114
|
+
return {
|
|
115
|
+
content: [{
|
|
116
|
+
type: "text",
|
|
117
|
+
text: `${result.message}\n\nSuggestions:\n${(result.suggestions ?? []).map((s) => `- ${s}`).join("\n")}`,
|
|
118
|
+
}],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
// Success
|
|
122
|
+
const r = result;
|
|
123
|
+
const lines = r.objects.map((obj) => formatObject(obj, true) + `\n Relevance: ${obj.relevance}/100`);
|
|
124
|
+
const header = `Found ${r.total} objects matching '${r.query}' ` +
|
|
125
|
+
`(system: ${r.system_type}, level: <=${r.clean_core_level}, ` +
|
|
126
|
+
`showing ${r.offset + 1}-${r.offset + r.objects.length} of ${r.total})`;
|
|
127
|
+
const footer = r.hasMore
|
|
128
|
+
? `\n\n--- More results available. Use offset=${r.offset + r.limit} to see next page. ---`
|
|
129
|
+
: "";
|
|
130
|
+
const text = truncateIfNeeded(`${header}\n\n${lines.join("\n\n")}${footer}`);
|
|
131
|
+
return { content: [{ type: "text", text }] };
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
return {
|
|
135
|
+
isError: true,
|
|
136
|
+
content: [{
|
|
137
|
+
type: "text",
|
|
138
|
+
text: `Error searching objects: ${err instanceof Error ? err.message : String(err)}`,
|
|
139
|
+
}],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
// =========================================================================
|
|
144
|
+
// TOOL 2: sap_get_object_details
|
|
145
|
+
// =========================================================================
|
|
146
|
+
server.registerTool("sap_get_object_details", {
|
|
147
|
+
title: "Get SAP Object Details",
|
|
148
|
+
description: `Get detailed information about a specific SAP object by its exact type and name. ` +
|
|
149
|
+
`Returns Clean Core Level, state, successor info, application component, and more. ` +
|
|
150
|
+
`Use this to check if a specific object (table, class, CDS view...) is released ` +
|
|
151
|
+
`for ABAP Cloud and what its Clean Core Level is.`,
|
|
152
|
+
inputSchema: {
|
|
153
|
+
object_type: z
|
|
154
|
+
.string()
|
|
155
|
+
.describe("TADIR object type (e.g., 'TABL', 'CLAS', 'DDLS', 'DTEL', 'INTF', 'BDEF')."),
|
|
156
|
+
object_name: z
|
|
157
|
+
.string()
|
|
158
|
+
.describe("Exact object name (e.g., 'MARA', 'CL_ABAP_UNIT_ASSERT', 'I_PRODUCT')."),
|
|
159
|
+
system_type: SystemTypeSchema,
|
|
160
|
+
version: VersionSchema,
|
|
161
|
+
clean_core_level: CleanCoreLevelSchema,
|
|
162
|
+
},
|
|
163
|
+
annotations: {
|
|
164
|
+
readOnlyHint: true,
|
|
165
|
+
destructiveHint: false,
|
|
166
|
+
idempotentHint: true,
|
|
167
|
+
openWorldHint: false,
|
|
168
|
+
},
|
|
169
|
+
}, async ({ object_type, object_name, system_type, version, clean_core_level }) => {
|
|
170
|
+
try {
|
|
171
|
+
const result = await handleGetObjectDetails({
|
|
172
|
+
object_type, object_name, system_type, version, clean_core_level,
|
|
173
|
+
});
|
|
174
|
+
if (!result.found) {
|
|
175
|
+
return {
|
|
176
|
+
content: [{
|
|
177
|
+
type: "text",
|
|
178
|
+
text: result.message + "\n\n" +
|
|
179
|
+
"This means:\n" +
|
|
180
|
+
"- The object may not exist in this SAP version\n" +
|
|
181
|
+
"- If it's a known SAP standard object, it is likely Level C (internal, unclassified) or Level D (noAPI)\n" +
|
|
182
|
+
"- It is NOT available for ABAP Cloud (Level A) development\n" +
|
|
183
|
+
"- Consider searching for a released successor using sap_find_successor\n" +
|
|
184
|
+
"- Or search for alternative released objects using sap_search_objects",
|
|
185
|
+
}],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
const obj = result.object;
|
|
189
|
+
const lines = [
|
|
190
|
+
`=== ${obj.objectType} ${obj.objectName} ===`,
|
|
191
|
+
"",
|
|
192
|
+
`Clean Core Level: ${obj.cleanCoreLevel}`,
|
|
193
|
+
`State: ${obj.state}`,
|
|
194
|
+
`Object Type: ${obj.objectType}${obj.typeDescription ? ` (${obj.typeDescription})` : ""}`,
|
|
195
|
+
`Application Component: ${obj.applicationComponent}`,
|
|
196
|
+
`Software Component: ${obj.softwareComponent}`,
|
|
197
|
+
`Source: ${obj.source}`,
|
|
198
|
+
];
|
|
199
|
+
// Level assessment with emojis
|
|
200
|
+
lines.push("");
|
|
201
|
+
const a = result.assessment;
|
|
202
|
+
if (obj.cleanCoreLevel === "A" && obj.state === "released") {
|
|
203
|
+
lines.push(`\u2705 ${a.message}`);
|
|
204
|
+
}
|
|
205
|
+
else if (obj.cleanCoreLevel === "A" && obj.state === "deprecated") {
|
|
206
|
+
lines.push(`\u26a0\ufe0f ${a.message}`);
|
|
207
|
+
}
|
|
208
|
+
else if (obj.cleanCoreLevel === "B") {
|
|
209
|
+
lines.push(`\u2139\ufe0f ${a.message}`);
|
|
210
|
+
}
|
|
211
|
+
else if (obj.cleanCoreLevel === "C") {
|
|
212
|
+
lines.push(`\u26a0\ufe0f ${a.message}`);
|
|
213
|
+
}
|
|
214
|
+
else if (obj.cleanCoreLevel === "D") {
|
|
215
|
+
lines.push(`\u274c ${a.message}`);
|
|
216
|
+
}
|
|
217
|
+
if (obj.successor) {
|
|
218
|
+
lines.push("", "--- Successor Information ---");
|
|
219
|
+
lines.push(`Classification: ${obj.successor.classification}`);
|
|
220
|
+
if (obj.successor.objects && obj.successor.objects.length > 0) {
|
|
221
|
+
lines.push("Successor object(s):");
|
|
222
|
+
for (const succ of obj.successor.objects) {
|
|
223
|
+
lines.push(` \u2192 ${succ.objectType} ${succ.objectName}${succ.typeDescription ? ` (${succ.typeDescription})` : ""}`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (obj.successor.conceptName) {
|
|
227
|
+
lines.push(`Successor Concept: ${obj.successor.conceptName}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
231
|
+
}
|
|
232
|
+
catch (err) {
|
|
233
|
+
return {
|
|
234
|
+
isError: true,
|
|
235
|
+
content: [{
|
|
236
|
+
type: "text",
|
|
237
|
+
text: `Error fetching object details: ${err instanceof Error ? err.message : String(err)}`,
|
|
238
|
+
}],
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
// =========================================================================
|
|
243
|
+
// TOOL 3: sap_find_successor
|
|
244
|
+
// =========================================================================
|
|
245
|
+
server.registerTool("sap_find_successor", {
|
|
246
|
+
title: "Find SAP Object Successor",
|
|
247
|
+
description: `Find the released successor(s) of a deprecated or non-released SAP object. ` +
|
|
248
|
+
`Essential for ABAP Cloud migration: when your code uses a non-released object ` +
|
|
249
|
+
`(e.g., table MARA), this tool finds the replacement (e.g., CDS view I_PRODUCT). ` +
|
|
250
|
+
`Also useful for checking if a deprecated API has a modern replacement.`,
|
|
251
|
+
inputSchema: {
|
|
252
|
+
object_name: z
|
|
253
|
+
.string()
|
|
254
|
+
.min(1)
|
|
255
|
+
.describe("Object name to find successor for (e.g., 'MARA', 'CL_AUNIT_ASSERT', 'BAPI_MATERIAL_GET_ALL'). " +
|
|
256
|
+
"The search is case-insensitive and matches partial names."),
|
|
257
|
+
object_type: z
|
|
258
|
+
.string()
|
|
259
|
+
.optional()
|
|
260
|
+
.describe("Optional TADIR object type to narrow the search (e.g., 'TABL', 'CLAS', 'FUGR'). " +
|
|
261
|
+
"Leave empty to search all types."),
|
|
262
|
+
system_type: SystemTypeSchema,
|
|
263
|
+
version: VersionSchema,
|
|
264
|
+
},
|
|
265
|
+
annotations: {
|
|
266
|
+
readOnlyHint: true,
|
|
267
|
+
destructiveHint: false,
|
|
268
|
+
idempotentHint: true,
|
|
269
|
+
openWorldHint: false,
|
|
270
|
+
},
|
|
271
|
+
}, async ({ object_name, object_type, system_type, version }) => {
|
|
272
|
+
try {
|
|
273
|
+
const result = await handleFindSuccessor({
|
|
274
|
+
object_name, object_type, system_type, version,
|
|
275
|
+
});
|
|
276
|
+
if (result.results.length === 0) {
|
|
277
|
+
return {
|
|
278
|
+
content: [{
|
|
279
|
+
type: "text",
|
|
280
|
+
text: `No object matching '${object_name}'${object_type ? ` (type: ${object_type})` : ""} ` +
|
|
281
|
+
`found in the Cloudification Repository.\n\n` +
|
|
282
|
+
`The object may not be cataloged. Try:\n` +
|
|
283
|
+
`- Searching with sap_search_objects for related released APIs\n` +
|
|
284
|
+
`- Checking the SAP Business Accelerator Hub for released APIs\n` +
|
|
285
|
+
`- Using the Cloudification Repository Viewer: ` +
|
|
286
|
+
`https://sap.github.io/abap-atc-cr-cv-s4hc/`,
|
|
287
|
+
}],
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
const lines = [
|
|
291
|
+
`=== Successor Search for '${object_name}' ===`,
|
|
292
|
+
"",
|
|
293
|
+
];
|
|
294
|
+
for (const entry of result.results) {
|
|
295
|
+
lines.push(`--- ${entry.objectType} ${entry.objectName} ---`);
|
|
296
|
+
lines.push(`State: ${entry.state} (Level ${entry.cleanCoreLevel})`);
|
|
297
|
+
if (entry.successor) {
|
|
298
|
+
lines.push(`Successor Type: ${entry.successor.classification}`);
|
|
299
|
+
if (entry.successor.objects && entry.successor.objects.length > 0) {
|
|
300
|
+
for (const succ of entry.successor.objects) {
|
|
301
|
+
lines.push(` \u2192 ${succ.objectType} ${succ.objectName}${succ.typeDescription ? ` (${succ.typeDescription})` : ""} [${succ.state} (Level ${succ.cleanCoreLevel})]`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (entry.successor.conceptName) {
|
|
305
|
+
lines.push(` \u2192 Concept: ${entry.successor.conceptName}`);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
if (entry.state === "released") {
|
|
310
|
+
lines.push(" \u2705 This object IS released (Level A). No successor needed \u2014 use this object directly.");
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
lines.push(" \u26a0\ufe0f No successor information available for this object.");
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
lines.push("");
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
content: [{ type: "text", text: truncateIfNeeded(lines.join("\n")) }],
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
catch (err) {
|
|
323
|
+
return {
|
|
324
|
+
isError: true,
|
|
325
|
+
content: [{
|
|
326
|
+
type: "text",
|
|
327
|
+
text: `Error finding successors: ${err instanceof Error ? err.message : String(err)}`,
|
|
328
|
+
}],
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
// =========================================================================
|
|
333
|
+
// TOOL 4: sap_list_object_types
|
|
334
|
+
// =========================================================================
|
|
335
|
+
server.registerTool("sap_list_object_types", {
|
|
336
|
+
title: "List SAP Object Types",
|
|
337
|
+
description: `List all available TADIR object types in the Cloudification Repository ` +
|
|
338
|
+
`with their counts per Clean Core Level. Useful to understand what kind of ` +
|
|
339
|
+
`objects are available (classes, CDS views, tables, BDEFs, etc.) and ` +
|
|
340
|
+
`their distribution across Levels A-D.`,
|
|
341
|
+
inputSchema: {
|
|
342
|
+
system_type: SystemTypeSchema,
|
|
343
|
+
clean_core_level: CleanCoreLevelSchema,
|
|
344
|
+
version: VersionSchema,
|
|
345
|
+
},
|
|
346
|
+
annotations: {
|
|
347
|
+
readOnlyHint: true,
|
|
348
|
+
destructiveHint: false,
|
|
349
|
+
idempotentHint: true,
|
|
350
|
+
openWorldHint: false,
|
|
351
|
+
},
|
|
352
|
+
}, async ({ system_type, clean_core_level, version }) => {
|
|
353
|
+
try {
|
|
354
|
+
const result = await handleListObjectTypes({ system_type, clean_core_level, version });
|
|
355
|
+
const lines = [
|
|
356
|
+
`=== SAP Object Types (system: ${result.system_type}, level: \u2264${result.clean_core_level}) ===`,
|
|
357
|
+
"",
|
|
358
|
+
`Total types: ${result.totalTypes}`,
|
|
359
|
+
"",
|
|
360
|
+
];
|
|
361
|
+
for (const t of result.types) {
|
|
362
|
+
const levelBreakdown = Object.entries(t.byLevel)
|
|
363
|
+
.map(([lvl, cnt]) => `L${lvl}:${cnt}`)
|
|
364
|
+
.join(" ");
|
|
365
|
+
lines.push(`${t.type.padEnd(6)} ${String(t.count).padStart(6)} objects (${levelBreakdown})${t.description ? ` \u2014 ${t.description}` : ""}`);
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
content: [{ type: "text", text: truncateIfNeeded(lines.join("\n")) }],
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
catch (err) {
|
|
372
|
+
return {
|
|
373
|
+
isError: true,
|
|
374
|
+
content: [{
|
|
375
|
+
type: "text",
|
|
376
|
+
text: `Error listing object types: ${err instanceof Error ? err.message : String(err)}`,
|
|
377
|
+
}],
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
// =========================================================================
|
|
382
|
+
// TOOL 5: sap_get_statistics
|
|
383
|
+
// =========================================================================
|
|
384
|
+
server.registerTool("sap_get_statistics", {
|
|
385
|
+
title: "Get Repository Statistics",
|
|
386
|
+
description: `Get overall statistics about the SAP Cloudification Repository: ` +
|
|
387
|
+
`total object counts by Clean Core Level, by object type, by state, ` +
|
|
388
|
+
`and top application components. Useful for understanding the scope ` +
|
|
389
|
+
`of available APIs and planning ABAP Cloud migration efforts.`,
|
|
390
|
+
inputSchema: {
|
|
391
|
+
system_type: SystemTypeSchema,
|
|
392
|
+
clean_core_level: CleanCoreLevelSchema,
|
|
393
|
+
version: VersionSchema,
|
|
394
|
+
},
|
|
395
|
+
annotations: {
|
|
396
|
+
readOnlyHint: true,
|
|
397
|
+
destructiveHint: false,
|
|
398
|
+
idempotentHint: true,
|
|
399
|
+
openWorldHint: false,
|
|
400
|
+
},
|
|
401
|
+
}, async ({ system_type, clean_core_level, version }) => {
|
|
402
|
+
try {
|
|
403
|
+
const result = await handleGetStatistics({ system_type, clean_core_level, version });
|
|
404
|
+
const lines = [
|
|
405
|
+
`=== SAP Cloudification Repository Statistics ===`,
|
|
406
|
+
"",
|
|
407
|
+
`Source: ${result.source}`,
|
|
408
|
+
`Loaded at: ${result.loadedAt}`,
|
|
409
|
+
`Total unique objects: ${result.totalObjects}`,
|
|
410
|
+
"",
|
|
411
|
+
"--- By Clean Core Level ---",
|
|
412
|
+
...LEVEL_ORDER.map((lvl) => ` Level ${lvl}: ${(result.byLevel[lvl] ?? 0).toLocaleString()} objects`),
|
|
413
|
+
"",
|
|
414
|
+
"--- By State ---",
|
|
415
|
+
...Object.entries(result.byState)
|
|
416
|
+
.sort((a, b) => b[1] - a[1])
|
|
417
|
+
.map(([state, count]) => ` ${state}: ${count.toLocaleString()}`),
|
|
418
|
+
"",
|
|
419
|
+
"--- Top Object Types ---",
|
|
420
|
+
...result.topObjectTypes.map(({ type, count, description }) => ` ${type}: ${count.toLocaleString()}${description ? ` (${description})` : ""}`),
|
|
421
|
+
"",
|
|
422
|
+
"--- Top Application Components ---",
|
|
423
|
+
...result.topApplicationComponents.map(({ component, count }) => ` ${component}: ${count.toLocaleString()}`),
|
|
424
|
+
"",
|
|
425
|
+
`Available PCE versions: ${result.availableVersions.join(", ")}`,
|
|
426
|
+
];
|
|
427
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
428
|
+
}
|
|
429
|
+
catch (err) {
|
|
430
|
+
return {
|
|
431
|
+
isError: true,
|
|
432
|
+
content: [{
|
|
433
|
+
type: "text",
|
|
434
|
+
text: `Error fetching statistics: ${err instanceof Error ? err.message : String(err)}`,
|
|
435
|
+
}],
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
// =========================================================================
|
|
440
|
+
// TOOL 6: sap_list_versions
|
|
441
|
+
// =========================================================================
|
|
442
|
+
server.registerTool("sap_list_versions", {
|
|
443
|
+
title: "List Available S/4HANA Versions",
|
|
444
|
+
description: "List all available S/4HANA PCE versions for Private Cloud and On-Premise systems. " +
|
|
445
|
+
"Versions are discovered dynamically from the SAP Cloudification Repository on GitHub. " +
|
|
446
|
+
"Use this to find which versions can be passed to other tools (sap_search_objects, " +
|
|
447
|
+
"sap_get_object_details, etc.).",
|
|
448
|
+
inputSchema: {},
|
|
449
|
+
annotations: {
|
|
450
|
+
readOnlyHint: true,
|
|
451
|
+
destructiveHint: false,
|
|
452
|
+
idempotentHint: true,
|
|
453
|
+
openWorldHint: false,
|
|
454
|
+
},
|
|
455
|
+
}, async () => {
|
|
456
|
+
try {
|
|
457
|
+
const result = await handleListVersions();
|
|
458
|
+
const lines = [
|
|
459
|
+
`=== Available S/4HANA PCE Versions ===`,
|
|
460
|
+
"",
|
|
461
|
+
`Total: ${result.total} versions`,
|
|
462
|
+
"",
|
|
463
|
+
...result.versions.map((v) => ` ${v.version} (${v.label})`),
|
|
464
|
+
"",
|
|
465
|
+
"Use 'latest' to always target the most recent version.",
|
|
466
|
+
"Pass a specific version to other tools via the 'version' parameter.",
|
|
467
|
+
];
|
|
468
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
469
|
+
}
|
|
470
|
+
catch (err) {
|
|
471
|
+
return {
|
|
472
|
+
isError: true,
|
|
473
|
+
content: [{
|
|
474
|
+
type: "text",
|
|
475
|
+
text: `Error listing versions: ${err instanceof Error ? err.message : String(err)}`,
|
|
476
|
+
}],
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
// =========================================================================
|
|
481
|
+
// TOOL 7: sap_check_clean_core_compliance
|
|
482
|
+
// =========================================================================
|
|
483
|
+
server.registerTool("sap_check_clean_core_compliance", {
|
|
484
|
+
title: "Check Clean Core Compliance",
|
|
485
|
+
description: `Check the Clean Core compliance of a list of SAP objects. ` +
|
|
486
|
+
`Provide a comma-separated list of object names and get their Clean Core Level ` +
|
|
487
|
+
`classification, compliance status, and successor recommendations. ` +
|
|
488
|
+
`Essential for assessing existing custom code during ABAP Cloud migration.`,
|
|
489
|
+
inputSchema: {
|
|
490
|
+
object_names: z
|
|
491
|
+
.string()
|
|
492
|
+
.describe("Comma-separated list of object names to check " +
|
|
493
|
+
"(e.g., 'MARA,BSEG,CL_GUI_ALV_GRID,BAPI_MATERIAL_GET_ALL'). " +
|
|
494
|
+
"Optionally prefix with type: 'TABL:MARA,CLAS:CL_GUI_ALV_GRID'."),
|
|
495
|
+
target_level: z
|
|
496
|
+
.enum(["A", "B"])
|
|
497
|
+
.default("A")
|
|
498
|
+
.describe("Target Clean Core Level for compliance. " +
|
|
499
|
+
"'A' = strict (Released APIs only). " +
|
|
500
|
+
"'B' = pragmatic (Released + Classic APIs). " +
|
|
501
|
+
"Default: A."),
|
|
502
|
+
system_type: SystemTypeSchema,
|
|
503
|
+
version: VersionSchema,
|
|
504
|
+
},
|
|
505
|
+
annotations: {
|
|
506
|
+
readOnlyHint: true,
|
|
507
|
+
destructiveHint: false,
|
|
508
|
+
idempotentHint: true,
|
|
509
|
+
openWorldHint: false,
|
|
510
|
+
},
|
|
511
|
+
}, async ({ object_names, target_level, system_type, version }) => {
|
|
512
|
+
try {
|
|
513
|
+
const result = await handleCheckCompliance({
|
|
514
|
+
object_names, target_level, system_type, version,
|
|
515
|
+
});
|
|
516
|
+
const lines = [
|
|
517
|
+
`=== Clean Core Compliance Check (Target: Level ${result.targetLevel}) ===`,
|
|
518
|
+
`System: ${result.system_type}, Version: ${result.version}`,
|
|
519
|
+
`Objects to check: ${result.totalChecked}`,
|
|
520
|
+
"",
|
|
521
|
+
];
|
|
522
|
+
for (const entry of result.results) {
|
|
523
|
+
if (entry.status === "not_found") {
|
|
524
|
+
lines.push(`\u2753 ${entry.input} \u2014 NOT FOUND in repository (likely Level C/D or non-existent)`);
|
|
525
|
+
}
|
|
526
|
+
else if (entry.status === "compliant") {
|
|
527
|
+
const icon = entry.state === "deprecated" ? "\u26a0\ufe0f" : "\u2705";
|
|
528
|
+
let line = `${icon} ${entry.objectType} ${entry.objectName} \u2014 Level ${entry.cleanCoreLevel} (${entry.state})`;
|
|
529
|
+
if (entry.state === "deprecated" && entry.successor?.objects) {
|
|
530
|
+
line += ` \u2192 Use: ${entry.successor.objects.map((s) => s.objectName).join(", ")}`;
|
|
531
|
+
}
|
|
532
|
+
lines.push(line);
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
let line = `\u274c ${entry.objectType} ${entry.objectName} \u2014 Level ${entry.cleanCoreLevel} (${entry.state})`;
|
|
536
|
+
if (entry.successor?.objects) {
|
|
537
|
+
line += ` \u2192 Successor: ${entry.successor.objects.map((s) => `${s.objectType} ${s.objectName}`).join(", ")}`;
|
|
538
|
+
}
|
|
539
|
+
else if (entry.successor?.conceptName) {
|
|
540
|
+
line += ` \u2192 Concept: ${entry.successor.conceptName}`;
|
|
541
|
+
}
|
|
542
|
+
lines.push(line);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
lines.push("", "--- Summary ---", `\u2705 Compliant (\u2264 Level ${result.targetLevel}): ${result.compliant}`, `\u274c Non-compliant: ${result.nonCompliant}`, `\u2753 Not found: ${result.notFound}`, `\ud83d\udcca Compliance rate: ${result.complianceRate}%`);
|
|
546
|
+
return {
|
|
547
|
+
content: [{ type: "text", text: truncateIfNeeded(lines.join("\n")) }],
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
catch (err) {
|
|
551
|
+
return {
|
|
552
|
+
isError: true,
|
|
553
|
+
content: [{
|
|
554
|
+
type: "text",
|
|
555
|
+
text: `Error checking compliance: ${err instanceof Error ? err.message : String(err)}`,
|
|
556
|
+
}],
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
//# sourceMappingURL=register-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-tools.js","sourceRoot":"","sources":["../../src/tools/register-tools.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2BAA2B;AAC3B,8DAA8D;AAC9D,+EAA+E;AAE/E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAEhB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AAQrC,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;AAEzF,8EAA8E;AAC9E,yCAAyC;AACzC,8EAA8E;AAE9E,MAAM,UAAU,YAAY,CAAC,GAY5B,EAAE,UAAmB,KAAK;IACzB,MAAM,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,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