/** * handleGetProgFullCode: returns full code for program (report) or function group with all includes. * * Description for MCP server: * Name: Get full code for program or function group * Description: Returns the full code for a given ABAP program (report) or function group, including all includes. The main object (report or function group) always comes first in the response, followed by all child includes in tree traversal order. * * Parameters: * - name: technical name of the program or function group (string, e.g., "/CBY/MM_INVENTORY") — required * - type: "PROG/P" for program or "FUGR" for function group (string, required) * - output: "inline" (default) or "file" * * Returns (inline): JSON: * { * name: string, // technical name of the main object * type: string, // "PROG/P" or "FUGR" * total_code_objects: number, // total number of code objects (main + all includes) * code_objects: [ * { * OBJECT_TYPE: string, // "PROG/P" (main program), "FUGR" (function group), or "PROG/I" (include) * OBJECT_NAME: string, // technical name of the object * code: string // ABAP source (runs of spaces collapsed to one) * } * ] * } * * Returns (file): every object is written unchanged to * /src/
/.abap and the response lists * { object_type, object_name, path, lines, bytes, outline } per object. * * Notes: * - All includes are resolved recursively (INCLUDE x. with or without a * trailing " comment, and INCLUDE: a, b.) and added after the main object. * - The order is: main object first, then all includes in tree traversal order. * - A function group's main source is read from its source/main endpoint * (SAPL cannot be read as a program include). * * Purpose: mass code export, audit, dependency analysis, migration, backup. */ import type { HandlerContext } from '../../../lib/handlers/interfaces'; export declare const TOOL_DEFINITION: { readonly name: "GetProgFullCode"; readonly available_in: readonly ["onprem", "legacy"]; readonly description: "[read-only] Returns the full code for a program or function group, including all includes, in tree traversal order. Use output=\"file\" to get paths + outlines instead of the code."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Technical name of the program or function group (e.g., '/CBY/MM_INVENTORY')"; }; readonly type: { readonly type: "string"; readonly enum: readonly ["PROG/P", "FUGR"]; readonly description: "'PROG/P' for program or 'FUGR' for function group"; }; readonly output: { readonly type: "string"; readonly enum: readonly ["inline", "file"]; readonly description: "\"inline\" (default) or \"file\": writes the source under the MCP output dir and returns path, line count and an outline with line ranges. Prefer \"file\" for large objects."; readonly default: "inline"; }; }; readonly required: readonly ["name", "type"]; }; }; /** INCLUDE x. / INCLUDE x. " comment / INCLUDE: a, b. */ export declare function findIncludes(code: string): string[]; /** * handleGetProgFullCode: returns full code for program (report) or function group with all includes. * @param args { name: string, type: "PROG/P" | "FUGR", output?: "inline" | "file" } */ export declare function handleGetProgFullCode(context: HandlerContext, args: { name: string; type: string; output?: 'inline' | 'file'; }): Promise<{ isError: boolean; content: { type: string; text: string; }[]; }>; //# sourceMappingURL=handleGetProgFullCode.d.ts.map